dhcp server 架設出錯

這個版面主要討論 debian 在 server 端的應用問題, server 種類繁多..舉凡 Web Server 、 File Server、 DHCP Server..等等。

版主: 阿信

dhcp server 架設出錯

文章betula » 週一 1月 24, 2011 6:13 pm

我嘗試架設一台dhcp伺服器,因為電腦上只有一張網路卡,所以我在eth0上新增了一個介面eth0:1,不過我在跑 /etc/init.d/isc-dhcp-server start的時候都會出錯,錯誤訊息如下:
代碼: 選擇全部
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.

No subnet declaration for eth0:1 (no IPv4 addresses).
 ** Ignoring requests on eth0:1.  If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network segment
    to which interface eth0:1 is attached. **
 Not configured to listen on any interfaces!


我的debian版本是squeeze,以下是我的設定,請各位幫我看看到底哪裡出錯了?謝謝。
/etc/dhcp/dhcpd.conf:
代碼: 選擇全部
ddns-update-style none;
option domain-name-servers 163.28.112.1 , 163.28.113.1;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
range 192.168.1.100 192.168.1.200;
}


/etc/default/isc-dhcp-server:
代碼: 選擇全部
INTERFACES="eth0:1"


/etc/network/interfaces:
代碼: 選擇全部
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
address 140.116.71.185
netmask 255.255.255.0
gateway 140.116.71.253

auto eth0:1
iface eth0:1 inet static
address 192.168.1.1
netmask 255.255.255.0
betula
可愛的小學生
可愛的小學生
 
文章: 4
註冊時間: 週四 3月 25, 2010 3:43 am

Re: dhcp server 架設出錯

文章betula » 週二 1月 25, 2011 8:24 pm

我將設定檔改成下如下的程式碼,現在/etc/init.d/isc-dhcp-server已經可以成功啟動了,可是我卻無法成功給client端IP,以下是錯誤訊息,請問錯誤在哪呢?
代碼: 選擇全部
Jan 25 20:18:09 DHCP-MEMFL dhcpd: DHCPINFORM from 192.168.1.37 via eth0: not authoritative for subnet 192.168.1.0
Jan 25 20:18:10 DHCP-MEMFL dhcpd: DHCPDISCOVER from 00:17:31:8b:65:b4 via eth0: network 140.116.71.185/32: no free leases
Jan 25 20:18:10 DHCP-MEMFL dhcpd: DHCPREQUEST for 192.168.0.170 (192.168.0.1) from 00:17:31:8b:65:b4 via eth0: ignored (not authoritative).



設定:
/etc/dhcp/dhcpd.conf:
代碼: 選擇全部
ddns-update-style none;
option domain-name-servers 163.28.112.1 , 163.28.113.1;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
range 192.168.1.100 192.168.1.200;
}


/etc/default/isc-dhcp-server:
代碼: 選擇全部
INTERFACES="eth0"


/etc/network/interfaces:
代碼: 選擇全部
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
address 140.116.71.185
netmask 255.255.255.0
gateway 140.116.71.253

auto eth0:1
iface eth0:1 inet static
address 192.168.1.1
netmask 255.255.255.0
[/quote]
betula
可愛的小學生
可愛的小學生
 
文章: 4
註冊時間: 週四 3月 25, 2010 3:43 am

Re: dhcp server 架設出錯

文章訪客 » 週三 3月 09, 2011 10:52 am

要不要試著用eth0來當作 dhcpd 的interface ,用 eth0:1 設成140.116.x.x 的IP 用。就是把eth0 跟 eth0:1 的設定交換一下
訪客
 


回到 debian server

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客