Linux - VLAN
Alasta 17 Mars 2014 linux bash CentOS cli Network Linux Open Source Serveur shell
Description : Configuration de VLAN.
Configuration :
Il faut éditer le fichier de configuration de l'interface :
# vi /etc/sysconfig/network-scripts/ifcfg-ethX.ID_VLAN #il faut modifier la variable DEVICE et ajouter VLAN=yes DEVICE="ethX.ID_VLAN" BOOTPROTO="none" IPV6INIT="no" MTU="1500" ONBOOT="yes" VLAN=yes TYPE="Ethernet"
Redémarrer le service réseau
# service network restart
Affichage :
Visualiser les VLANs sur le serveur :
# cat /proc/net/vlan/config VLAN Dev name | VLAN ID Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD eth0.111 | 111 | eth0
# cat /proc/net/vlan/eth0.111 eth0.111 VID: 111 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 6 total bytes transmitted 468 total headroom inc 0 total encap on xmit 0 Device: eth0 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 EGRESS priority mappings: