Я создал интерфейс VLAN на своей виртуальной машине Ubuntu:
root@vagrant-ubuntu-trusty-64:~# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:2e:8d:5d
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe2e:8d5d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11689 errors:0 dropped:0 overruns:0 frame:0
TX packets:6208 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6404810 (6.4 MB) TX bytes:503856 (503.8 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:5b:5e:65
inet addr:192.168.1.12 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe5b:5e65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2099 errors:0 dropped:0 overruns:0 frame:0
TX packets:255 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:226325 (226.3 KB) TX bytes:17918 (17.9 KB)
eth1.100 Link encap:Ethernet HWaddr 08:00:27:2e:8d:5d
inet addr:10.0.2.20 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe2e:8d5d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:2286 (2.2 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:235 errors:0 dropped:0 overruns:0 frame:0
TX packets:235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26320 (26.3 KB) TX bytes:26320 (26.3 KB)
root@vagrant-ubuntu-trusty-64:~# ip -d link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:2e:8d:5d brd ff:ff:ff:ff:ff:ff promiscuity 0
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:5b:5e:65 brd ff:ff:ff:ff:ff:ff promiscuity 0
5: eth1.100@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
link/ether 08:00:27:2e:8d:5d brd ff:ff:ff:ff:ff:ff promiscuity 0
vlan protocol 802.1Q id 100 <REORDER_HDR>
Однако всякий раз, когда я пытаюсь что-то пропинговать, выходит за рамки, интерфейс vlan не может успешно выполнить ARP.
root@vagrant-ubuntu-trusty-64:~# ping -I eth1.100 www.google.com
PING www.google.com (216.58.216.4) from 10.0.2.20 eth1.100: 56(84) bytes of data.
From vagrant-ubuntu-trusty-64 (10.0.2.20) icmp_seq=1 Destination Host Unreachable
From vagrant-ubuntu-trusty-64 (10.0.2.20) icmp_seq=2 Destination Host Unreachable
Tcpdump показывает ниже:
vagrant@vagrant-ubuntu-trusty-64:~$ sudo tcpdump -i eth1.100
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1.100, link-type EN10MB (Ethernet), capture size 65535 bytes
08:15:00.244512 ARP, Request who-has lax02s21-in-f4.1e100.net tell vagrant-ubuntu-trusty-64, length 28
08:15:01.241409 ARP, Request who-has lax02s21-in-f4.1e100.net tell vagrant-ubuntu-trusty-64, length 28
08:15:02.242227 ARP, Request who-has lax02s21-in-f4.1e100.net tell vagrant-ubuntu-trusty-64, length 28
08:15:03.262607 ARP, Request who-has lax02s21-in-f4.1e100.net tell vagrant-ubuntu-trusty-64, length 28
Я все правильно настроил?