I am running Ubuntu 11.10 32bit Server on a single-board computer. I want the option of using the Ethernet interface (eth0
) as a backend to control the computer if it's connected. I'm also lazy: if the cable is plugged in and I power the computer, I want eth0 up and running; in the event no cable is plugged in to eth0 upon powerup, I would like to be able to significantly reduce time it takes to bring eth0
`up' during boot.
I had thought that simply changing the DHCP timeout
value to something small would do the job, but even after editing the /etc/dhcp/dhclient.conf
, I still get the same long boot times when the cable is unplugged.
I understand the value of a robust bootup sequence for servers (see top answer for [1]), but I don't understand why changes to dhclient.conf
are ignored during boot. Is there anything else going on under the hood that I'm not aware of? Perhaps I'm approaching the problem the wrong way (in which case I might need to ask a different question!)?
Thanks in advance for any input.
My /etc/network/interfaces
file contains:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
...
My /etc/dhcp/dhclient.conf
file has uncommented and changed the line:
timeout 5;
[1] "Waiting for network configuration" adding 3 to 5 minutes to boot time
It is unclear if plugging/unplugging an Ethernet cable is considered a hotplug event (as opposed to adding/removing a wireless USB dongle, which is). My reference, which might be a tad dated, is: http://lists.debian.org/debian-doc/2008/02/msg00010.html
– Jeffrey Wildman Feb 22 '12 at 14:51allow-hotplug
again, this time withifplugd
, and it works. Wheneth0
is configured asallow-hotplug
, it is not started by/e/init.d/networking
, avoiding the DHCP timeout issues.ifplugd
will then configureeth0
at boot if a cable is plugged in.So, I've got a method to accomplish what I want, but the original question still irks me, is
– Jeffrey Wildman Feb 22 '12 at 16:11dhclient.conf
being ignored during boot?