[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/network/interfaces file ?



On 12/21/06, Joey Hess <joeyh@debian.org> wrote:
stevendemetrius wrote:
> The issue is that "allow-hotplug eth0" does *not* work while "auto eth0"
> does work! If "allow-hotplug" is used then "dhclient" has to be run
> manually in order for eth0 to get its IP related settings.

I've investigated this for a few hours today, and if you have any
systems that fail to bring up the interface with "allow-hotplug eth0",
and no "auto eth0", I'm curious about what situations cause it to fail.

So far the only situations I've been able to find where allow-hotplug
fails are:
* Long (> 2 minutes) fscks of the root filesystem during boot.
* Hard powercycles / hard reboots.

I've filed bugs for both of those, and it seems that it should work in
other situations, but perhaps I've missed other failure modes.


Hey Joey!

I'm coming into the middle of this conversation with no knowledge of the rest of the thread. The subject line caught my eye after having some grief with networking on a fresh install of Sid on a Toshiba Satellite laptop.

With this fresh install I've noticed the "allow-hotplug" line for the first time. I don't know what it does (and I thought hotplug had been deprecated in favor of devfs, or something (you can see I'm very hazy on these topics)), but I guessed that it allowed the system to monitor if a network cable was plugged in or not, so I did five minutes worth of experimentation that may or may not be relevant to this thread.

If I stop the network, and have the following:
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
and then unplug the network cable and then run "/etc/init.d/networking start", I see six or seven attempts to get a DHCP address, with it finally failing. (I would have expected the system to see that the network cable was unplugged and therefore not even bother trying to get a DHCP address - I reckon that expectation is wrong.) ifconfig shows no IP address assigned to eth0.

Then, if I plug in the network cable, I see a message about sky2 and eth0 and the link being up at 100Mbps. ifconfig still shows no address. Running "/etc/init.d/networking restart" gets me an address.

If this is of value to you, great. If not, sorry for the wasted bandwidth. If you need more info/testing, holler.


--
Kent West
http://kentwest.blogspot.com
Reply to: