Ubuntu
Installation
sudo apt-get install vlan
sudo su -c 'echo "8021q" >> /etc/modules'
sudo modprobe 8021q
Usage and Configuration
# adding a vlan to a network interface:
ip link add link eth0 name eth0.10 type vlan id 10
# configuring the vlan:
ip addr add 10.0.0.1/24 brd 10.0.0.255 dev eth0.10
ip link set dev eth0.10 up
Make it permanent by adding the following lines to /etc/network/interfaces :