Create VLAN bridge under Linux (trunk, IEEE 802.1Q)

# install required package
apt-get install -y vlan
 
# /etc/network/interfaces
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet manual
 
auto br0
iface br0 inet static
    address 10.0.6.12
    netmask 255.255.255.0
    gateway 10.0.6.1
    dns-nameservers 10.0.0.100 10.0.1.101
    dns-search example.com
    dns-domain example.com
    bridge_ports eth0
 
 
# VLAN 10
auto vlan10
iface vlan10 inet manual
    vlan-raw-device br0
 
auto br10
iface br10 inet manual
    bridge_ports vlan10
 
 
# VLAN 22
auto vlan22
iface vlan22 inet manual
    vlan-raw-device br0
 
auto br22
iface br22 inet manual
    bridge_ports vlan22
    bridge_stp off
    bridge_maxwait 0
    bridge_fd 0
 
# remove vlan
vconfig rem vlan22
 
# Links
http://www.microhowto.info/howto/configure_an_ethernet_interface_as_a_vlan_trunk_on_debian.html