Chinaunix

标题: 不重启系统,重启dhcpd后,dhcpd无法启用 [打印本页]

作者: GilbertGreen    时间: 2013-11-01 12:25
标题: 不重启系统,重启dhcpd后,dhcpd无法启用
DHCP server搭好了,也能正常工作,见如下/var/log/messages内容:

Nov  1 12:00:32 RHEL6 dhcpd: Listening on LPF/eth0/00:0c:29:7b:54:61/192.168.2.0/24
Nov  1 12:00:32 RHEL6 dhcpd: Sending on   LPF/eth0/00:0c:29:7b:54:61/192.168.2.0/24
Nov  1 12:00:32 RHEL6 dhcpd: Sending on   Socket/fallback/fallback-net
Nov  1 12:00:50 RHEL6 dhcpd: DHCPDISCOVER from 02:00:4c:4f:4f:50 via eth0
Nov  1 12:00:51 RHEL6 dhcpd: DHCPOFFER on 192.168.2.11 to 02:00:4c:4f:4f:50 via eth0
Nov  1 12:00:51 RHEL6 dhcpd: DHCPREQUEST for 192.168.2.11 (192.168.2.2) from 02:00:4c:4f:4f:50 via eth0
Nov  1 12:00:51 RHEL6 dhcpd: DHCPACK on 192.168.2.11 to 02:00:4c:4f:4f:50 via eth0


但是如果service dhcpd restart就不行了,老是报如下错误
No subnet declaration for start (no IPv4 addresses).
** Ignoring requests on start.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface start is attached. **


虽然不影响使用,但是还是不放心。重新配置所有参数然后/usr/sbin/dhcpd start也一样。哪个兄弟碰到过这种情况?
[root@RHEL6 ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0C:29:7B:54:61  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe7b:5461/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:528 errors:0 dropped:0 overruns:0 frame:0
          TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:45285 (44.2 KiB)  TX bytes:96202 (93.9 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:720 (720.0 b)  TX bytes:720 (720.0 b)

pan0      Link encap:Ethernet  HWaddr AE:F4:B8:4D:99:58  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:FC:20:44  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0-nic Link encap:Ethernet  HWaddr 52:54:00:FC:20:44  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@RHEL6 ~]# more /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS="eth0";
[root@RHEL6 ~]#
[root@RHEL6 ~]# more /etc/dhcp/dhcpd.conf
subnet 192.168.2.0 netmask 255.255.255.0{
        option subnet-mask 255.255.255.0;
        option routers 192.168.2.1;
        range 192.168.2.11 192.168.2.22;
}
[root@RHEL6 ~]#
作者: kanbulusiber    时间: 2014-08-15 16:06
请问下,您解决了吗?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2