Results 1 to 5 of 5

Thread: dhcp getting IP despite interface being marked as static (from local dhcpd)

  1. #1
    Join Date
    Dec 2006
    Beans
    Hidden!

    dhcp getting IP despite interface being marked as static (from local dhcpd)

    When the network first comes up, or I restart it via /etc/init.d/networking restart, my interfaces are configured correctly, that is eth0 has address 192.168.1.1 and eth1 gets an IP fetched via DHCP.

    I have dhcpd running on this machine and serving off IPs off eth0 (what I mean is that in dhcpd.conf I only defined subnets within eth0's address range).

    After a little while, eth0 gets an IP address in the dynamic range assigned by my local dhcpd server, despite being marked as static. Looking at the dhcp lease files confirms that an IP was fetched for it.

    My interfaces file seems correct... is there something else that I should be aware of?

    Appreciate any help. Regards,
    spip


    /etc/network/interfaces file inlined below, and the dhclient.conf (stock, untouched) and dhcpd.conf (nothing out of the ordinary) files are attached.


    # The loopback network interface
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

    # The primary network interface
    auto eth1
    iface eth1 inet dhcp
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2011
    Location
    Berlin, Germany
    Beans
    5,559
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: dhcp getting IP despite interface being marked as static (from local dhcpd)

    Change "false" to "true" in the /etc/NetworkManager/NetworkManager.conf file. Otherwise the NWM cannot handle the manual config

  3. #3
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: dhcp getting IP despite interface being marked as static (from local dhcpd)

    Hi there,

    No such file. I forgot to mention, this is ubuntu server 12.04. Would there be another process/service that does the same thing as NetworkManager and that would need to be disabled or configured properly?

    spip
    Last edited by spip; August 3rd, 2013 at 11:31 PM.

  4. #4
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: dhcp getting IP despite interface being marked as static (from local dhcpd)

    Hmm, doing ps | grep dhclient showed the dhcp client was still running on eth0. I thought I had rebooted in between, but that was probably it. It is not running now. The problem may still occur if something else was launching the dhclient. I'll know in a few hours.

    spip

  5. #5
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: dhcp getting IP despite interface being marked as static (from local dhcpd)

    Ok that was it, I must not have rebooted. Must manually kill the dhclient after changing an interface from dynamic to static (opposite probably also true).

Bookmarks

Posting Permissions

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