There’s another way to create vlan interfaces with Debian/Ubuntu. It’s even shorter than the previous example. Just add the following to /etc/network/interfaces:
auto eth0.10 iface eth0.10 inet static addres 10.0.0.2 netmask 255.255.255.0 gateway 10.0.0.1
Just make sure you dit ‘apt-get install vlan’ or something like that.