====== VLAN ====== ===== Liens ===== * http://www.linux-france.org/prj/inetdoc/cours/routage.inter-vlan/routage.inter-vlan.intro.vlan.html * http://www.candelatech.com/pipermail/vlan/2005-April/000372.html * http://marc.info/?m=105098558615614 * http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch08_:_Configuring_the_DHCP_Server * http://smhteam.info/wiki/index.linux.php5?wiki=DHCP ==== Creer VLAN ==== Sur interface ''eth1'' # ifconfig eth1 0.0.0.0 up # vconfig add eth1 # vconfig add eth1 Suivre les communications: # tshark -i eth1 vlan ou # tcpdump -i eth1 # tcpdump -i eth1 vlan ==== Mettre une IP ==== # ifconfig eth1.NUMERO_VLAN 192.168.1.2 netmask 255.255.255.0 ==== corriger ARP ==== Sur un autre poste, on peut constater que plusieurs interfaces repondent aux requetes ARP... pas bien pour nos tests: # arping 192.168.1.2 ARPING 192.168.1.2 60 bytes from 00:50:xx:xx:a8:31 (192.168.1.2): index=0 time=475.883 usec 60 bytes from 00:01:yy:yy:d5:98 (192.168.1.2): index=1 time=588.894 usec 60 bytes from 00:50:xx:xx:a8:31 (192.168.1.2): index=2 time=307.083 usec 60 bytes from 00:01:yy:yy:d5:98 (192.168.1.2): index=3 time=344.038 usec Sur la machine 'vlan' : # echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore Ou dans: ''/etc/sysctl.conf'' ... net.ipv4.conf.all.arp_ignore = 1 | :!: ca serait pas plutot: **''net.ipv4.conf.default.arp_ignore=1''** | Et puis, pour appliquer les changements immediatements: # sysctl -p ==== Classe d'IP ==== Dans ''/etc/network/interface'' : #auto eth1 iface eth1 inet static address 10.18.5.66 netmask 255.255.255.192 Et puis: route add -net 10.18.5.0 netmask 255.255.255.0 gw 10.18.5.65 ===== Tips ===== ==== tcpdump ==== Afficher le VLAN sur un port en 8021q: # tcpdump -e -n -i ... ..., ethertype 802.1Q (0x8100), length 68: vlan 123,... ...