1.installation
sample:ubuntu
apt-get install vlan
modprobe 8021q
2. create subinterface eth0.100 belong to vlan 100,eth0.200 belong to vlan 200
vconfig add eth0 100
vconfig add eth0 200
3. make host use vlan interface
ifconfig eth0.100 192.168.100.1
ping 192.168.100.254
tcpdump -i eth0 -nn -e
root@xiaotech-desktop:~# tcpdump -i eth0 -nn -e arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:33:01.043090 30:0e:d5:1a:97:4d > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46:vlan 100, p 0, ethertype ARP, Request who-has 192.168.100.100 tell 192.168.100.1, length 28
08:33:02.041380 30:0e:d5:1a:97:4d > ff:ff:ff:ff: