08 May, 2014

Vlan bridge on Ubuntu Linux

I have 4 VLANs:
40 (192.168.40.0/24)
41 (192.168.41.0/24)
42 (192.168.42.0/24)
43 (192.168.43.0/24)
114 (no ip subnet assigned)

A client in VLAN 114 needs Layer2 access to all VLANs from 40 to 43.
A solution is to build a Ubuntu Linux based network bridge that bridges all VLANs (40,41,42,43,114) together.

Ubuntu prepare:
apt-get install bridge-utils
apt-get install vlan
modprobe 8021q
sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules'
brctl addbr br0

Ubuntu network configuration:

/etc/network/interfaces:
# BRIDGE INTERFACE
auto br0
iface br0 inet manual
bridge_ports eth1.40 eth1.41 eth1.42 eth1.43 eth1.114
bridge_stp off
bridge_maxwait 0
bridge_fd 0

# TRUNK dot1Q
auto eth1
iface eth1 inet manual
auto eth1.40
iface eth1.40 inet manual
auto eth1.41
iface eth1.41 inet manual
auto eth1.42
iface eth1.42 inet manual
auto eth1.43
iface eth1.43 inet manual
auto eth1.114
iface eth1.114 inet manual

No comments:

Post a Comment