Bonded interfaces donlt seem to work with DHCP

Bug #63988 reported by Nate Sanders
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Machine: Dapper 6.06.1

There appears to be a problem with Dapper that prevents it from bringing up a bonded interface with DHCP. It works just fine if you define a static IP, but I wish to hand out static address from a DHCP server.

The problem is that the following does not work:

/etc/network/interfaces
> iface bond0 inet dhcp
> slaves eth0 eth1

When you restart networking, the dhcp portion will hang and then timeout.

But, if you define an IP manually it works fine:

/etc/network/interfaces
> iface bond0 inet static
> address 100.100.100.100
> netmask 255.255.255.0
> gateway 100.100.100.1
> slaves eth0 eth1

What seems to be happening is this. If you manually configure the bonded interface from the command line you will notice you can ONLY get a dhcp IP address once the slaves have been enslaved.

# ifconfig bond0 up
# dhclient bond0
........this will time out

If you do this, it will work

# ifconfig bond0 up
# ifenslave bond0 eth0 eth1
# dhclient bond0

So, it appears that the ifupdown scripts are trying to request an IP address via DHCP before the slaves have been enslaved. I tried to resolve this using a pre-up script and had no success. I have only been able to get this to work using a static IP.

Revision history for this message
Jerome Haltom (wasabi) wrote :

I also ran into this. Your assessment seems correct.

As a temporary stop gap, you can configure the following in network/interfaces:

iface bond0 inet dhcp
  pre-up modprobe bonding
  pre-up ifconfig bond0 down || exit 0
  pre-up ifenslave -d bond0 eth0 || exit 0
  pre-up ifenslave -d bond0 eth1 || exit 0
  pre-up ifconfig bond0 up
  pre-up ifenslave bond0 eth0 eth1
  post-down ifconfig bond0 down

This is basically just doing the work that enslave's ifup/down plugins should do, on your own.

Changed in ifupdown:
status: Unconfirmed → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this issue and help to improve Ubuntu.

Because network device initialization is fully event-driven in Ubuntu 10.04 LTS and beyond, you must declare separate stanzas for each of your physical devices and set 'bond-slaves none' in the bonded interface stanza. /usr/share/doc/ifenslave-2.6/examples/two_hotplug_ethernet provides an example of this.

This is documented in the release notes for Ubuntu 10.04 LTS at <https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Bonded%20network%20interfaces%20must%20use%20hotplug-style%20configuration>.

Changed in ifupdown (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.