VLAN

Gentoo
modprobe 8021q emerge -av net-misc/vconfig

Debian/Ubuntu
modprobe 8021q apt-get install vlan

Manual
vconfig add eth0 2 ifconfig eth0.2 10.0.2.1/24

where 2 is the VID.

Gentoo
 vlans_eth0="1 2" config_vlan1="10.0.1.1 netmask 255.255.255.0" config_vlan2="10.0.2.1 netmask 255.255.255.0"

Debian/Ubuntu
 auto eth0.1 iface eth0.1 inet static address 10.0.1.1 netmask 255.255.255.0 vlan-raw-device eth0

auto eth0.2 iface eth0.2 inet static address 10.0.2.1 netmask 255.255.255.0 vlan-raw-device eth0