miércoles, 22 de diciembre de 2010

Linux - vlan config red hat

Para crear un dispositivo tipo eth0.115 donde se lleva un trunk al eth0 de N redes, hay que hacer lo siguiente.
Adaptamos el fichero de config relacionado con el adaptador ethX donde le lllega el trunk.

DEVICE=eth0 # use real interface name here
BOOTPROTO=static 
HWADDR=AA:17:31:9C:8D:BC # use real MAC address here 
ONBOOT=no 
TYPE=Ethernet 
IPADDR=0.0.0.0 
NETMASK=255.255.255.0 

Una vez tenemos el interface configurado, creamos el fichero de config del adaptador virtual que switchea con la VLAN. Por ejemplo: eth0.115 /etc/sysconfig/network-scripts/ifcfg-eth0.115 VLAN=yes 
DEVICE=eth0.115 
BOOTPROTO=static 
ONBOOT=yes 
TYPE=Ethernet 
IPADDR=10.1.1.1 
NETMASK=255.255.255.0

Si hacemos el ifup del eth0.115 ya estara funcionando. Para comprobarlo nada mejor que un tcpdump -nei eth0.115 y lanzar un ping hacia esta máquina.

Más info: http://www.mysidenotes.com/2008/01/30/vlan-configuration-on-fedora-core-red-hat-centos/


No hay comentarios:

Publicar un comentario