本人在CentOS 6.2 下yum安装 DHCP,根据教程写好配置/etc/dhcpd.conf ,但启动时就是一个 FAIL。
tail -30 /var/log/messages 查看,有以下信息:
No subnet declaration for eth0 (192.168.1.120).
** Ignoring requests on eth0. 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 is attached. **
Not configured to listen on any interfaces!
看到这个消息,索性将 /etc/sysconfig/dhcpd 改为 DHCPDARGS=eth0
并认真查看 /etc/dhcpd.conf中的subnet信息,但结果还是启动不了。
若干调试,最后发现在 /etc/dhcp/也有一个 dhcpd.conf,同在的还有dhcpd6.conf
心想是不是服务器启动时是使用的是该配置,于是把/etc/dhcpd.conf 复制到 /etc/dhcp/dhcpd.conf
再次启动服务,成功!