Configuring a VLAN device over a bonded interface on Red Hat Enterprise Linux
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Issue
802.1q VLANtagging not working properly- Need to do
802.1q VLANtagging or configure802.1q VLANinterfaces over a bonded interface.
Resolution
Note: There is a known issue in Red Hat Enterprise Linux 6.3, if this does not not apply, then continue with the following steps.
-
Any necessary bonding devices must be configured before continuing with the steps below. Check the output of
ifconfigto be sure. Please also note thatBONDING_OPTSgoes inifcfg-bondX.For example, bond0 with mode1.
# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 ONBOOT=yes BOOTPROTO=none USERCTL=no BONDING_OPTS="mode=1 miimon=100" -
Configure the VLAN interface in
/etc/sysconfig/network-scripts. The configuration file name should be the bondinterface (dot) VLAN ID number. So, if the VLAN ID is 2, and bond interface is bond0, then the configuration filename should beifcfg-bond0.2:# cat /etc/sysconfig/network-scripts/ifcfg-bond0.2 DEVICE=bond0.2 BOOTPROTO=none IPADDR=192.168.1.1 NETMASK=255.255.255.0 USERCTL=no VLAN=yes ONPARENT=yes -
[Optional] If multiple VLAN interfaces need to be configured, make a copy of the
ifcfg-bondX.Yexample from above, rename it, and edit the config file as necessary. Repeat as necessary for all VLANs on this bond:# cd /etc/sysconfig/network-scripts/ # cp ifcfg-bond0.2 ifcfg-bond0.<vlanID> # vi /etc/sysconfig/network-scripts/ifcfg-bond0.<vlanID> DEVICE=bond0.<vlanID> BOOTPROTO=none IPADDR=192.168.1.X NETMASK=255.255.255.0 USERCTL=no VLAN=yes ONPARENT=yes -
Restart networking:
# service network restart
For more information, the Red Hat Enterprise Linux 6 Deployment Guide covers, in detail, how to configure a VLAN over a bond.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.