Description
test_sub_port_interfaces.py failed.
Steps to reproduce the issue:
- config a sub-interface on the device:
Ethernet12.10
root@str2-7050cx3-acs-01:/tmp# config vlan member del 1000 Ethernet12
root@str2-7050cx3-acs-01:/tmp# cat sub.json
{
"VLAN_SUB_INTERFACE": {
"Ethernet12.10": {
"admin_status" : "up"
},
"Ethernet12.10|10.0.0.50/31": {}
}
}
root@str2-7050cx3-acs-01:/tmp# sonic-cfggen -w -j sub.json
root@str2-7050cx3-acs-01:/tmp# show sub s
Sub port interface Speed MTU Vlan Admin Type
-------------------- ------- ----- ------ ------- --------------------
Ethernet12.10 100G 9100 10 up 802.1q-encapsulation
root@str2-7050cx3-acs-01:/tmp# show ip int
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
--------------- -------- ------------------- ------------ -------------- -------------
Ethernet12.10 10.0.0.50/31 up/up N/A N/A
Loopback0 10.1.0.32/32 up/up N/A N/A
PortChannel0001 10.0.0.56/31 up/up ARISTA01T1 10.0.0.57
PortChannel0002 10.0.0.58/31 up/up ARISTA02T1 10.0.0.59
PortChannel0003 10.0.0.60/31 up/up ARISTA03T1 10.0.0.61
PortChannel0004 10.0.0.62/31 up/up ARISTA04T1 10.0.0.63
Vlan1000 192.168.0.1/21 up/up N/A N/A
docker0 240.127.1.1/24 up/down N/A N/A
eth0 10.3.146.85/23 up/up N/A N/A
lo 127.0.0.1/16 up/up N/A N/A
- config a corresponding sub-interface on the PTF port:
eth3.10
root@5146357445fe:~# ip link add link eth3 name eth3.10 type vlan id 10
root@5146357445fe:~# ip address add 10.0.0.51/31 dev eth3.10
root@5146357445fe:~# ip link set eth3.10 up
root@5146357445fe:~# ifconfig eth3.10
eth3.10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9216
inet 10.0.0.51 netmask 255.255.255.254 broadcast 0.0.0.0
inet6 fe80::9a03:9bff:fe03:2289 prefixlen 64 scopeid 0x20<link>
ether 98:03:9b:03:22:89 txqueuelen 1000 (Ethernet)
RX packets 159 bytes 12026 (11.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 171 bytes 13634 (13.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- ping
10.0.0.51 from DUT and dump packets from DUT interface Ethernet12
- ping from DUT, failed due to no
ARP reply.
root@str2-7050cx3-acs-01:~# ping 10.0.0.51
PING 10.0.0.51 (10.0.0.51) 56(84) bytes of data.
From 10.0.0.50 icmp_seq=1 Destination Host Unreachable
From 10.0.0.50 icmp_seq=2 Destination Host Unreachable
From 10.0.0.50 icmp_seq=3 Destination Host Unreachable
^C
--- 10.0.0.51 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 130ms
pipe 4
root@str2-7050cx3-acs-01:~#
- dump from DUT interface
Ethernet12, the ARP reply is not tagged.
root@str2-7050cx3-acs-01:~# tcpdump -i Ethernet12 -nev
tcpdump: listening on Ethernet12, link-type EN10MB (Ethernet), capture size 262144 bytes
10:37:18.321798 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
10:37:18.321993 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype ARP (0x0806), length 56: Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
10:37:19.345754 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
10:37:19.345878 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype ARP (0x0806), length 56: Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
- dump from the sub-interface
Ethernet12.10, no ARP reply is present.
root@str2-7050cx3-acs-01:~# tcpdump -i Ethernet12.10 -nev
tcpdump: listening on Ethernet12.10, link-type EN10MB (Ethernet), capture size 262144 bytes
10:51:02.257742 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
10:51:03.281743 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
10:51:04.305786 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
10:51:05.329740 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 28
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root@str2-7050cx3-acs-01:~#
- dump from PTF port
eth3, both ARP request and reply are tagged.
root@2aff8f65b554:~# tcpdump -i eth3 -nev
tcpdump: listening on eth3, link-type EN10MB (Ethernet), capture size 262144 bytes
10:25:31.353874 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 46
10:25:31.353896 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 28
10:25:32.378519 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 46
10:25:32.378541 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 28
- add the interface
Ethernet12 back to Vlan1000, then do the sub-steps as step 3
- add the interface to
Vlan1000 then ping from DUT, ping is OK.
root@str2-7050cx3-acs-01:~# config vlan member add 1000 Ethernet12
root@str2-7050cx3-acs-01:~# ping 10.0.0.51
PING 10.0.0.51 (10.0.0.51) 56(84) bytes of data.
64 bytes from 10.0.0.51: icmp_seq=1 ttl=64 time=0.288 ms
64 bytes from 10.0.0.51: icmp_seq=2 ttl=64 time=0.245 ms
64 bytes from 10.0.0.51: icmp_seq=3 ttl=64 time=0.241 ms
^C
--- 10.0.0.51 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 32ms
rtt min/avg/max/mdev = 0.241/0.258/0.288/0.021 ms
root@str2-7050cx3-acs-01:~# docker exec -it swss bash
root@str2-7050cx3-acs-01:/# arping 10.0.0.51
ARPING 10.0.0.51
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=0 time=400.453 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=1 time=133.342 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=2 time=123.022 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=3 time=125.741 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=4 time=102.873 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=5 time=116.024 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=6 time=180.733 usec
56 bytes from 98:03:9b:03:22:89 (10.0.0.51): index=7 time=124.256 usec
^C
--- 10.0.0.51 statistics ---
8 packets transmitted, 8 packets received, 0% unanswered (0 extra)
rtt min/avg/max/std-dev = 0.103/0.163/0.400/0.092 ms
- dump from DUT interface
Ethernet12, both ARP request and reply are tagged.
root@str2-7050cx3-acs-01:~# tcpdump -i Ethernet12 -nev
tcpdump: listening on Ethernet12, link-type EN10MB (Ethernet), capture size 262144 bytes
10:42:39.723935 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 62: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 44
10:42:39.724048 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype 802.1Q (0x8100), length 60: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
10:42:40.725026 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 62: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 44
10:42:40.725208 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype 802.1Q (0x8100), length 60: vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root@str2-7050cx3-acs-01:~#
- dump from the sub-interface
Ethernet12.10, both ARP request and reply are present.
root@str2-7050cx3-acs-01:~# tcpdump -i Ethernet12.10 -nev
tcpdump: listening on Ethernet12.10, link-type EN10MB (Ethernet), capture size 262144 bytes
10:53:37.133149 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 58: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 44
10:53:37.133293 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype ARP (0x0806), length 56: Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
10:53:38.133771 94:8e:d3:05:34:e4 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 58: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.51 tell 10.0.0.50, length 44
10:53:38.133917 98:03:9b:03:22:89 > 94:8e:d3:05:34:e4, ethertype ARP (0x0806), length 56: Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.51 is-at 98:03:9b:03:22:89, length 42
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
Describe the results you received:
Describe the results you expected:
- the packets dumped a routed interface with destinatination to the sub-interface should have VLAN tag.
root@str2-7050cx3-acs-01:~# show version
SONiC Software Version: SONiC.master.20696-90801dc1b
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 90801dc1b
Build date: Mon Jun 21 13:06:52 UTC 2021
Built by: AzDevOps@sonic-build-workers-000EL0
Platform: x86_64-arista_7050cx3_32s
HwSKU: Arista-7050CX3-32S-C32
ASIC: broadcom
ASIC Count: 1
Serial Number: JPE20432334
Model Number: DCS-7050CX3-32S-SSD
Hardware Revision: N/A
Uptime: 10:44:02 up 31 min, 2 users, load average: 1.26, 1.36, 1.33
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-platform-monitor latest 3761db0b74f2 627MB
docker-platform-monitor master.20696-90801dc1b 3761db0b74f2 627MB
docker-snmp latest 94b495dd874c 454MB
docker-snmp master.20696-90801dc1b 94b495dd874c 454MB
docker-sflow latest 97cf7f4d30a8 425MB
docker-sflow master.20696-90801dc1b 97cf7f4d30a8 425MB
docker-teamd latest 223505a51cc1 424MB
docker-teamd master.20696-90801dc1b 223505a51cc1 424MB
docker-macsec latest e39d62c46e8a 427MB
docker-macsec master.20696-90801dc1b e39d62c46e8a 427MB
docker-lldp latest 3c68e4ed3dfe 453MB
docker-lldp master.20696-90801dc1b 3c68e4ed3dfe 453MB
docker-orchagent latest aa2976791cbf 442MB
docker-orchagent master.20696-90801dc1b aa2976791cbf 442MB
docker-router-advertiser latest 4f4d8c759175 413MB
docker-router-advertiser master.20696-90801dc1b 4f4d8c759175 413MB
docker-nat latest a000f07473b0 427MB
docker-nat master.20696-90801dc1b a000f07473b0 427MB
docker-sonic-mgmt-framework latest 107cc849fcd6 570MB
docker-sonic-mgmt-framework master.20696-90801dc1b 107cc849fcd6 570MB
docker-dhcp-relay latest fcb54a012b2d 420MB
docker-dhcp-relay master.20696-90801dc1b fcb54a012b2d 420MB
docker-sonic-telemetry latest 5691108f535b 501MB
docker-sonic-telemetry master.20696-90801dc1b 5691108f535b 501MB
docker-fpm-frr latest dddc5326440b 442MB
docker-fpm-frr master.20696-90801dc1b dddc5326440b 442MB
docker-syncd-brcm latest 10b635141195 705MB
docker-syncd-brcm master.20696-90801dc1b 10b635141195 705MB
docker-database latest 1188cff4d481 413MB
docker-database master.20696-90801dc1b 1188cff4d481 413MB
Description
test_sub_port_interfaces.pyfailed.Steps to reproduce the issue:
Ethernet12.10eth3.1010.0.0.51from DUT and dump packets from DUT interfaceEthernet12ARPreply.Ethernet12, theARPreply is not tagged.Ethernet12.10, noARPreply is present.eth3, bothARPrequest and reply are tagged.Ethernet12back toVlan1000, then do the sub-steps as step 3Vlan1000then ping from DUT, ping is OK.Ethernet12, bothARPrequest and reply are tagged.Ethernet12.10, bothARPrequest and reply are present.Describe the results you received:
Describe the results you expected: