First, check to see whether NIC supports 802.1Q
If yes, install VLAN support to Ubuntu:
sudo apt-get install vlan
Edit your /etc/network/interfaces file so it would contain the following:
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
auto vlan11
auto vlan22
# VLAN 11
iface vlan11 inet static
address x.x.x.x
netmask x.x.x.x
vlan_raw_device eth0
# VLAN 22
iface vlan5 inet static
address 172.16.0.1
netmask 255.255.255.0
vlan_raw_device eth0
Restart your network interface:
sudo /etc/init.d/networking restart
Done. If you connects that Ubuntu to a switch via trunk link, it can serve multiple VLANs same as the routers do.
No comments:
Post a Comment