dhcp 守护进程启动失败

dhcp 守护进程启动失败

我正在尝试在我的 CentOS 机器上设置 dhcp 守护进程。但是每当我启动 dhcpd 时,它都会失败。我不知道原因。这是 /etc/dhcpd.conf 文件。

ddns-update-style none;
allow bootp;
subnet 10.0.0.0 netmask 255.0.0.0 {
   default-lease-time 30;
   max-lease-time 60;
   #default-lease-time 1209600;   #two weeks
   #max-lease-time     31557600;  #one year
   option routers 10.0.0.1;
   next-server 10.0.0.2;
   host tx49 {
           hardware ethernet 00:60:0A:00:4F:85;
           next-server 10.0.0.1;
           fixed-address 10.0.0.2;
           option root-path "/usr/local/CE-Linux-5.0.4.0/mips/target";
   }
}

提前致谢

编辑:这是 ifconfig 输出

eth0      Link encap:Ethernet  HWaddr B8:AC:6F:1B:8B:6A  
      inet addr:43.88.80.34  Bcast:43.88.80.255  Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:39641 errors:0 dropped:0 overruns:0 frame:0
      TX packets:30504 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:5661404 (5.3 MiB)  TX bytes:2585090 (2.4 MiB)
      Interrupt:169 Memory:fe4f0000-fe500000 

eth1      Link encap:Ethernet  HWaddr 5C:D9:98:C1:8E:FE  
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 b)  TX bytes:11931 (11.6 KiB)
      Interrupt:217 Base address:0xe000 

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:1595 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1595 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:2523700 (2.4 MiB)  TX bytes:2523700 (2.4 MiB)

dhcpd 启动失败后的 dmesg 输出

iscsi: registered transport (cxgb3i)
IPv6: Loaded, but administratively disabled, reboot required to enable
Broadcom NetXtreme II CNIC Driver cnic v2.1.2 (May 26, 2010)
Broadcom NetXtreme II iSCSI Driver bnx2i v2.1.3 (Aug 10, 2010)
iscsi: registered transport (bnx2i)
iscsi: registered transport (tcp)
iscsi: registered transport (iser)
iscsi: registered transport (be2iscsi)
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is off for TX and off for RX.
eth1: link up, 100Mbps, full-duplex, lpa 0xC1E1
Bluetooth: Core ver 2.10
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
Installing knfsd (copyright (C) 1996 [email protected]).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[drm] Initialized drm 1.0.1 20051102
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 169
[drm] Initialized i915 1.8.0 20060929 on minor 0
mtrr: type mismatch for d0000000,10000000 old: uncachable new: write-combining
set status page addr 0x01fff000
eth1: link up, 100Mbps, full-duplex, lpa 0xC1E1
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is off for TX and off for RX.
eth1: link up, 100Mbps, full-duplex, lpa 0xC1E1

答案1

您的 dhcpd.conf 中有以下行:

subnet 10.0.0.0 netmask 255.0.0.0 {

但是您没有任何接口具有该子网中的地址。除非 dhcpd 具有您尝试为其分配地址的子网中的接口,否则它不会启动。在您的一个接口上放置一个 10.xxx 地址,然后重新启动 dhcpd。

如果仍然不起作用,请检查 /var/log/syslog 以获取相关信息。dmesg 在这里没有太大帮助。

相关内容