“Waiting for network configuration” fix in Ubuntu

September 12, 2013

cat5_network_cableIf you have a laptop with Ubuntu system on it, which you take with you every now and then, you most likely encountered a pesky bug in the network setup. When booting from cold start the laptop starts to look for a connected ethernet cable, but when you are on the go, there is no such thing, thus it waits 3 minutes at the boot time before deciding to go without network. Many forums have some strange solutions to this problem, I found out what really is wrong, and how to EXACTLY fix it.

If you’re not interested in explanation and are here just for a quick fix ( badum, tshhh ), here’s what you need to do:

Your /etc/network/interfaces looks more or less like so:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    hwaddress ether 00:my:ad:dr:es:s0

You need to remove the offending line with dhcp in it and the hwaddress line too, so it will look like so:

auto lo
iface lo inet loopback

auto eth0

After next reboot without ethernet cable plugged in all will be good. Here’s why.

Ubuntu has two network interfaces setup mechanisms. First one is legacy /etc/network/interfaces, it is used by mostly servers that need the all-or-nothing approach to whether an interface is active at the boot time or not, to tell other programs which start at the boot time (like apache server) that there are some interfaces active for their use.

This method assumes dhcp auto-setup and that the cable is constantly plugged into the network adapter. When such thing is not available the dhcp auto-setup keeps on asking for configuration which is not there, thus the wait at the boot time when cable is not plugged in.

After these basics are figured out the next method starts and takes over.

The other method that is used in desktop, the icon with the connections that is in the upper right corner is based in /etc/udev/rules.d/70-persistent-net.rules file that is the part of the udev system. It basically says that if you will see a cable plugged into the computer then do the scan and setup a network interface. It’s more complex than that, but in a nutshell it’s what it does. It does not need the wait for setup information from cable to be “solid”. It just operates on “if there is something there let’s see what we can do with it” approach.

So basically the fix tells the basic method that “there is interface, but leave it alone”, so it does not hang on the wait and lets the udev system to do it’s magic.

It was a very annoying design bug, hope it shines some light on your setup too to make it all normal with your laptop.

7 Responses to ““Waiting for network configuration” fix in Ubuntu”

  1. nisvis Says:

    Thanks, it only worked for me

  2. MgS Says:

    I haven’t figured out why, but I’m seeing exactly this behaviour with a wired network connection on a server after upgrading to 12.10 and later versions.

    Somebody did something that botched network auto configuration but good – that feature’s been solid in various Linux versions I’ve used for years.

    First objective for me is to get a window manager that will work with VNC installed – the latest versions of Unity don’t work nicely over VNC at all … (and don’t work very nicely on my machine at all, come to that)

  3. Zot Says:

    So is there a way to change the hardware address permanently?

  4. Frank Says:

    Worked! As a novice I really appreciated your “Just Do This” approach. Thank You. Frank

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 147 other followers

%d bloggers like this: