User Tools

Site Tools


admin:tpvlan

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
admin:tpvlan [2020/02/13 11:12] oreladmin:tpvlan [2021/02/04 14:28] orel
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 opeth :+**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 :+**Configuration de immortal** :
  
 <code bash> <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> </code>
  
-Configuration du switch s1 :+Version moderne de vconfig :  
 + 
 +<code> 
 +ip link add link eth0 name eth0.100 type vlan id 100  
 +</code> 
 + 
 +**Configuration du switch s1** :
  
 <code bash> <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> </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.txt · Last modified: 2024/03/18 15:06 by 127.0.0.1