我在机器上配置和启动ISC DHCP服务器时遇到问题。我正在运行Ubuntu 11.10桌面版。我通过运行安装了ISC DHCP
$ sudo apt-get install dhcp3-server
我的机器有两个网卡:
eth0,它连接到用于Internet访问的路由器,其IP地址为192.168.2.2.
eth1,我希望dhcpd在其中为子网提供请求。
我已修改/etc/default/isc-dhcp-server
为指向eth1:
$ cat /etc/default/isc-dhcp-server
# Defaults for dhcp initscript
INTERFACES="eth1"
我已经为简单的子网配置了dhcpd:
$ cat /etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.0.0 netmask 255.255.255.0 {
interface eth1;
range 192.168.0.50 192.168.0.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
}
使用此配置,dhcpd无法为我启动:
$ sudo /etc/init.d/isc-dhcp-server start
* Starting ISC DHCP server dhcpd
* check syslog for diagnostics. [fail]
$ tail /var/log/syslog
Aug 15 15:29:45 eptc4 dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
Aug 15 15:29:45 eptc4 dhcpd: ** Ignoring requests on eth1. If this is not what
Aug 15 15:29:45 eptc4 dhcpd: you want, please write a subnet declaration
Aug 15 15:29:45 eptc4 dhcpd: in your dhcpd.conf file for the network segment
Aug 15 15:29:45 eptc4 dhcpd: to which interface eth1 is attached. **
Aug 15 15:29:45 eptc4 dhcpd:
Aug 15 15:29:45 eptc4 dhcpd:
Aug 15 15:29:45 eptc4 dhcpd: Not configured to listen on any interfaces!
我错过了一步吗?我不明白为什么dhcpd抱怨它没有配置为在任何接口上监听。
这是我第一次设置DHCP。我花了三天时间阅读手册和论坛,并认为我所做的一切都正确,但是仍然会遇到相同的错误。任何使我步入正轨的提示都将不胜感激!