Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to setup dhcp demon in my CentOS machine. But whenever I start dhcpd, it fails. I don't know the reason. Here is the /etc/dhcpd.conf file.

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";
   }
}

thanks in advance

EDIT: here is the ifconfig output

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)

and the dmesg output after dhcpd fails to start

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 okir@monad.swb.de).
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
share|improve this question

migrated from stackoverflow.com Jun 19 '12 at 14:00

This question came from our site for professional and enthusiast programmers.

    
Pls. also post the output of "ifconfig" and "tail -n 99 /var/log/syslog" –  Themroc Jun 19 '12 at 11:40

1 Answer 1

You've got the following line in your dhcpd.conf:

subnet 10.0.0.0 netmask 255.0.0.0 {

But you don't have any interfaces with addresses in that subnet. dhcpd won't start unless it's got an interface in the subnet you're trying to assign addresses for. Put a 10.x.x.x address on one of your interfaces, and start dhcpd again.

If it still doesn't work, check /var/log/syslog for relevant information. dmesg isn't much help here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.