I'm trying to setup vlans on debian wheezy 7.6. But I can't get it to work. Is there something special I'm missing out there? I tried searching around, but I didn't get any further.
I couldn't figure out where this is going wrong. Looks like either the packets going out the vlan is not being tagged, or something unknown is happening.
I have 2 hosts directly connected to each other, both have intel i350Gb ethernet cards.
host 1 physical interface eth1 = 10.0.10.68
host 2 physical interface has no ip, and vlan has assigned 10.0.10.70
When I ping ip address 10.0.10.68 through the vlan interface, I get no response:
root@host2:~# ping 10.0.10.68 -c 1 -I eth1.10
PING 10.0.10.68 (10.0.10.68) from 10.0.10.70 eth1.10: 56(84) bytes of data.
From 10.0.10.70 icmp_seq=1 Destination Host Unreachable
--- 10.0.10.68 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
I captured the packets on both machines on the physical iface with tcpdump, and (both show the same with no reply to the request) :
root@host1:~# tcpdump -vv -i eth1 -s 1500 ether proto not 0x88cc
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 1500 bytes
23:45:53.322497 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.10.68 tell 10.0.10.70, length 46
23:45:54.319343 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.10.68 tell 10.0.10.70, length 46
23:45:55.319332 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.10.68 tell 10.0.10.70, length 46
^C
3 packets captured
3 packets received by filter
0 packets dropped by kernel
Looks like, host 1 receiving the request, does not reply to request from vlan.
Here is my settings and what I did
root@host2:~# modinfo 8021q
filename: /lib/modules/3.2.0-4-amd64/kernel/net/8021q/8021q.ko
version: 1.8
license: GPL
alias: rtnl-link-vlan
srcversion: EF43E86E729FD58610D96BC
depends: garp
intree: Y
vermagic: 3.2.0-4-amd64 SMP mod_unload modversions
root@host2:~# ip link add link eth1 eth1.10 type vlan id 10 reorder_hdr off
root@host2:~# ip link set eth1 up
root@host2:~# ip link set eth1.10 up
root@host2:~#
ip addr add 10.0.10.70/24 broadcast 10.0.10.255 dev eth1.10
root@host2:~# cat /proc/net//vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth1.10 | 10 | eth1
root@host2:~# cat /proc/net/vlan/eth1.10
eth1.10 VID: 10 REORDER_HDR: 0 dev->priv_flags: 1
total frames received 0
total bytes received 0
Broadcast/Multicast Rcvd 0
total frames transmitted 18
total bytes transmitted 972
Device: eth1
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
EGRESS priority mappings:
root@host2:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:25:90:f3:3d:ab
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:736 (736.0 B) TX bytes:4088 (3.9 KiB)
Memory:df900000-df920000
eth1.10 Link encap:Ethernet HWaddr 00:25:90:f3:3d:ab
inet addr:10.0.10.70 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1008 (1008.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5992 (5.8 KiB) TX bytes:5992 (5.8 KiB)
root@host2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
10.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.10
root@host2:~# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
Thanks
Aron Podrigal