Bonded interfaces donlt seem to work with DHCP
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/
> 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/
> 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.
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.