[lug] DHCP and link status question

Landon Cox landon at 360vl.com
Tue Oct 4 10:24:36 MDT 2011

I've got what I hope is a quick question about network interfaces.

On Ubuntu 10.10 (at least), I've observed that the DHCP client will not request a new address when a live ethernet cable is jacked into the box if it has formerly had a valid DHCP address and has changed locations (different DHCP server or addressing scheme.)

If I ifconfig eth0, I see the former DHCP address on the interface even if the machine was powered down between the location moves.   No matter if I extract and reinsert the ethernet cable will it pull a new DHCP address.

However, if I:

dhclient -r

all is well.   Also, if I ifup or down, I can see DHCP get tickled - ifup does cause a good IP address to be acquired as well.  Also, once it's had a valid IP address on this new DHCP server, booting it from scratch it will come up on the same address and also be good.

If I unplug the ethernet cable, then:

dhclient -r

then plug the cable back in, it will not restore an address.

So, everything is basically working manually - it doesn't seem to invoke the DHCP client when it has lost or regained link on eth0 and/or booted on a new network. 

For eth0, the /etc/network/interfaces is set up:

auto eth0
iface eth0 inet dhcp

I've added pre-down and post-up directives to the interfaces (under the eth0 above), but doesn't seem to have any affect in the case the link status changes.

Any ideas for what configuration problem exists such that a link status change on eth0 does not automatically release and/or reacquire a DHCP address?  I want to not to have to do an ifdown/up or manually invoke dhclient to make this work...it should "just work."

Any tips or things to try would be appreciated,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20111004/3e6a3c1c/attachment.html>

More information about the LUG mailing list