VLAN Support in Linux VLAN support requires a kernel compiled
with CONFIG_VLAN_8021Q and the vlan userland package (I suggest
you also enable CONFIG_BRIDGE_EBT_VLAN so you can match VIDs in
ebtables rules). Use the vconfig tool to create virtual VLAN
interfaces based on the combination of a physical Ethernet
interface and a specific VLAN ID. These interfaces can be used
like any other Ethernet interface on your system. Run the
following commands to add a new interface associated with eth0
and VID 5: vconfig add eth0 5 ip link set eth0.5 up This will
create the virtual interface eth0.5, which will have the
following special VLAN-specific behaviors: Packets sent from
eth0.5 will be Tagged with VID 5 and sent from eth0. Packets
received on eth0 Tagged with VID 5 will show up on eth0.5 as
normal (that is, Untagged) packets. Only packets that were
Tagged with VID 5 will arrive on the virtual VLAN interface. The
biggest difference between Linux and an off-the-shelf VLAN
switch is that Linux can participate as a hos