VLan : Différence entre versions
De Wiki NCad
(→Créer un VLan) |
(→Création d'une interface virtuelle) |
||
Ligne 15 : | Ligne 15 : | ||
* Ajout d'une interface virtuelle sur le port eth0 avec l'ID 2 : | * Ajout d'une interface virtuelle sur le port eth0 avec l'ID 2 : | ||
{{ Box Console | objet=sudo vconfig add eth0 2}} | {{ Box Console | objet=sudo vconfig add eth0 2}} | ||
+ | |||
+ | === Activation au démarrage du routeur === | ||
+ | |||
+ | * Il faut éditer le fichier de configuration /etc/network/interfaces et y ajouter les informations suivantes : | ||
+ | |||
+ | auto eth0 eth0.2 | ||
+ | [...] | ||
+ | |||
+ | # VLAN eth0.2 sur l'interface eth0 | ||
+ | iface eth0.2 inet static | ||
+ | address 10.0.0.0 | ||
+ | netmask 255.255.255.224 | ||
+ | vlan_raw_device eth0 | ||
+ | |||
+ | $ sudo ifup eth0.2 |
Version du 17 avril 2012 à 09:53
Sommaire
Créer un VLan
RFC 802.1Q
Installation
|
Activation du module
|
Création d'une interface virtuelle
- Ajout d'une interface virtuelle sur le port eth0 avec l'ID 2 :
|
Activation au démarrage du routeur
- Il faut éditer le fichier de configuration /etc/network/interfaces et y ajouter les informations suivantes :
auto eth0 eth0.2 [...] # VLAN eth0.2 sur l'interface eth0 iface eth0.2 inet static address 10.0.0.0 netmask 255.255.255.224 vlan_raw_device eth0 $ sudo ifup eth0.2