Changes between Version 3 and Version 4 of TipAndDoc/network/vlan


Ignore:
Timestamp:
Apr 29, 2013 5:03:55 PM (12 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/network/vlan

    v3 v4  
    1212 > ※PVID とは、Port VLAN ID の意味で、ポートに設定されたPVID により、タグ無しのパケットを受信した場合、どのVLAN に送信するかを決定します。タグ付きのパケットを受信した場合は、PVID とは関係なくタグの送信するパケットのVLAN IDを参照し、送信先のVLAN を決定します。 
    1313 
     14 * VLAN ID 1 は多くのインテリジェントスイッチでマネージメント用に予約されているため、非推奨 
     15 * mitty@vlan-gw:~$ sudo vconfig add eth1 1 
     16{{{ 
     17Added VLAN with VID == 1 to IF -:eth1:- 
     18WARNING:  VLAN 1 does not work with many switches, 
     19consider another number if you have problems. 
     20}}} 
     21 
     22 = Bridging VLAN = 
     23 * 概念図[[br]][[Image(bridging-vlan.png,33%)]] 
     24 * 目的 
     25  * vlan-gwのeth0にL2で抜けるルートがvlan-node上に欲しい 
     26  * vlan-gwのeth0 <-> eth1で直接ブリッジするのは困る 
     27   * vlan-nodeNAPT下にある、など 
     28  * VLANにすることで、NICを増やしたりすることなく複数サブネットを得る 
     29 
     30 == make bridge on vlan-gw == 
     31 1. mitty@vlan-gw:~$ sudo vconfig add eth1 10 
     32{{{ 
     33Added VLAN with VID == 10 to IF -:eth1:- 
     34}}} 
     35  * mitty@vlan-gw:~$ ifconfig eth1.10 
     36{{{ 
     37eth1.10   Link encap:Ethernet  HWaddr 00:16:3e:3d:4f:ca 
     38}}} 
     39 1. mitty@vlan-gw:~$ sudo brctl addbr br-gw 
     40 1. mitty@vlan-gw:~$ sudo brctl addif br-gw eth1.10 
     41  * mitty@vlan-gw:~$ brctl show 
     42{{{ 
     43bridge name     bridge id               STP enabled     interfaces 
     44br-gw           8000.00163e3d4fca       no              eth1.10 
     45}}} 
     46  * mitty@vlan-gw:~$ ifconfig | grep addr 
     47{{{ 
     48br-gw     Link encap:Ethernet  HWaddr 00:16:3e:3d:4f:ca 
     49 
     50eth0      Link encap:Ethernet  HWaddr 00:16:3e:3d:4f:c9 
     51          inet addr:192.168.0.185  Bcast:192.168.0.255  Mask:255.255.255.0 
     52 
     53eth1      Link encap:Ethernet  HWaddr 00:16:3e:3d:4f:ca 
     54 
     55eth1.10   Link encap:Ethernet  HWaddr 00:16:3e:3d:4f:ca 
     56}}} 
     57 1. mitty@vlan-gw:~$ sudo brctl addif br-gw eth0 
     58  * このコマンドにより、eth0を通じて192.168.0.185でアクセスしている場合はいったん切断されるため、リモートから操作している場合などは注意 
     59  * mitty@vlan-gw:~$ brctl show 
     60{{{ 
     61bridge name     bridge id               STP enabled     interfaces 
     62br-gw           8000.00163e3d4fc9       no              eth0 
     63                                                        eth1.10 
     64}}} 
     65 1. mitty@vlan-gw:~$ sudo ifconfig eth0 0.0.0.0 
     66 1. mitty@vlan-gw:~$ sudo ifconfig br-gw 192.168.0.185 netmask 255.255.255.0 
     67 1. mitty@vlan-gw:~$ sudo ifconfig eth1.10 up 
     68 1. mitty@vlan-gw:~$ sudo ifconfig br-gw up 
     69 
     70 == add vlan nic on vlan-node == 
     71 1. mitty@vlan-node:~$ sudo vconfig add eth0 10 
     72{{{ 
     73Added VLAN with VID == 10 to IF -:eth0:- 
     74}}} 
     75 1. mitty@vlan-node:~$ sudo ifconfig eth0.10 192.168.0.13 netmask 255.255.255.0 
     76  * 上流(192.168.0.0/24)にdhcpdがあるのであればdhclientなどを使うことも出来る 
     77 1. mitty@vlan-node:~$ sudo ifconfig eth0.10 up 
     78  * mitty@vlan-node:~$ ifconfig | grep addr 
     79{{{ 
     80eth0      Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     81          inet addr:10.0.0.2  Bcast:10.255.255.255  Mask:255.0.0.0 
     82 
     83eth0.10   Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     84          inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0 
     85}}} 
     86  * vlan-gw:eth1 <-> vlan-node:eth0 は10.0.0.0/8 
     87 
     88 == check connection == 
     89 * mitty@vlan-node:~$ sudo tcpdump -i eth0.10 
     90{{{ 
     9104:35:02.147257 1c:c1:ww:xx:yy:zz > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 74: 192.168.0.102 > 192.168.0.13: ICMP echo request, id 1, seq 38, length 40 
     9204:35:02.147290 00:16:3e:d1:69:13 > 1c:c1:ww:xx:yy:zz, ethertype IPv4 (0x0800), length 74: 192.168.0.13 > 192.168.0.102: ICMP echo reply, id 1, seq 38, length 40 
     9304:35:03.149340 1c:c1:ww:xx:yy:zz > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 74: 192.168.0.102 > 192.168.0.13: ICMP echo request, id 1, seq 39, length 40 
     9404:35:03.149373 00:16:3e:d1:69:13 > 1c:c1:ww:xx:yy:zz, ethertype IPv4 (0x0800), length 74: 192.168.0.13 > 192.168.0.102: ICMP echo reply, id 1, seq 39, length 40 
     95}}} 
     96 * mitty@vlan-node:~$ sudo tcpdump -i eth0 
     97{{{ 
     9804:35:02.147257 1c:c1:ww:xx:yy:zz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.102 > 192.168.0.13: ICMP echo request, id 1, seq 38, length 40 
     9904:35:02.147293 00:16:3e:d1:69:13 > 1c:c1:ww:xx:yy:zz, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.13 > 192.168.0.102: ICMP echo reply, id 1, seq 38, length 40 
     10004:35:03.149340 1c:c1:ww:xx:yy:zz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.102 > 192.168.0.13: ICMP echo request, id 1, seq 39, length 40 
     10104:35:03.149376 00:16:3e:d1:69:13 > 1c:c1:ww:xx:yy:zz, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.13 > 192.168.0.102: ICMP echo reply, id 1, seq 39, length 40 
     102 
     10304:35:11.744387 00:16:3e:3d:4f:ca > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.0.0.2 tell 10.0.0.1, length 28 
     10404:35:11.744428 00:16:3e:d1:69:13 > 00:16:3e:3d:4f:ca, ethertype ARP (0x0806), length 42: Reply 10.0.0.2 is-at 00:16:3e:d1:69:13, length 28 
     10504:35:11.744471 00:16:3e:3d:4f:ca > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 98: 10.0.0.1 > 10.0.0.2: ICMP echo request, id 1165, seq 1, length 64 
     10604:35:11.744489 00:16:3e:d1:69:13 > 00:16:3e:3d:4f:ca, ethertype IPv4 (0x0800), length 98: 10.0.0.2 > 10.0.0.1: ICMP echo reply, id 1165, seq 1, length 64 
     10704:35:12.744806 00:16:3e:3d:4f:ca > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 98: 10.0.0.1 > 10.0.0.2: ICMP echo request, id 1165, seq 2, length 64 
     10804:35:12.744831 00:16:3e:d1:69:13 > 00:16:3e:3d:4f:ca, ethertype IPv4 (0x0800), length 98: 10.0.0.2 > 10.0.0.1: ICMP echo reply, id 1165, seq 2, length 64 
     109}}} 
     110 
     111 == dhcp on VLAN == 
     112 * mitty@vlan-node:~$ cat /etc/network/interfaces 
     113{{{ 
     114auto lo 
     115iface lo inet loopback 
     116 
     117auto eth0 
     118iface eth0 inet dhcp 
     119 
     120auto vlan10 
     121iface vlan10 inet dhcp 
     122        vlan-raw-device eth0 
     123}}} 
     124 * mitty@vlan-node:~$ ifconfig | grep addr 
     125{{{ 
     126eth0      Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     127 
     128vlan10    Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     129          inet addr:192.168.0.199  Bcast:192.168.0.255  Mask:255.255.255.0 
     130}}} 
     131  * eth0側にはIPが割り振られていない(期待通り) 
     132  * vlan10とeth0.10は同じ -> {{{man 5 vlan-interfaces}}} 
     133 
     134 * mitty@vlan-node:~$ sudo tcpdump -i eth0 
     135{{{ 
     136... 
     137 
     13805:01:18.183019 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     13905:01:28.750340 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     14005:01:43.031794 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     141 
     14205:02:02.942903 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     14305:02:02.944507 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 354: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 308 
     14405:02:02.944977 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     14505:02:02.947171 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 365: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 319 
     14605:02:03.125276 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Request who-has 192.168.0.1 tell 192.168.0.199, length 28 
     14705:02:03.125419 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 64: vlan 10, p 0, ethertype ARP, Reply 192.168.0.1 is-at 00:24:wx:yz:wx:yz, length 46 
     148 
     14905:02:22.984115 1c:c1:zz:yy:xx:ww > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 10, p 0, ethertype ARP, Request who-has 192.168.0.199 tell 192.168.0.102, length 46 
     15005:02:22.984148 00:16:3e:d1:69:13 > 1c:c1:zz:yy:xx:ww, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Reply 192.168.0.199 is-at 00:16:3e:d1:69:13, length 28 
     15105:02:22.984242 1c:c1:zz:yy:xx:ww > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.102 > 192.168.0.199: ICMP echo request, id 1, seq 42, length 40 
     15205:02:22.984275 00:16:3e:d1:69:13 > 1c:c1:zz:yy:xx:ww, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.199 > 192.168.0.102: ICMP echo reply, id 1, seq 42, length 40 
     15305:02:23.986581 1c:c1:zz:yy:xx:ww > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.102 > 192.168.0.199: ICMP echo request, id 1, seq 43, length 40 
     15405:02:23.986609 00:16:3e:d1:69:13 > 1c:c1:zz:yy:xx:ww, ethertype 802.1Q (0x8100), length 78: vlan 10, p 0, ethertype IPv4, 192.168.0.199 > 192.168.0.102: ICMP echo reply, id 1, seq 43, length 40 
     155}}} 
     156 * mitty@vlan-gw:~$ sudo tcpdump -i eth1 
     157{{{ 
     15804:57:01.612502 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     15904:57:04.284819 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     16004:57:12.426705 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     161 
     162... 
     163 
     16405:01:18.183048 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     16505:01:28.750367 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     16605:01:43.031819 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     167 
     16805:02:02.942934 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     16905:02:02.944491 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 354: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 308 
     17005:02:02.945004 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     17105:02:02.947157 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 365: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 319 
     17205:02:03.125309 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Request who-has 192.168.0.1 tell 192.168.0.199, length 28 
     17305:02:03.125410 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 64: vlan 10, p 0, ethertype ARP, Reply 192.168.0.1 is-at 00:24:wx:yz:wx:yz, length 46 
     174}}} 
     175 
     176 * 起動時、eth0側のdhcpタイムアウト待ちをするため、vlan10にIPが振ってくるまで2分ほど遅延する 
     177  * vlan-node:/etc/network/interfaces 
     178{{{ 
     179iface eth0 inet manual 
     180}}} 
     181  * などにするとよい 
     182 
     183 == dhcpd on another network == 
     184 * 概念図[[br]][[Image(bridging-vlan-with-dhcpd.png,33%)]] 
     185  * vlan-gw:eth1 <-> vlan-node:eth0 に192.168.1110/24でdhcpdを建てる 
     186  * mitty@vlan-gw:~$ sudo ifconfig eth1.10 down 
     187 
     188 * mitty@vlan-node:~$ cat /etc/network/interfaces 
     189{{{ 
     190auto lo 
     191iface lo inet loopback 
     192 
     193auto eth0 
     194iface eth0 inet dhcp 
     195 
     196auto vlan10 
     197iface vlan10 inet dhcp 
     198        vlan-raw-device eth0 
     199}}} 
     200 * mitty@vlan-node:~$ ifconfig | grep addr 
     201{{{ 
     202eth0      Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     203          inet addr:192.168.111.102  Bcast:192.168.111.255  Mask:255.255.255.0 
     204 
     205vlan10    Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     206}}} 
     207  * vlan-node:vlan10にはdhcpでIPが割り振られることはない(期待通り) 
     208 
     209 
     210 * mitty@vlan-gw:~$ sudo ifconfig eth1.10 up 
     211 * mitty@vlan-node:~$ ifconfig 
     212{{{ 
     213eth0      Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     214          inet addr:192.168.111.102  Bcast:192.168.111.255  Mask:255.255.255.0 
     215 
     216vlan10    Link encap:Ethernet  HWaddr 00:16:3e:d1:69:13 
     217          inet addr:192.168.0.199  Bcast:192.168.0.255  Mask:255.255.255.0 
     218}}} 
     219 * mitty@vlan-node:~$ sudo tcpdump -i eth0 
     220{{{ 
     22110:03:25.576221 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     22210:03:26.577102 00:1b:zz:yy:xx:ww > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 192.168.111.102.68: BOOTP/DHCP, Reply, length 300 
     22310:03:26.577404 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     22410:03:26.702221 00:1b:zz:yy:xx:ww > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 192.168.111.102.68: BOOTP/DHCP, Reply, length 300 
     225 
     22610:03:26.940715 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     22710:03:26.941123 00:1b:zz:yy:xx:ww > 00:16:3e:d1:69:13, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 192.168.111.102.68: BOOTP/DHCP, Reply, length 300 
     22810:03:26.942027 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 354: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 308 
     22910:03:26.942392 00:16:3e:d1:69:13 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:3e:d1:69:13, length 300 
     23010:03:26.942676 00:1b:zz:yy:xx:ww > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300 
     23110:03:26.944592 00:24:wx:yz:wx:yz > 00:16:3e:d1:69:13, ethertype 802.1Q (0x8100), length 365: vlan 10, p 0, ethertype IPv4, 192.168.0.1.67 > 192.168.0.199.68: BOOTP/DHCP, Reply, length 319 
     232}}} 
     233  * VLAN ID 10でのDHCP requestに対して、192.168.111.1のdhcpdがVLAN ID無しでreplayしている模様 
     234  * DHCPd(isc-dhcp-server)はtaggedかどうかを無視する? 
     235  * [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643564 #643564 - isc-dhcp-server: responds to vlan tagged packets on untagged interface - Debian Bug report logs] 
     236 
     237 = VLAN with VMware Workstation on Windows = 
     238 * WindowsはOSとしてはtag VLANに対応して居ない 
    14239 * [http://diary.sshida.com/20090208-2-diary.html vmware workstation は VLAN 非対応] 
    15240 > ホストOSで、Tag VLANを切って、その上で、vmware が対応するタグVLAN I/F をゲストOSに割り当てればよい。そういう意味では、ゲストOSからはTag VLANではなくて別インターフェースになる。 
    16241 > 使いにくいといえば使いにくい。特にWindowsホストOSの場合はWindows自体がTag VLAN に対応していないのでめんどう。Ethernetカード専用のドライバでの対応になる。 
    17242 * [http://communities.vmware.com/thread/259263 VMware Communities: Windows 7/vista and VLAN Tagging...] 
     243 
     244 * Windowsホスト上にVMware WorkstationでLinuxゲストを作り、仮想NICをブリッジしてVLAN deviceを作成しても、うまく疎通出来ない 
     245 
     246 * mitty@vmware:~$ ifconfig -a | grep addr 
     247{{{ 
     248eth0      Link encap:Ethernet  HWaddr 00:0c:29:4b:23:a8 
     249          inet addr:192.168.111.103  Bcast:192.168.111.255  Mask:255.255.255.0 
     250}}} 
     251 
     252 1. mitty@vmware:~$ sudo modprobe 8021q 
     253 1. mitty@vmware:~$ sudo vconfig add eth0 10 
     254{{{ 
     255Added VLAN with VID == 10 to IF -:eth0:- 
     256}}} 
     257 1. mitty@vmware:~$ sudo ifconfig eth0.10 up 
     258 1. mitty@vmware:~$ sudo dhclient eth0.10 
     259 
     260 * mitty@vmware:~$ sudo tcpdump -i eth0 
     261{{{ 
     26212:19:40.630473 00:0c:29:4b:23:a8 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:0c:29:4b:23:a8, length 300 
     26312:19:40.632184 00:1b:zz:yy:xx:ww > 00:0c:29:4b:23:a8, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 192.168.111.103.68: BOOTP/DHCP, Reply, length 300 
     26412:19:40.633118 00:24:wx:yz:wx:yz > 00:0c:29:4b:23:a8, ethertype IPv4 (0x0800), length 386: 192.168.0.161.1 > 192.168.0.180.68: BOOTP/DHCP, Reply, length 344 
     26512:19:43.020357 00:0c:29:4b:23:a8 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 10, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:0c:29:4b:23:a8, length 300 
     26612:19:43.021589 00:1b:zz:yy:xx:ww > 00:0c:29:4b:23:a8, ethertype IPv4 (0x0800), length 342: 192.168.111.1.67 > 192.168.111.103.68: BOOTP/DHCP, Reply, length 300 
     26712:19:43.022460 00:24:wx:yz:wx:yz > 00:0c:29:4b:23:a8, ethertype IPv4 (0x0800), length 386: 192.168.0.161.1 > 192.168.0.180.68: BOOTP/DHCP, Reply, length 344 
     268}}} 
     269  * requestはVLAN ID 10となっているが、replyはVLAN IDが無くなってしまっている 
     270 
     271 * mitty@vmware:~$ ifconfig -a | grep addr 
     272{{{ 
     273eth0      Link encap:Ethernet  HWaddr 00:0c:29:4b:23:a8 
     274          inet addr:192.168.111.103  Bcast:192.168.111.255  Mask:255.255.255.0 
     275 
     276eth0.10   Link encap:Ethernet  HWaddr 00:0c:29:4b:23:a8 
     277}}}