03 November 2010

802.11q tagging in Ubuntu

Install the userspace tool
sudo apt-get install vlan

load the module
sudo modprobe 8021q

Create the vlan interface
sudo vconfig add eth0 10

Assign an IP address if required
sudo ifconfig eth0.10 netmask
or sudo ip address dev eth0.10 label eth0.10
The label keyword is necessary for the interface to show up in ifconfig

add the module 8021q to load at boot time
nano /etc/modules

Make IP configuration permanent
nano /etc/network/interfaces and add

auto eth0.10
iface eth0.10 inet static
vlan-raw-device eth0 (ignored if raw device specified in interface name as above)

To bring up interface without IP address
auto eth0.10
iface eth0.10 inet manual
up ifconfig eth0.10 up

No comments:

Post a Comment