Closed leoli-nps closed 4 years ago
This appears to be due to the fact that you have port aliases which are superstrings of your SONiC port names, but I believe this situation was tested. I will attempt to reproduce and report my findings.
I was able to reproduce the issue, and I have confirmed that it indeed is due to the fact that you have port aliases which are superstrings of your SONiC port names. I am working on a fix.
I have created a PR with the fix here: https://github.com/Azure/sonic-utilities/pull/664
Can you please try it out, and report your findings?
@jleveque , I have tested it with your changes and found that the alias is not displayed correctly for the interface name followed by a character. The test results are as follows:
admin@sonic:~$ show interfaces status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC
--------------- ----------- ------- ----- ------------- --------------- ------ ------- -------------- ----------
Ethernet0 0,1,2,3 100G 9100 Ethernet1/1 routed down up N/A N/A
Ethernet4 4,5,6,7 100G 9100 Ethernet2/1 routed down up N/A N/A
Ethernet8 8,9,10,11 100G 9100 Ethernet3/1 routed down up N/A N/A
Ethernet12 12,13,14,15 100G 9100 Ethernet4/1 routed down up N/A N/A
Ethernet16 16,17,18,19 100G 9100 Ethernet5/1 routed down up N/A N/A
Ethernet20 20,21,22,23 100G 9100 Ethernet6/1 routed down up N/A N/A
Ethernet24 24,25,26,27 100G 9100 Ethernet7/1 routed down up N/A N/A
Ethernet28 28,29,30,31 100G 9100 Ethernet8/1 routed down up N/A N/A
Ethernet32 32,33,34,35 100G 9100 Ethernet9/1 routed down up N/A N/A
Ethernet36 36,37,38,39 100G 9100 Ethernet10/1 routed down up N/A N/A
Ethernet40 40,41,42,43 100G 9100 Ethernet11/1 routed down up N/A N/A
Ethernet44 44,45,46,47 100G 9100 Ethernet12/1 routed down up N/A N/A
Ethernet48 48,49,50,51 100G 9100 Ethernet13/1 routed down up N/A N/A
Ethernet52 52,53,54,55 100G 9100 Ethernet14/1 routed down up N/A N/A
Ethernet56 56,57,58,59 100G 9100 Ethernet15/1 routed down up N/A N/A
Ethernet60 60,61,62,63 100G 9100 Ethernet16/1 routed down up N/A N/A
Ethernet96 96,97,98,99 100G 9100 Ethernet25/1 routed down up N/A N/A
Ethernet100 100 10G 9100 Ethernet26/1 routed down up N/A N/A
Ethernet101 101 10G 9100 Ethernet26/2 routed down up N/A N/A
Ethernet102 102 10G 9100 Ethernet26/3 routed down up N/A N/A
Ethernet103 103 10G 9100 Ethernet26/4 routed down up N/A N/A
Ethernet104 104 10G 9100 Ethernet27/1 routed down up N/A N/A
Ethernet105 105 10G 9100 Ethernet27/2 routed down up N/A N/A
Ethernet106 106 10G 9100 Ethernet27/3 routed down up N/A N/A
Ethernet107 107 10G 9100 Ethernet27/4 routed down up N/A N/A
Ethernet108 108 10G 9100 Ethernet28/1 routed down up N/A N/A
Ethernet109 109 10G 9100 Ethernet28/2 routed down up N/A N/A
Ethernet110 110 10G 9100 Ethernet28/3 routed down up N/A N/A
Ethernet111 111 10G 9100 Ethernet28/4 routed down up N/A N/A
Ethernet112 112 10G 9100 Ethernet29/1 routed down up N/A N/A
Ethernet113 113 10G 9100 Ethernet29/2 routed down up N/A N/A
Ethernet114 114 10G 9100 Ethernet29/3 routed down up N/A N/A
Ethernet115 115 10G 9100 Ethernet29/4 routed down up N/A N/A
Ethernet116 116 10G 9100 Ethernet30/1 routed down up N/A N/A
Ethernet117 117 10G 9100 Ethernet30/2 routed down up N/A N/A
Ethernet118 118 10G 9100 Ethernet30/3 routed down up N/A N/A
Ethernet119 119 10G 9100 Ethernet30/4 routed down up N/A N/A
Ethernet120 120 10G 9100 Ethernet121/1 PortChannel0001 up up QSFP+ or later N/A
Ethernet121 121 10G 9100 Ethernet122/1 routed up up QSFP+ or later N/A
Ethernet122 122 10G 9100 Ethernet123/1 routed up up QSFP+ or later N/A
Ethernet123 123 10G 9100 Ethernet124/1 PortChannel0003 up up QSFP+ or later N/A
Ethernet124 124 10G 9100 Ethernet125/1 routed up up QSFP+ or later N/A
Ethernet125 125 10G 9100 Ethernet126/2 PortChannel0004 up up QSFP+ or later N/A
Ethernet126 126 10G 9100 Ethernet127/3 PortChannel0004 up up QSFP+ or later N/A
Ethernet127 127 10G 9100 Ethernet128/4 PortChannel0004 up up QSFP+ or later N/A
PortChannel0001 N/A 10G N/A routed up up N/A N/A
PortChannel0003 N/A 10G N/A routed up up N/A N/A
PortChannel0004 N/A 30G N/A routed up up N/A N/A
admin@sonic:~$
admin@sonic:~$ show interfaces naming_mode
alias
admin@sonic:~$
show queue watermark unicast
can display correctly
admin@sonic:~$ show queue watermark unicast
Egress shared pool occupancy per unicast queue:
Port UC0 UC1 UC2 UC3 UC4 UC5 UC6 UC7
----------- ----- ----- ----- ----- ----- ----- ----- -----
Ethernet1/1 0 0 0 0 0 0 0 0
Ethernet2/1 0 0 0 0 0 0 0 0
Ethernet3/1 0 0 0 0 0 0 0 0
Ethernet4/1 0 0 0 0 0 0 0 0
Ethernet5/1 0 0 0 0 0 0 0 0
Ethernet6/1 0 0 0 0 0 0 0 0
Ethernet7/1 0 0 0 0 0 0 0 0
Ethernet8/1 0 0 0 0 0 0 0 0
Ethernet9/1 0 0 0 0 0 0 0 0
Ethernet10/1 0 0 0 0 0 0 0 0
Ethernet11/1 0 0 0 0 0 0 0 0
Ethernet12/1 0 0 0 0 0 0 0 0
Ethernet13/1 0 0 0 0 0 0 0 0
Ethernet14/1 0 0 0 0 0 0 0 0
Ethernet15/1 0 0 0 0 0 0 0 0
Ethernet16/1 0 0 0 0 0 0 0 0
Ethernet25/1 0 0 0 0 0 0 0 0
Ethernet26/1 0 0 0 0 0 0 0 0
Ethernet26/2 0 0 0 0 0 0 0 0
Ethernet26/3 0 0 0 0 0 0 0 0
Ethernet26/4 0 0 0 0 0 0 0 0
Ethernet27/1 0 0 0 0 0 0 0 0
Ethernet27/2 0 0 0 0 0 0 0 0
Ethernet27/3 0 0 0 0 0 0 0 0
Ethernet27/4 0 0 0 0 0 0 0 0
Ethernet28/1 0 0 0 0 0 0 0 0
Ethernet28/2 0 0 0 0 0 0 0 0
Ethernet28/3 0 0 0 0 0 0 0 0
Ethernet28/4 0 0 0 0 0 0 0 0
Ethernet29/1 0 0 0 0 0 0 0 0
Ethernet29/2 0 0 0 0 0 0 0 0
Ethernet29/3 0 0 0 0 0 0 0 0
Ethernet29/4 0 0 0 0 0 0 0 0
Ethernet30/1 0 0 0 0 0 0 0 0
Ethernet30/2 0 0 0 0 0 0 0 0
Ethernet30/3 0 0 0 0 0 0 0 0
Ethernet30/4 0 0 0 0 0 0 0 0
Ethernet121/1 0 0 0 0 0 0 0 0
Ethernet122/1 0 0 0 0 0 0 0 0
Ethernet123/1 0 0 0 0 0 0 0 0
Ethernet124/1 0 0 0 0 0 0 0 0
Ethernet125/1 0 0 0 0 0 0 0 0
Ethernet126/2 0 0 0 0 0 0 0 0
Ethernet127/3 0 0 0 0 0 0 0 0
Ethernet128/4 0 0 0 0 0 0 0 0
admin@sonic:~$
show ip route 121.1.1.88
can display correctly
admin@sonic:~$ show ip route 121.1.1.88
Routing entry for 121.1.1.0/24
Known via "connected", distance 0, metric 0, best
Last update 00:36:41 ago
* directly connected, Ethernet122/1
admin@sonic:~$
5. Command line ``show ip route`` does not display correctly
admin@sonic:~$ show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
- selected route, * - FIB route
K> 0.0.0.0/0 [0/0] via 192.168.2.254, eth0, 00:35:13 C> 1.1.1.0/24 is directly connected, PortChannel0001, 00:34:55 C> 3.1.1.0/24 is directly connected, PortChannel0003, 00:34:55 C> 10.1.0.1/32 is directly connected, lo, 00:35:12 C> 121.1.1.0/24 is directly connected, Ethernet121, 00:34:54 C> 122.1.1.0/24 is directly connected, Ethernet122, 00:34:54 C>* 192.168.2.0/24 is directly connected, eth0, 00:35:13 admin@sonic:~$
6. Command line ``show interfaces portchannel`` does not display correctly
admin@sonic:~$ show interfaces portchannel Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports
0001 PortChannel0001 LACP(A)(Up) Ethernet120(S) 0002 PortChannel0002 LACP(A)(Dw) N/A 0003 PortChannel0003 LACP(A)(Up) Ethernet123(S) 0004 PortChannel0004 LACP(A)(Up) Ethernet127(D) Ethernet126(S*) Ethernet125(S) admin@sonic:~$
@leoli-nps: Thanks for your detailed feedback. I have pushed another change to https://github.com/Azure/sonic-utilities/pull/664. Can you please try out the new change?
@jleveque , I have tested it according to your new changes. The command line show ip route
and show interface portchannel
can also display correctly. The test results are as follows:
admin@sonic:~$ show interfaces naming_mode
alias
admin@sonic:~$
admin@sonic:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route
K>* 0.0.0.0/0 [0/0] via 192.168.2.254, eth0, 23:38:23
C>* 1.1.1.0/24 is directly connected, PortChannel0001, 23:38:05
C>* 3.1.1.0/24 is directly connected, PortChannel0003, 23:38:05
C>* 10.1.0.1/32 is directly connected, lo, 23:38:22
C>* 121.1.1.0/24 is directly connected, Ethernet122/1, 23:38:04
C>* 122.1.1.0/24 is directly connected, Ethernet123/1, 23:38:04
C>* 192.168.2.0/24 is directly connected, eth0, 23:38:23
admin@sonic:~$
admin@sonic:~$ show interfaces portchannel
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
S - selected, D - deselected, * - not synced
No. Team Dev Protocol Ports
----- --------------- ----------- ---------------------------------------------
0001 PortChannel0001 LACP(A)(Up) Ethernet121/1(S)
0002 PortChannel0002 LACP(A)(Dw) N/A
0003 PortChannel0003 LACP(A)(Up) Ethernet124/1(S)
0004 PortChannel0004 LACP(A)(Up) Ethernet128/4(D) Ethernet127/3(S*) Ethernet126/2(S)
admin@sonic:~$
Description
Interface name and alias
Current interface naming_mode is default
Execute some show commands
admin@tau1t8-01:~$
admin@tau1t8-01:~$ sudo config interface_naming_mode alias Please logout and log back in for changes take effect. admin@tau1t8-01:~$ exit logout
Debian GNU/Linux 9 tau1t8-01 ttyS0
tau1t8-01 login: admin Password: Last login: Thu Sep 19 12:22:54 UTC 2019 on ttyS0 Linux tau1t8-01 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2015-12-19) x86_64 You are on
/ | / | \ | ()/ | _ | | | | | | | | _) | || | |\ | | | |___/ \/|| _||____|
-- Software for Open Networking in the Cloud --
Unauthorized access and/or use are prohibited. All access and/or use are subject to monitoring.
Help: http://azure.github.io/SONiC/
admin@tau1t8-01:~$
admin@tau1t8-01:~$ show interfaces naming_mode alias admin@tau1t8-01:~$
admin@tau1t8-01:~$ show interfaces portchannel Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports
0001 PortChannel0001 LACP(A)(Up) Ethernet29/1(S) 0002 PortChannel0002 LACP(A)(Up) Ethernet30/1(S) 0003 PortChannel0003 LACP(A)(Up) Ethernet32/1/1(S) 0004 PortChannel0004 LACP(A)(Up) Ethernet32/1(S) admin@tau1t8-01:~$ admin@tau1t8-01:~$ show queue watermark unicast Egress shared pool occupancy per unicast queue: Port UC0 UC1 UC2 UC3 UC4 UC5 UC6 UC7
Ethernet2/1/1 0 0 0 0 0 0 0 0 Ethernet2/1 0 0 0 0 0 0 0 0 Ethernet6/1/1/1/1 0 0 0 0 0 0 0 0 Ethernet6/1/1/1 0 0 0 0 0 0 0 0 Ethernet6/1/1 0 0 0 0 0 0 0 0 Ethernet6/1 0 0 0 0 0 0 0 0 Ethernet8/1/1 0 0 0 0 0 0 0 0 Ethernet8/1 0 0 0 0 0 0 0 0 Ethernet12/1/1/1/1 0 0 0 0 0 0 0 0 Ethernet12/1/1/1 0 0 0 0 0 0 0 0 Ethernet12/1/1 0 0 0 0 0 0 0 0 Ethernet12/1 0 0 0 0 0 0 0 0 Ethernet14/1/1 0 0 0 0 0 0 0 0 Ethernet14/1 0 0 0 0 0 0 0 0 Ethernet17/1/1/1 0 0 0 0 0 0 0 0 Ethernet17/1/1 0 0 0 0 0 0 0 0 Ethernet17/1 0 0 0 0 0 0 0 0 Ethernet18/1 0 0 0 0 0 0 0 0 Ethernet21/1/1/1 0 0 0 0 0 0 0 0 Ethernet21/1/1 0 0 0 0 0 0 0 0 Ethernet21/1 0 0 0 0 0 0 0 0 Ethernet22/1 0 0 0 0 0 0 0 0 Ethernet25/1/1/1 0 0 0 0 0 0 0 0 Ethernet25/1/1 0 0 0 0 0 0 0 0 Ethernet25/1 0 0 0 0 0 0 0 0 Ethernet27/1/1 0 0 0 0 0 0 0 0 Ethernet27/1 0 0 0 0 0 0 0 0 Ethernet28/1 0 0 0 0 0 0 0 0 Ethernet29/1 0 0 0 0 0 0 0 0 Ethernet30/1 0 0 0 0 0 0 0 0 Ethernet32/1/1 0 0 0 0 0 0 0 0 Ethernet32/1 0 0 0 0 0 0 0 0 Ethernet35/1/1/1 0 0 0 0 0 0 0 0 Ethernet35/1/1 0 0 0 0 0 0 0 0 Ethernet35/1 0 0 0 0 0 0 0 0 Ethernet37/1/1 0 0 0 0 0 0 0 0 Ethernet37/1 0 0 0 0 0 0 0 0 Ethernet38/1 0 0 0 0 0 0 0 0 Ethernet40/1/1 0 0 0 0 0 0 0 0 Ethernet40/1 0 0 0 0 0 0 0 0 Ethernet42/1/1 0 0 0 0 0 0 0 0 Ethernet42/1 0 0 0 0 0 0 0 0 Ethernet43/1 0 0 0 0 0 0 0 0 Ethernet44/1 0 0 0 0 0 0 0 0 Ethernet45/1 0 0 0 0 0 0 0 0 Ethernet47/1/1 0 0 0 0 0 0 0 0 Ethernet47/1 0 0 0 0 0 0 0 0 Ethernet48/1 0 0 0 0 0 0 0 0 Ethernet49/1 0 0 0 0 0 0 0 0 Ethernet50/1 0 0 0 0 0 0 0 0 Ethernet54/1/1/1/1 0 0 0 0 0 0 0 0 Ethernet54/1/1/1 0 0 0 0 0 0 0 0 Ethernet54/1/1 0 0 0 0 0 0 0 0 Ethernet54/1 0 0 0 0 0 0 0 0 admin@tau1t8-01:~$ admin@tau1t8-01:~$ show acl table EVERFLOW Name Type Binding Description
EVERFLOW MIRROR Ethernet2/1/1 EVERFLOW Ethernet2/1 Ethernet6/1/1/1/1 Ethernet6/1/1/1 Ethernet6/1/1 Ethernet6/1 Ethernet8/1/1 Ethernet8/1 Ethernet12/1/1/1/1 Ethernet12/1/1/1 Ethernet12/1/1 Ethernet12/1 Ethernet14/1/1 Ethernet14/1 Ethernet17/1/1/1 Ethernet17/1/1 Ethernet17/1 Ethernet18/1 Ethernet21/1/1/1 Ethernet21/1/1 Ethernet21/1 Ethernet22/1 Ethernet25/1/1/1 Ethernet25/1/1 Ethernet25/1 Ethernet27/1/1 Ethernet27/1 Ethernet28/1 Ethernet35/1/1/1 Ethernet35/1/1 Ethernet35/1 Ethernet37/1/1 Ethernet37/1 Ethernet38/1 Ethernet40/1/1 Ethernet40/1 Ethernet42/1/1 Ethernet42/1 Ethernet43/1 Ethernet44/1 Ethernet45/1 Ethernet47/1/1 Ethernet47/1 Ethernet48/1 Ethernet49/1 Ethernet50/1 Ethernet54/1/1/1/1 Ethernet54/1/1/1 Ethernet54/1/1 Ethernet54/1 PortChannel0001 PortChannel0002 PortChannel0003 PortChannel0004 admin@tau1t8-01:~$ admin@tau1t8-01:~$ show ip route 192.168.1.1 Routing entry for 192.168.1.1/32 Known via "bgp", distance 20, metric 0, best Last update 00:11:27 ago
admin@tau1t8-01:~$
admin@tau1t8-01:~$ show version
SONiC Software Version: SONiC.201904.0-dirty-20190918.185754 Distribution: Debian 9.11 Kernel: 4.9.0-9-2-amd64 Build commit: 37207bcb Build date: Thu Sep 19 02:23:41 UTC 2019 Built by: build@nps65
Platform: x86_64-accton_as7116_54x-r0 HwSKU: Accton-AS7116-54X ASIC: nephos Serial Number: 711654X1737002 Uptime: 12:05:02 up 25 min, 1 user, load average: 0.41, 0.45, 0.39
Docker images: REPOSITORY TAG IMAGE ID SIZE docker-teamd 201904.0-dirty-20190918.185754 475303eba07f 303MB docker-teamd latest 475303eba07f 303MB docker-orchagent 201904.0-dirty-20190918.185754 1f410b366b6d 322MB docker-orchagent latest 1f410b366b6d 322MB docker-fpm-frr 201904.0-dirty-20190918.185754 79d8c094ab99 311MB docker-fpm-frr latest 79d8c094ab99 311MB docker-syncd-nephos-rpc latest 1515ad6beb7f 596MB docker-syncd-nephos latest 1515ad6beb7f 596MB docker-syncd-nephos 201904.0-dirty-20190918.185754 1bbece772cc1 336MB docker-lldp-sv2 201904.0-dirty-20190918.185754 3ec8f0e90e74 299MB docker-lldp-sv2 latest 3ec8f0e90e74 299MB docker-dhcp-relay 201904.0-dirty-20190918.185754 6694d53a6868 288MB docker-dhcp-relay latest 6694d53a6868 288MB docker-database 201904.0-dirty-20190918.185754 e2f43ac980eb 281MB docker-database latest e2f43ac980eb 281MB docker-snmp-sv2 201904.0-dirty-20190918.185754 e321588d7fae 313MB docker-snmp-sv2 latest e321588d7fae 313MB docker-sonic-telemetry 201904.0-dirty-20190918.185754 7bf40cb63c75 303MB docker-sonic-telemetry latest 7bf40cb63c75 303MB docker-router-advertiser 201904.0-dirty-20190918.185754 ef729517bfc2 280MB docker-router-advertiser latest ef729517bfc2 280MB docker-platform-monitor 201904.0-dirty-20190918.185754 10646f5cde63 327MB docker-platform-monitor latest 10646f5cde63 327MB
admin@tau1t8-01:~$