10.6. VLAN on Bond and Bridge Using ip Commands
To use VLANs over bonds and bridges, proceed as follows:
- Add a bond device as
root
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set VLAN on the bond device:
ip link add link bond0 name bond0.2 type vlan id 2 ip link set bond0.2 up
# ip link add link bond0 name bond0.2 type vlan id 2 # ip link set bond0.2 up
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the bridge device and attach VLAN to it:
ip link add br0 type bridge ip link set bond0.2 master br0 ip link set br0 up
# ip link add br0 type bridge # ip link set bond0.2 master br0 # ip link set br0 up
Copy to Clipboard Copied! Toggle word wrap Toggle overflow