I am using Centos 5.3 VM created on VMWare ESXi 4.0.0. I created a vlan interface with tag 3 on my interface eth3 and gave it an IP in the same subnet as other machines in the vlan. When I tried pinging another machine through the newly created vlan interface (eth3.3) it does not ping. But if I try to ping through the actual interface eth3 it pings. I thought it was supposed to work the other way. I do not understand how to troubleshoot. Can anybody give me some pointers on how to troubleshoot this ? Here are the steps I did :-
# ifconfig eth3
eth3 Link encap:Ethernet HWaddr 00:0C:29:F1:DF:DC
inet6 addr: fe80::20c:29ff:fef1:dfdc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29522 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2319562 (2.2 MiB) TX bytes:30298 (29.5 KiB)
Base address:0x2080 Memory:d8940000-d8960000
# vconfig add eth3 3
Added VLAN with VID == 3 to IF -:eth3:-
# ifconfig eth3.3 172.22.125.154
# ifconfig eth3.3
eth3.3 Link encap:Ethernet HWaddr 00:0C:29:F1:DF:DC
inet addr:172.22.125.154 Bcast:172.22.255.255 Mask:255.255.0.0
inet6 addr: fe80::20c:29ff:fef1:dfdc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:7944 (7.7 KiB)
# ping 172.22.125.3 -I eth3.3
PING 172.22.125.3 (172.22.125.3) from 172.22.125.154 eth3.3: 56(84) bytes of data.
--- 172.22.125.3 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
# ping 172.22.125.3 -I eth3
PING 172.22.125.3 (172.22.125.3) from 172.20.70.145 eth3: 56(84) bytes of data.
64 bytes from 172.22.125.3: icmp_seq=1 ttl=64 time=1.67 ms
64 bytes from 172.22.125.3: icmp_seq=2 ttl=64 time=1.85 ms