Find the answer to your Linux question:
Results 1 to 6 of 6
hi, Just a quicky. How can I start dhcpd after Network manager has set up a new connected device. The reason being that dhcpd will not start when there is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    25

    Start dhcpd after network is enabled?


    hi,

    Just a quicky.

    How can I start dhcpd after Network manager has set up a new connected device.

    The reason being that dhcpd will not start when there is nothing connected to the network interface. Therefore I would like dhcpd to start after a new device is connected.

    Now i have found references if ifup-post but this does not relate to NM, is this correct?

    Thanks

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I assume that you are running a server

    Why would you depend on nm in this case?

    Just use text config files don't depend on gui

    I believe that nm has a service though

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    25
    Quote Originally Posted by coopstah13 View Post
    I assume that you are running a server

    Why would you depend on nm in this case?

    Just use text config files don't depend on gui

    I believe that nm has a service though
    I have dhcpd set to run as a service but dhcpd fails to start when there aren't any network devices attached.

    I did come across a post that said that I could run dhcpd as a daemon, so I could probably drop the following into rc.d or something like that

    Code:
    dhcpd -d -f eth0 &
    I am obviously relatively new to Linux, I would like to get away from using Gnome apps for configuring all the various aspects of my system. If I were to uninstall NM what would be the alternative for controlling network devices?

  4. #4
    Just Joined!
    Join Date
    Jul 2010
    Posts
    25
    Update: dhcpd -d -f eth0 & is giving the same problem.

    It seems that it is only possible to run dhcpd when there is something connected to the interface, I would have thought it would have been able to listen until something is attached to the server.

    I'll add my dhcpd.conf just in case, even though it works ok when eth0 is connected to a network.

    Code:
    ddns-update-style interim;
    default-lease-time 60;
    max-lease-time 60;
    
    #authoritive;
    
    option routers 192.168.9.1;
            option subnet-mask 255.255.255.0;
            option domain-name-servers 192.168.9.10;
    
            option broadcast-address 192.168.9.255;
    
    
    subnet 192.168.9.0 netmask 255.255.255.0{
            range 192.168.9.22;
    }
    Cheers

  5. #5
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i don't know what your distro is, so i can't really tell you how to set up your network without networkmanager

  6. #6
    Just Joined!
    Join Date
    Jul 2010
    Posts
    25

    Solved

    I managed to get the result I require with a little help from the fedora irc channel. I had to disable NM and use network. Also the line NM_CONTROLLED had to be added to network config script. This resulted in my network interfaces being brought up on boot even when there was nothing connected to either ethernet port on my server, this then allowed dhcpd to start.

    Thanks for the input.

Posting Permissions

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