VLAN tagging
Debian / grml / ....
http://www.microhowto.info/howto/configure_an_ethernet_interface_as_a_vlan_trunk_on_debian.html
https://askubuntu.com/questions/660506/how-to-setup-and-save-vlans-on-ethernet
1- install the package
2- add new inteface like eth0.50 ( /etc/network/interfaces)
sudo apt-get install vlan
#sudo modprobe 8021q
#sudo su -c 'echo "8021q" >> /etc/modules' #to make it permanent
sudo ip addr add 10.0.0.1/24 dev eth0.100
or: /etc/network/interfaces
auto eth0.50
iface eth0.2 inet static
address 192.168.2.1
netmask 255.255.255.0
CentOS / Fedora / RedHat
https://sites.google.com/site/ghidit/how-to-2/configure-vlans-on-centos
1- modify the "main" interfac ( untagged)
2- create the tagged interface
/etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82546EB Gigabit Ethernet Controller (Copper)
DEVICE=eth0
HWADDR=00:04:xx:xx:xx:xx
ONBOOT=yes
HOTPLUG=no
BOOTPROTO=none
TYPE=Ethernet
IPV6INIT=no
IPV6_AUTOCONF=no
/etc/sysconfig/network-scripts/ifcfg-eth0.10
# Intel Corporation 82546EB Gigabit Ethernet Controller (Copper)
DEVICE=eth0.10
HWADDR=00:04:xx.xx.xx.xx
ONBOOT=yes
HOTPLUG=no
BOOTPROTO=none
TYPE=Ethernet
VLAN=yes
IPADDR=86.X.X.X
NETMASK=255.255.X.X
Now it's time to start the interfaces. This can be done manually, using /sbin/ifup:
/sbin/ifup eth0
/sbin/ifup eth0.10
Or by using /sbin/service:
/sbin/service network restart