Vlan ubuntu

Solo disponible en BuenasTareas
  • Páginas : 2 (396 palabras )
  • Descarga(s) : 0
  • Publicado : 9 de febrero de 2010
Leer documento completo
Vista previa del texto
VLAN configuration on Ubuntu (Debian)
Here is a quick guide how to enable VLANs on Ubuntu or Debian box.
VLANs on Linux will work with the most of the modern ethernet adapters. Frankly speaking Ihave not came across of adapter it would not work with.
I presume that you use standard kernel shipped with Ubuntu. However, if you use a custom built kernel make sure VLAN support is enabled in it.In this example I want my computer to connect to vlan4,vlan5 and vlan101. My default gateway is in vlan101. And I have only one ethernet interface eth0.
Note: If you want to connect to only one VLANor you have many network interfaces it is possible to do as well.
OK, now how to do this:
1. Install VLAN package on your computer:
sudo apt-get install vlan
2. Edit your /etc/network/interfacesfile 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 activatedautomatically by the hotplug subsystem.
auto vlan4
auto vlan5
auto vlan101
# VLAN 4
iface vlan4 inet static
address 192.168.0.8
netmask 255.255.255.192
network 192.168.0.0
broadcast 192.168.0.63
mtu1500
vlan_raw_device eth0
# VLAN 5
iface vlan5 inet static
address 10.0.111.8
netmask 255.255.255.0
network 10.0.111.0
broadcast 10.0.111.255
mtu 1500
vlan_raw_device eth0
# VLAN 101
ifacevlan101 inet static
address 172.12.101.8
netmask 255.255.255.0
network 172.12.101.0
broadcast 172.12.101.255
gateway 172.12.101.1
mtu 1500
vlan_raw_device eth0
Note: You have to replace my IPaddresses, network masks and gateway IP address with your own.
3. Make sure that switch interface you are connected to configured with respective VLANs.
4. Restart your network interface:
sudo/etc/init.d/networking restart
You should see something like:
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 4 to IF -:eth0:-
Set name-type for...
tracking img