sudo apt-get install vlanFirst test your configuration from the command line.
# modprobe 8021q # vconfig add eth0 100 # dhclient eth0.100Or if you are using a bridge for Virtual Machines.
# modprobe 8021q # vconfig add br0 100 # dhclient br0.100Then make your changes permanent by editing /etc/network/interfaces. Make sure to add 8021q to /etc/modules
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # add home network VLAN 100 auto eth0.100 iface eth0.100 inet dhcp # remove the default route to the new VLAN up route del default dev eth0.100Then execute
sudo invoke-rc.d networking restartMake sure you have physical access to the machine so that if something goes wrong you can still change your network settings.
I had an issue where DHCP would assign a second default gateway to my VLAN interface. This caused issues with my network setup. My solution was to remove the new default route after the interface was up. I added this code to the end of my interface file.
up route del default dev eth0.100You can verify that the route is removed with "route -n".