can not add vlans to a bond network device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
I did this with Ubuntu Jaunty beta with all the updates as of 3/31/2009.
I have a computer with two nics and a switch that supports 802.3ad link aggregation (lag) and vlans. I can use lag and I can use vlans with Ubuntu on the computer, but I can not use both with each other at the same time. I know this is possible to do because it works fine with VMWare ESX Server on the computer with vlan trunking on top of 802.3ad bonded nics.
Setting up vlan trunking of vlans 101 and 102 works with this configuration in /etc/network/
---
auto eth0.101
iface eth0.101 inet dhcp
auto eth0.102
iface eth0.102 inet dhcp
---
Removing vlans and setting up 802.3ad link aggregation on the switch works with this configuration:
---
auto bond0
iface bond0 inet dhcp
slaves all
bond-mode 4
bond-miimon 100
---
But setting up vlan trunking on the switch over the lag device does not work with this configuration:
---
auto bond0.101
iface bond0.101 inet dhcp
slaves all
bond-mode 4
bond-miimon 100
---
When I bring up the device I get this error: "ERROR: trying to add VLAN #101 to IF -:bond0:- error: Operation not supported". Some reading and googling around suggests that this error is because the vlan is trying to be created before the bond device is created.
It would only make sense that you could combine the vlan and bonding configurations and have it work as expected. This is a configuration that has huge advantages in a high-availability virtualization environment.
I think it's because "slaves all" tries to include the vlan interface itself. Could you try explicitly listing the devices you want to bond and see if that fixes it? If it does, I have a patch that should fix it.