FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile dhcpd doesn't start after reboot

    Hy every body every where,

    I'm with Fedora 19 version.

    i've a problem with my dhcp server. I should start it manually at each reboot !
    What coul be the reason(s)

    this the output of the following command:

    [root@serveur ~]# systemctl status dhcpd.service
    dhcpd.service - DHCPv4 Server Daemon
    Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled)
    Active: failed (Result: exit-code) since mer. 2013-08-21 18:53:33 CET; 3min 21s ago
    Docs: man:dhcpd(8)
    man:dhcpd.conf(5)
    Process: 841 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid (code=exited, status=1/FAILURE)

    août 21 18:53:33 serveur dhcpd[841]: ** Ignoring requests on em1. If this is not what
    août 21 18:53:33 serveur dhcpd[841]: you want, please write a subnet declaration
    août 21 18:53:33 serveur dhcpd[841]: in your dhcpd.conf file for the network segment
    août 21 18:53:33 serveur dhcpd[841]: to which interface em1 is attached. **
    août 21 18:53:33 serveur dhcpd[841]:
    août 21 18:53:33 serveur dhcpd[841]:
    août 21 18:53:33 serveur dhcpd[841]: Not configured to listen on any interfaces!
    août 21 18:53:33 serveur dhcpd[841]:
    août 21 18:53:33 serveur systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
    août 21 18:53:33 serveur systemd[1]: Unit dhcpd.service entered failed state.
    [root@serveur ~]#

    and this is my dhcpd.conf

    [root@serveur dhcp]# cat dhcpd.conf
    #ddns-update-style interim;
    ddns-update-style none;
    ignore client-updates;
    deny client-updates;

    #### By red for PXE Booting
    #allow booting;
    #allow bootp;
    ### End by red

    #log-facility local6;

    subnet 192.168.0.0 netmask 255.255.255.0 {
    # --- default gateway

    ##### By red for PXE booting
    # class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
    # next-server 192.168.0.1;
    # filename "linux-install/pxelinux.0"; }
    #### End by red

    option routers 192.168.0.1;
    option subnet-mask 255.255.255.0;
    # option nis-domain "domain.org";
    option domain-name "cabinet.intranet";
    option domain-name-servers 192.168.0.1;
    option time-offset -18000;
    range dynamic-bootp 192.168.0.5 192.168.0.50;
    default-lease-time 3600;
    max-lease-time 7200;
    # we want the nameserver to appear at a fixed address

    ## by red: ICI on desire reserver des adresses IP fixes a des machines ##

    #group {
    #use-host-decl-names true;


    #### ICI on defini toutes les machines, Administration by red 05/07/2013 ####


    host ibmPC {
    hardware ethernet 00:c0:9f:fa:be:6c;
    fixed-address 192.168.0.2;
    }

    host ibmPW {
    hardware ethernet 00:16:6f:8b:19:18;
    fixed-address 192.168.0.3;
    }


    #} #### End group #####


    }

    ###### End dhcpd.conf #####


    [root@serveur dhcp]#
    Now if i restart the dhcpd manualy , it works and this is what i get:

    [root@serveur cabinet-serveur-configuration]# systemctl status dhcpd.service
    dhcpd.service - DHCPv4 Server Daemon
    Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled)
    Active: active (running) since mer. 2013-08-21 20:33:56 CET; 2min 10s ago
    Docs: man:dhcpd(8)
    man:dhcpd.conf(5)
    Main PID: 1982 (dhcpd)
    CGroup: name=systemd:/system/dhcpd.service
    └─1982 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid

    août 21 20:33:56 serveur dhcpd[1982]: ** Ignoring requests on em1. If this is not what
    août 21 20:33:56 serveur dhcpd[1982]: you want, please write a subnet declaration
    août 21 20:33:56 serveur dhcpd[1982]: in your dhcpd.conf file for the network segment
    août 21 20:33:56 serveur dhcpd[1982]: to which interface em1 is attached. **
    août 21 20:33:56 serveur dhcpd[1982]:
    août 21 20:33:56 serveur dhcpd[1982]: Sending on Socket/fallback/fallback-net
    août 21 20:33:58 serveur dhcpd[1982]: DHCPDISCOVER from 00:c0:9f:fa:be:6c via p3p1
    août 21 20:33:58 serveur dhcpd[1982]: DHCPOFFER on 192.168.0.2 to 00:c0:9f:fa:be:6c via p3p1
    août 21 20:33:58 serveur dhcpd[1982]: DHCPREQUEST for 192.168.0.2 (192.168.0.1) from 00:c0:9f:fa:be:6... p3p1
    août 21 20:33:58 serveur dhcpd[1982]: DHCPACK on 192.168.0.2 to 00:c0:9f:fa:be:6c via p3p1
    [root@serveur cabinet-serveur-configuration]#


    Thanks a lot for your kind help
    red
    Last edited by hermouche; 21st August 2013 at 08:39 PM.
    IBM ThinkPad z60m

  2. #2
    Join Date
    Jul 2005
    Age
    66
    Posts
    1,218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dhcpd doesn't start after reboot

    I'd guess that it tries to start before any networks with the declared subnet are yet up. They changed dhcpd in the F18 era so that it doesn't use a specification of which interface to listen on - it takes that from your subnet declarations. From the message, it would appear that it doesn't know how to associate your subnet declarations with an interface because it doesn't have one yet and when you try it manually later, you have the interface and are golden.

    Gotta love systemd and network manager.

    If that is what it is, then you should look at starting dhcpd later possibly via rc.local or altering some dependencies in the systemd start scripts so it starts later after NM is running, and remember to propagate this forward as needed through upgrades.

  3. #3
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Re: dhcpd doesn't start after reboot

    Quote Originally Posted by William Haller
    I'd guess that it tries to start before any networks with the declared subnet are yet up. They changed dhcpd in the F18 era so that it doesn't use a specification of which interface to listen on - it takes that from your subnet declarations. From the message, it would appear that it doesn't know how to associate your subnet declarations with an interface because it doesn't have one yet and when you try it manually later, you have the interface and are golden.

    Gotta love systemd and network manager.

    If that is what it is, then you should look at starting dhcpd later possibly via rc.local or altering some dependencies in the systemd start scripts so it starts later after NM is running, and remember to propagate this forward as needed through upgrades.
    According to what you have said, i've created an rc.local in /etc/rc.d
    #touch /etc/rc.d/rc.local

    Then i've edited the file rc.local like so:
    #!//bin/bash

    systemctl stop dhcpd.service
    systemctl start dhcpd.service


    Finally i've rebooted the machine

    and bingo, it works :-)

    Now, i am wondering, why and which mistake i did, why it is like this, i never had this kind of problem before !!!!
    It is very important to me to know why, if not i will do the same "Mistake" again and again...

    Well at least, it works actually, THANK YOU very much William Haller

    red
    IBM ThinkPad z60m

  4. #4
    Join Date
    Jul 2005
    Age
    66
    Posts
    1,218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dhcpd doesn't start after reboot

    I honestly don't think it's anything you did at all. I think it's just that they've tried to enhance too many things at once and haven't gotten everything caught up yet. Network Manager is a great concept for people who move their computers from point to point and I can see exactly why they went that way. I just wish they had every concept working rock solid in it like VLANs, bonding and the like before they went to it by default. Same with systemd. It's great for what it is intended to do - clients with laptops. For people trying to run severs (or use the old network instead of NM) it is awful. They'll eventually get it working great, I'm sure, but the people working on it seem to care more about the client experience and do most of their testing there instead of the server side where services need to start, and start quickly, and start every single time.

    Personally, in F17 I copied the priority of service starts from CentOS and put the services I needed in that order in my rc.local and turned them all off from being started automatically. I let systemd do some really basic things, and then do everything else in rc.local - at least on my servers. That isn't the way it should be done, but I can't wait for my mail server or file servers to thrash about trying to restart the network 5 or 6 times before finally happening to hit the right timing to make systemd happy.

    So although you may have done something wrong, I personally can't think of what it might be. You can dig into the service start routines in systemd and try to add some dependencies and that may work, or you can just use your fix.

    It's something I'd recommend sending in a bugzilla report on, as they need to know they have a problem and don't monitor this forum much, but I'm not optimistic the systemd people will ever get to it - pessimist that I am about the systemd development.

  5. #5
    Join Date
    Aug 2014
    Location
    Esbo, Finland
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dhcpd doesn't start after reboot

    As this is still an issue in Fedora 20 I want to let you know that I fixed it in my system by changing the line:

    Code:
    After=network.target
    to

    Code:
    After=network-online.target
    in the service file for dhcpd: /usr/lib/systemd/system/dhcpd.service

    Best
    Dag

  6. #6
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    1,931
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Re: dhcpd doesn't start after reboot

    Take a look at :

    http://www.freedesktop.org/wiki/Soft...NetworkTarget/

    It explains the issues and provides recommendations.
    Laptop: ASUSTek K52JT / Intel i7 Q740 1.73Ghz x4/ 4GB/ 640GB HD/ Radeon 7370M/ fc44.x86_64
    Tower: GigaByte B550 / Ryzen 5900x 3.7Ghz x12/ 64GB/ 45.5TB HD/ Radeon RX 580/ fc44.x86_64
    Server: GigaByte B450M / Ryzen 5600G 4.4Ghz x6/ 16GB/ 24.5TB HD/ Vega 7 / fc44.x86_64
    Embedded: Radxa RockPi 4+/ ARM RK3399 2.0 GHz x6/ 4GB/ 32GB eMMC/ Mali-T860MP4/ fc44.aarch64

Similar Threads

  1. Replies: 0
    Last Post: 8th June 2010, 07:44 PM
  2. Fedora 12 doesn't start after reboot
    By Kivamaki in forum Installation, Upgrades and Live Media
    Replies: 8
    Last Post: 10th December 2009, 06:31 AM
  3. dhcpd doesn't seem to work
    By lou in forum Servers & Networking
    Replies: 1
    Last Post: 11th May 2006, 04:08 PM

Tags for this Thread

Posting Permissions

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