Results 1 to 3 of 3

Thread: dhcpd fails to start

  1. #1

    dhcpd fails to start

    I am trying to configure DHCP on a second NIC, eth1, on CentOS 6.2. (I already have my first NIC, eth0, connected to a DSL modem which gets its IP address and DNS server[s] from the ISP.)

    I have followed the contents of Ch.03 Linux Networking and Ch.08 Configuring the DHCP server – but I’m not quite there yet, though I suspect I am pretty close. Although I have read the material many times now, and looked at many other related articles, there are still some points that I’m not absolutely clear on. Some of the key settings include
    NM_CONTROLLED=no BOOTPROTO=none ONBOOT=yes # probably could be ‘no’ until I’ve got it working
    I assume that I have to manually assign an IP address for eth1 – what I have read doesn’t make it absolutely clear to me whether this is the right thing to do, but lets go with it for now
    ifconfig eth1 netmask up
    (Obviously I can add IPADDR= and NETMASK= into ifcfg-eth1 later but, again, lets go with this for now.)

    When I say ‘service dhcpd start’ it fails and puts this message into /var/log/messages
    dhcpd: No subnet declaration for eth1 (
    Which would seem to be clear enough, yet I do have the following in /etc/dhcpd.conf
    subnet netmask {
                    option routers; # I put this here because it is the address of eth1
                    option ip-forwarding off;
                    option broadcast-address;
                    option domain-name-servers; # taken from /etc/resolv.conf
    Which I’m very happy to concede is probably wrong – I just don’t know what I am looking for. (For the record the file /var/lib/dhcpd/dhcpd.leases does exist.) I also have
    /etc/sysconfig/network-scripts/route-eth1: dev eth1
    I’m reasonably convinced that the discussion of default gateways is going to be pretty important (though probably later on – I don't think it is the reason that dhcpd is failing to start now) but I am also quite baffled by it. Although it says that the server needs a single gateway it feels to me like I should interpret that to mean a single default gateway per NIC. In the section “How to Change Your Default Gateway” it says
    DHCP servers will automatically assign a default gateway to DHCP configured NICs, but NICs with configured static IP addresses will need to have a manually configured default gateway.
    eth0 is configured by DHCP so it is automatically assigned a default gateway. eth1 has a static IP address so I must manually configure its default gateway – but as what?


    1. Can anyone spot where I have gone wrong so far?
    2. Do we agree that I just leave ppp0/eth0 alone and let it sort itself out?
    3. How should I configure a default gateway for eth1?

  2. #2
    Join Date
    May 2012
    you can try a couple of things here....


    GATEWAY=ipaddress of dhcp server
    do not put ipaddress and netmask in ifcfg file

    in your dhcp server where you have specified the option dns try to put the ip of the dhcp server itself..


    hope this works..


  3. #3
    Thanks for the reply Tapas. I wasn't ignoring you - just been completely run off my feet this week working on a new project, so haven't had time to try out your suggestion until now.

    I tried your first suggestion - here are the complete contents of the file now
    After changing the file to look like above I did
    ifconfig eth1 down
    ifconfig eth1 up
    service dhcpd start
    But I still get the same error in /var/log/messages. So, no observable change.

    It was less clear to me precisely what you meant by your second suggestion (item 3) but I tried this
    option domain-name-servers;
    But again I still get the same error.

Similar Threads

  1. starting dhcpd: failed
    By lynntwin in forum Linux - Hardware, Networking & Security
    Replies: 6
    Last Post: 03-25-2008, 01:28 AM
  2. DHCPD problem.
    By CK in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 07-15-2003, 09:54 AM
  3. USB: insmod input.o fails, HID fails
    By x in forum Linux - General Topics
    Replies: 2
    Last Post: 02-18-2003, 08:15 AM
  4. dhcpd
    By friskydrifter in forum Linux - Software, Applications & Programming
    Replies: 6
    Last Post: 11-24-2002, 09:17 PM
  5. XMMS fails to start
    By Dizzybacon in forum Linux - Software, Applications & Programming
    Replies: 8
    Last Post: 11-02-2002, 06:22 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts