Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: eth0 set to static but requesting DHCP anyway

  1. #21
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by deadtom View Post
    So I shutdown dhcpd, removed any references to eth0 in dhclient.conf, dhcpd.leases and the eth0 lease files in /var/lib/dhcpd, then restarted dhcpd again.

    I have no idea if this will help or not.
    How many hosts in your LAN rely on DHCP? My understanding is that you need the lease file for DHCP to work, even it it is empty. If you can get away with it, you can just remove the file temporarily.

    We won't know until to tomorrow.

    Question, does this host have a Desktop Environment installed (DE)? In particular; is Network Manager lurking about?

  2. #22
    Join Date
    Apr 2008
    Location
    Missoula, MT USA
    Beans
    137
    Distro
    Kubuntu

    Re: eth0 set to static but requesting DHCP anyway

    No, network manager is not installed. There are about 30 hosts relying on DHCP.

    It didn't work, dhclient eth0 was running again this morning.

  3. #23
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by deadtom View Post
    No, network manager is not installed. There are about 30 hosts relying on DHCP.

    It didn't work, dhclient eth0 was running again this morning.
    So what you are saying is: The lease is back and the server is running on the .32 address; right?

    It looks like you are going to have to track down why dhclient is even asking for an IP address for eth0.

    I'm with you; I thought the /etc/network/interfaces file configures the interfaces. I have seen that Network-Manager can override those settings, if it is in the mix. Do you have AVAHI running in the background?

    A useful hack would be to provide a reserved IP address via DHCP (ugly) for the server until the answer can be found.

  4. #24
    Join Date
    Apr 2008
    Location
    Missoula, MT USA
    Beans
    137
    Distro
    Kubuntu

    Re: eth0 set to static but requesting DHCP anyway

    No, I un-installed avahi when this first started happening. I already tried setting up a reservation for eth0 and it didn't work. I'm looking into options with dhclient.conf. There doesn't seem to be much useful documentation about it out there.

  5. #25
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by deadtom View Post
    No, I un-installed avahi when this first started happening. I already tried setting up a reservation for eth0 and it didn't work. I'm looking into options with dhclient.conf. There doesn't seem to be much useful documentation about it out there.
    Interesting. Something is not right if you can't set a reservation.

    I would look at the DHCPd configuration too. Maybe you can stop it from listening to eth0 on the localhost.

  6. #26
    Join Date
    Apr 2008
    Location
    Missoula, MT USA
    Beans
    137
    Distro
    Kubuntu

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by redmk2 View Post
    Interesting. Something is not right if you can't set a reservation.
    Reservations are working fine for other hosts, just not this one. Eth0 just doesn't want to behave.

  7. #27
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by deadtom View Post
    Reservations are working fine for other hosts, just not this one. Eth0 just doesn't want to behave.
    Do you have the ability to install a backup for this host? I can't believe this is normal or even configurable this way. You may have a wounded duck on your hands (reinstall???).

  8. #28
    Join Date
    Apr 2008
    Location
    Missoula, MT USA
    Beans
    137
    Distro
    Kubuntu

    Re: eth0 set to static but requesting DHCP anyway

    I think I may have sorted it out.

    This was my dhclient.conf:

    Code:
    option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
    
    send host-name "srv1";
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, domain-search, host-name,
            netbios-name-servers, netbios-scope, interface-mtu,
            rfc3442-classless-static-routes, ntp-servers;
    No specific interfaces are named in here. I had /etc/network/interfaces set up to assign a static IP to eth0 and use DHCP for eth1. As I said in an earlier post, I've been using this configuration for years and not had any problems. I guess dhclient was somehow aware of the interfaces file and worked accordingly, or perhaps it was just a fluke. Regardless, I think the kernel update I downloaded last week must have changed the way dhclient works and it is now completely ignorant of the interfaces file.

    The man page for dhclient.conf says that if you specify settings for an interface, it will ignore any interfaces not explicitly set up in dhclient.conf. What it doesn't say, what I've figured out based on a bit of trial and error, is that if there aren't any specific interfaces set up in dhclient.conf, it will apply those settings to all interfaces on the system.

    I manually ran dhclient and it assigned 58.32 to eth0.

    Then I changed dhclient.conf to read like this:
    Code:
    option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
    
    send host-name "srv1";
    interface "eth1"{
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, domain-search, host-name,
            netbios-name-servers, netbios-scope, interface-mtu,
            rfc3442-classless-static-routes, ntp-servers;
    }
    Now it specifically mentions eth1 and nothing else.

    I manually ran dhclient and it didn't reconfigure eth0. It left it alone and happy with it's static IP.

    So I think what's been happening is the lease for eth1 was running out about every 24 hours and dhclient was kicking on to renew it. Since no specific interface is mentioned in dhclient.conf, it was configuring every interface on the system, rather than just eth1.

    I'll see how it does tonight and if all is well tomorrow, I'll mark this thread as solved.

  9. #29
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: eth0 set to static but requesting DHCP anyway

    Quote Originally Posted by deadtom View Post
    I think I may have sorted it out.

    This was my dhclient.conf:

    Code:
    option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
    
    send host-name "srv1";
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, domain-search, host-name,
            netbios-name-servers, netbios-scope, interface-mtu,
            rfc3442-classless-static-routes, ntp-servers;
    No specific interfaces are named in here. I had /etc/network/interfaces set up to assign a static IP to eth0 and use DHCP for eth1. As I said in an earlier post, I've been using this configuration for years and not had any problems. I guess dhclient was somehow aware of the interfaces file and worked accordingly, or perhaps it was just a fluke. Regardless, I think the kernel update I downloaded last week must have changed the way dhclient works and it is now completely ignorant of the interfaces file.

    The man page for dhclient.conf says that if you specify settings for an interface, it will ignore any interfaces not explicitly set up in dhclient.conf. What it doesn't say, what I've figured out based on a bit of trial and error, is that if there aren't any specific interfaces set up in dhclient.conf, it will apply those settings to all interfaces on the system.

    I manually ran dhclient and it assigned 58.32 to eth0.

    Then I changed dhclient.conf to read like this:
    Code:
    option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
    
    send host-name "srv1";
    interface "eth1"{
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, domain-search, host-name,
            netbios-name-servers, netbios-scope, interface-mtu,
            rfc3442-classless-static-routes, ntp-servers;
    }
    Now it specifically mentions eth1 and nothing else.

    I manually ran dhclient and it didn't reconfigure eth0. It left it alone and happy with it's static IP.

    So I think what's been happening is the lease for eth1 was running out about every 24 hours and dhclient was kicking on to renew it. Since no specific interface is mentioned in dhclient.conf, it was configuring every interface on the system, rather than just eth1.

    I'll see how it does tonight and if all is well tomorrow, I'll mark this thread as solved.
    Fingers crossed.

  10. #30
    Join Date
    Apr 2008
    Location
    Missoula, MT USA
    Beans
    137
    Distro
    Kubuntu

    Re: eth0 set to static but requesting DHCP anyway

    Working fine now. Finally.

Page 3 of 3 FirstFirst 123

Tags for this Thread

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
  •