United States (change)
Shortcuts: Downloads Fedora Red Hat Network
It is possible to configure VLAN devices over a bond interface using the 8021q driver.
This assumes the machine has two network interfaces eth0 and eth1, and also that the VLAN ID is 2.
First, check whether the 8021q module has been loaded.
lsmod | grep 8021q
If the 8021q module is not loaded, run the following command to load it:
modprobe 8021q
Create the bond configuration ifcfg-bond0 in /etc/sysconfig/network-scripts.
DEVICE=bond0
TYPE=Bonding
BOOTPROTO=none
ONBOOT=yes
IPADDR=0.0.0.0
NETMASK=0.0.0.0
USERCTL=no
MII_NOT_SUPPORTED=yes
Modify the network interface configuration of eth0 and eth1 in /etc/sysconfig/network-scripts. Replace N with the number of the device.
DEVICE=ethN
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
Create the VLAN interface configuration in /etc/sysconfig/network-scripts. The configuration filename should be the bond configuration name plus the VLAN num. If the VLAN ID is 2, and the bond interface is bond0, then the configuration filename should be ifcfg-bond0.2.
DEVICE=bond0.2
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.1
NETMASK=255.255.255.0
USERCTL=no
MII_NOT_SUPPORTED=yes
VLAN=yes
Add the following content to /etc/modprobe.conf:
install bond0 /sbin/modprobe bonding -o bond0 miimon=100 mode=0
Lastly, restart network service and the bond should be working.
service network restart