User Tools

Site Tools


admin:tpvlan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
admin:tpvlan [2020/02/13 11:11] – created oreladmin:tpvlan [2024/03/18 15:06] (current) – external edit 127.0.0.1
Line 11: Line 11:
    
  
-Configuration de syl :+==== Première Partie ===== 
 + 
 +**Configuration de syl (vlan 100)** :
  
 <code bash> <code bash>
 +ifconfig eth0 192.168.100.2/24
 +route add default gw 192.168.100.1
 </code> </code>
  
-Configuration de syl :+**Configuration de opeth (vlan 200)** :
  
 <code bash> <code bash>
 +ifconfig eth0 192.168.200.2/24
 +route add default gw 192.168.200.1
 </code> </code>
  
 +**Configuration de immortal** :
  
 +<code bash>
 +# vlan 100 & 200
 +ifconfig eth0 up
 +vconfig add eth0 100
 +vconfig add eth0 200
 +ifconfig eth0.100 192.168.100.1/24
 +ifconfig eth0.200 192.168.200.1/24
 +echo 1 > /proc/sys/net/ipv4/ip_forward
 +</code>
 +
 +Version moderne de vconfig : 
 +
 +<code>
 +ip link add link eth0 name eth0.100 type vlan id 100 
 +</code>
 +
 +**Configuration du switch s1** :
 +
 +<code bash>
 +vlan/create 100
 +vlan/create 200
 +port/setvlan 1 100   # untagged
 +port/setvlan 2 200   # untagged
 +vlan/addport 100 3   # tagged
 +vlan/addport 200 3   # tagged
 +</code>
 +
 +
 +**Nota Bene** : Pour tester le bon fonctionnement, on peut utiliser la commande tcpdump avec l'option -e (ethernet).
 +
 +
 +==== Deuxième Partie : Trunking =====
 +
 +**Configuration de nile (vlan 100)** :
 +
 +<code bash>
 +ifconfig eth0 192.168.100.3/24
 +route add default gw 192.168.100.1
 +</code>
 +
 +**Configuration de grave (vlan 200)** :
 +
 +<code bash>
 +ifconfig eth0 192.168.200.3/24
 +route add default gw 192.168.200.1
 +</code>
 +
 +
 +**Configuration du switch s1** :
 +
 +<code bash>
 +# ...
 +vlan/addport 100 21
 +vlan/addport 200 21
 +</code>
 +
 +
 +**Configuration du switch s2** :
 +
 +<code bash>
 +vlan/create 100
 +vlan/create 200
 +port/setvlan 1 100
 +port/setvlan 2 200
 +vlan/addport 100 21
 +vlan/addport 200 21
 +</code>
  
  
  
admin/tpvlan.1581592314.txt.gz · Last modified: 2024/03/18 15:04 (external edit)