There are two network interfaces on board, eth0 and eth1. Eth0 is connected with a PHY chip directly, and eth1 is connected with a switch chip to expand 5 ports.
Here is 3 different vlans, eth1.10 have port 0 in vlan10, eth1.20 have port 1 and port 2 in vlan20, eth1.30 have port 3 and port 4 in vlan30.
eth0 --- interface
ech1 -- port 0 in Vlan10
-- port 1 in Vlan20
-- port 2 in Vlan20
-- port 3 in Vlan30
-- port 4 in Vlan30
The question is, why eth1.10(IP:192.168.8.162) can ping PC's IP(192.168.8.139) well, but PC can't ping eht1.10's IP.
Linux kernel version is 4.19, and the switch chip is working good, and arping both are good.
I have read the following thread but it doesn't work.
https://www.linuxquestions.org/quest...0/#post4033474,
Tcpdump data:
//[FAIL]=====================================================================
Fail to ping eth1.10 from PC
【PC tcpdump data】
#
# ping -I eth0 192.168.8.162
PING 192.168.8.162 (192.168.8.162): 56 data bytes
11:12:15.213807 IP (tos 0x0, ttl 64, id 56617, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo request, id 492, seq 0, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0800 4500
0x0010: 0054 dd29 4000 4001 cb01 c0a8 088b c0a8
0x0020: 08a2 0800 3f29 01ec 0000 5fdc 570e 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
11:12:16.214712 IP (tos 0x0, ttl 64, id 56683, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo request, id 492, seq 1, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0800 4500
0x0010: 0054 dd6b 4000 4001 cabf c0a8 088b c0a8
0x0020: 08a2 0800 efe1 01ec 0001 9f22 670e 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
--- 192.168.8.162 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
11:12:20.232690 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.162 tell 192.168.8.139, length 28
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0806 0001
0x0010: 0800 0604 0001 9884 e3a8 a5ec c0a8 088b
0x0020: 0000 0000 0000 c0a8 08a2
11:12:20.233182 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.162 is-at 78:04:73:55:d5:30 (oui Unknown), length 46
0x0000: 9884 e3a8 a5ec 7804 7355 d530 0806 0001
0x0010: 0800 0604 0002 7804 7355 d530 c0a8 08a2
0x0020: 9884 e3a8 a5ec c0a8 088b 0000 0000 0000
0x0030: 0000 0000 0000 0000 0000 0000
【eth1.10 tcpdump data】
11:12:14.916330 IP (tos 0x0, ttl 64, id 56617, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo request, id 492, seq 0, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0800 4500 0054 dd29 4000 4001 cb01 c0a8
0x0020: 088b c0a8 08a2 0800 3f29 01ec 0000 5fdc
0x0030: 570e 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
11:12:15.917230 IP (tos 0x0, ttl 64, id 56683, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo request, id 492, seq 1, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0800 4500 0054 dd6b 4000 4001 cabf c0a8
0x0020: 088b c0a8 08a2 0800 efe1 01ec 0001 9f22
0x0030: 670e 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
11:12:19.935212 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.162 tell 192.168.8.139, length 50
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0806 0001 0800 0604 0001 9884 e3a8 a5ec
0x0020: c0a8 088b 0000 0000 0000 c0a8 08a2 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000
11:12:19.935416 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.162 is-at 78:04:73:55:d5:30 (oui Unknown), length 28
0x0000: 9884 e3a8 a5ec 7804 7355 d530 8100 000a
0x0010: 0806 0001 0800 0604 0002 7804 7355 d530
0x0020: c0a8 08a2 9884 e3a8 a5ec c0a8 088b
//[GOOD]=====================================================================
Good to ping PC from eth1.10
【eth1.10 tcpdump data】
# ping -I eth1.10 192.168.8.139
PING 192.168.8.139 (192.168.8.139): 56 data bytes
64 bytes from 192.168.8.139: seq=0 ttl=64 time=1.119 ms
11:15:03.057725 IP (tos 0x0, ttl 64, id 6986, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.162 > 192.168.8.139: ICMP echo request, id 516, seq 0, length 64
0x0000: 9884 e3a8 a5ec 7804 7355 d530 8100 000a
0x0010: 0800 4500 0054 1b4a 4000 4001 8ce1 c0a8
0x0020: 08a2 c0a8 088b 0800 c066 0204 0000 d87c
0x0030: 5d18 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
11:15:03.058316 IP (tos 0x0, ttl 64, id 4239, offset 0, flags [none], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo reply, id 516, seq 0, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0800 4500 0054 108f 0000 4001 d79c c0a8
0x0020: 088b c0a8 08a2 0000 c866 0204 0000 d87c
0x0030: 5d18 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
64 bytes from 192.168.8.139: seq=1 ttl=64 time=1.061 ms
11:15:04.058501 IP (tos 0x0, ttl 64, id 7040, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.162 > 192.168.8.139: ICMP echo request, id 516, seq 1, length 64
0x0000: 9884 e3a8 a5ec 7804 7355 d530 8100 000a
0x0010: 0800 4500 0054 1b80 4000 4001 8cab c0a8
0x0020: 08a2 c0a8 088b 0800 5b20 0204 0001 2ec2
0x0030: 6c18 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
11:15:04.059052 IP (tos 0x0, ttl 64, id 4311, offset 0, flags [none], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo reply, id 516, seq 1, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0800 4500 0054 10d7 0000 4001 d754 c0a8
0x0020: 088b c0a8 08a2 0000 6320 0204 0001 2ec2
0x0030: 6c18 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000
--- 192.168.8.139 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1.061/1.090/1.119 ms
11:15:08.094997 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.162 tell 192.168.8.139, length 50
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0806 0001 0800 0604 0001 9884 e3a8 a5ec
0x0020: c0a8 088b 0000 0000 0000 c0a8 08a2 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000
11:15:08.095166 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.162 is-at 78:04:73:55:d5:30 (oui Unknown), length 28
0x0000: 9884 e3a8 a5ec 7804 7355 d530 8100 000a
0x0010: 0806 0001 0800 0604 0002 7804 7355 d530
0x0020: c0a8 08a2 9884 e3a8 a5ec c0a8 088b
11:15:08.095817 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.139 tell 192.168.8.162, length 28
0x0000: 9884 e3a8 a5ec 7804 7355 d530 8100 000a
0x0010: 0806 0001 0800 0604 0001 7804 7355 d530
0x0020: c0a8 08a2 0000 0000 0000 c0a8 088b
11:15:08.096095 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.139 is-at 98:84:e3:a8:a5:ec (oui Unknown), length 50
0x0000: 7804 7355 d530 9884 e3a8 a5ec 8100 000a
0x0010: 0806 0001 0800 0604 0002 9884 e3a8 a5ec
0x0020: c0a8 088b 7804 7355 d530 c0a8 08a2 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000
【PC tcpdump data】
11:15:03.355724 IP (tos 0x0, ttl 64, id 6986, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.162 > 192.168.8.139: ICMP echo request, id 516, seq 0, length 64
0x0000: 9884 e3a8 a5ec 7804 7355 d530 0800 4500
0x0010: 0054 1b4a 4000 4001 8ce1 c0a8 08a2 c0a8
0x0020: 088b 0800 c066 0204 0000 d87c 5d18 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
11:15:03.356018 IP (tos 0x0, ttl 64, id 4239, offset 0, flags [none], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo reply, id 516, seq 0, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0800 4500
0x0010: 0054 108f 0000 4001 d79c c0a8 088b c0a8
0x0020: 08a2 0000 c866 0204 0000 d87c 5d18 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
11:15:04.356486 IP (tos 0x0, ttl 64, id 7040, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.8.162 > 192.168.8.139: ICMP echo request, id 516, seq 1, length 64
0x0000: 9884 e3a8 a5ec 7804 7355 d530 0800 4500
0x0010: 0054 1b80 4000 4001 8cab c0a8 08a2 c0a8
0x0020: 088b 0800 5b20 0204 0001 2ec2 6c18 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
11:15:04.356759 IP (tos 0x0, ttl 64, id 4311, offset 0, flags [none], proto ICMP (1), length 84)
192.168.8.139 > 192.168.8.162: ICMP echo reply, id 516, seq 1, length 64
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0800 4500
0x0010: 0054 10d7 0000 4001 d754 c0a8 088b c0a8
0x0020: 08a2 0000 6320 0204 0001 2ec2 6c18 0000
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000
11:15:08.392684 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.162 tell 192.168.8.139, length 28
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0806 0001
0x0010: 0800 0604 0001 9884 e3a8 a5ec c0a8 088b
0x0020: 0000 0000 0000 c0a8 08a2
11:15:08.393104 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.162 is-at 78:04:73:55:d5:30 (oui Unknown), length 46
0x0000: 9884 e3a8 a5ec 7804 7355 d530 0806 0001
0x0010: 0800 0604 0002 7804 7355 d530 c0a8 08a2
0x0020: 9884 e3a8 a5ec c0a8 088b 0000 0000 0000
0x0030: 0000 0000 0000 0000 0000 0000
11:15:08.393733 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.8.139 tell 192.168.8.162, length 46
0x0000: 9884 e3a8 a5ec 7804 7355 d530 0806 0001
0x0010: 0800 0604 0001 7804 7355 d530 c0a8 08a2
0x0020: 0000 0000 0000 c0a8 088b 0000 0000 0000
0x0030: 0000 0000 0000 0000 0000 0000
11:15:08.393825 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.8.139 is-at 98:84:e3:a8:a5:ec (oui Unknown), length 28
0x0000: 7804 7355 d530 9884 e3a8 a5ec 0806 0001
0x0010: 0800 0604 0002 9884 e3a8 a5ec c0a8 088b
0x0020: 7804 7355 d530 c0a8 08a2