Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP MIB Issue: IpAddrToIfIndex MIB is returning wrong interface indexes #15359

Open
nmoray-ebay opened this issue Jun 6, 2023 · 2 comments · May be fixed by sonic-net/sonic-snmpagent#284
Open
Labels
Triaged this issue has been triaged

Comments

@nmoray-ebay
Copy link

nmoray-ebay commented Jun 6, 2023

Description

IpAddrToIfIndex MIB[OID: 1.3.6.1.2.1.4.34.1.3.1] is returning wrong interface indexes.

##Reference IfIndexes from port_util:
ethernet_base_idx = 1
vlan_interface_base_idx = 2000
ethernet_bp_base_idx = 9000
portchannel_base_idx = 1000
mgmt_port_base_idx = 10000
ethernet_ib_base_idx = 11000
ethernet_rec_base_idx = 12000

Steps to reproduce the issue:

  1. Do snmpwalk on 1.3.6.1.2.1.4.34.1.3.1 OID
  2. Match to IfIndexes for the respective IPs

Describe the results you received:

For instance, following test shows that the IfIndex returned for 10.4.4.67 IP is incorrect. It should be 10000. Same is the case with other interfaces too like SVI and Front panel ports.

`show ip int
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
docker0 240.127.1.1/24 up/down N/A N/A
eth0 10.4.4.67/23 up/up N/A N/A
lo 127.0.0.1/16 up/up N/A N/A

snmpwalk -v2c -c localhost 1.3.6.1.2.1.4.34.1.3.1
iso.3.6.1.2.1.4.34.1.3.1.4.10.4.4.67 = INTEGER: 2 >>>>>>>>>>>>>>>>> It should be 10000
iso.3.6.1.2.1.4.34.1.3.1.4.10.4.5.255 = INTEGER: 2
iso.3.6.1.2.1.4.34.1.3.1.4.127.0.0.1 = INTEGER: 1
iso.3.6.1.2.1.4.34.1.3.1.4.240.127.1.1 = INTEGER: 3
iso.3.6.1.2.1.4.34.1.3.1.4.240.127.1.255 = INTEGER: 3`

Describe the results you expected:

`show ip int
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
Ethernet128 172.21.235.128/31 up/up N/A N/A
Ethernet136 172.21.235.130/31 up/down N/A N/A
Ethernet144 172.21.235.132/31 up/up N/A N/A
Ethernet152 172.21.235.134/31 up/down N/A N/A
Ethernet160 172.21.235.136/31 up/down N/A N/A
Ethernet168 172.21.235.138/31 up/down N/A N/A
Ethernet176 172.21.235.140/31 up/up N/A N/A
Ethernet184 172.21.235.142/31 up/down N/A N/A
Ethernet192 172.21.235.144/31 up/down N/A N/A
Ethernet200 172.21.235.146/31 up/down N/A N/A
Ethernet208 172.21.235.148/31 up/down N/A N/A
Ethernet216 172.21.235.150/31 up/down N/A N/A
Ethernet224 172.21.235.152/31 up/down N/A N/A
Ethernet232 172.21.235.154/31 up/down N/A N/A
Ethernet240 172.21.235.156/31 up/down N/A N/A
Ethernet248 172.21.235.158/31 up/down N/A N/A
Loopback0 172.21.240.68/32 up/up N/A N/A
docker0 240.127.1.1/24 up/down N/A N/A
eth0 mgmt 100.126.16.40/25 up/up N/A N/A
lo 127.0.0.1/16 up/up N/A N/A
lo-m mgmt 127.0.0.1/16 up/up N/A N/A

snmpwalk -v2c -c localhost 1.3.6.1.2.1.4.34.1.3.1
iso.3.6.1.2.1.4.34.1.3.1.4.100.126.16.40 = INTEGER: 10000
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.128 = INTEGER: 129
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.130 = INTEGER: 137
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.132 = INTEGER: 145
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.134 = INTEGER: 153
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.136 = INTEGER: 161
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.138 = INTEGER: 169
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.140 = INTEGER: 177
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.142 = INTEGER: 185
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.144 = INTEGER: 193
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.146 = INTEGER: 201
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.148 = INTEGER: 209
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.150 = INTEGER: 217
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.152 = INTEGER: 225
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.154 = INTEGER: 233
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.156 = INTEGER: 241
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.235.158 = INTEGER: 249
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.240.68 = INTEGER: 20000
iso.3.6.1.2.1.4.34.1.3.1.4.240.127.1.1 = INTEGER: 4000
iso.3.6.1.2.1.4.34.1.3.1.4.240.127.1.255 = INTEGER: 4000`

Output of show version:

show ver

SONiC Software Version: SONiC.nvidia_frr_fix.0-dirty-20230315.220429
Distribution: Debian 11.6
Kernel: 5.10.0-18-2-amd64
Build commit: e6fde1d
Build date: Thu Mar 16 05:11:32 UTC 2023
Built by: nikhil.moray@aviz01

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2103T07773
Model Number: MSN2100-CB2FO
Hardware Revision: A2
Uptime: 07:11:54 up 12 days, 2:19, 1 user, load average: 0.36, 0.37, 0.30
Date: Tue 06 Jun 2023 07:11:54

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-macsec nvidia_frr_fix.0-dirty-20230315.102449 ffe5ca533d6b 504MB
docker-dhcp-relay nvidia_frr_fix.0-dirty-20230315.102449 563cd03e1f49 495MB
docker-syncd-mlnx latest 1662bf7b19a7 905MB
docker-syncd-mlnx nvidia_frr_fix.0-dirty-20230315.220429 1662bf7b19a7 905MB
docker-sonic-telemetry latest eb94532bf765 566MB
docker-sonic-telemetry nvidia_frr_fix.0-dirty-20230315.220429 eb94532bf765 566MB
docker-teamd latest 9fd89cf39839 502MB
docker-teamd nvidia_frr_fix.0-dirty-20230315.220429 9fd89cf39839 502MB
docker-snmp latest 3bb8b67c1751 531MB
docker-snmp nvidia_frr_fix.0-dirty-20230315.220429 3bb8b67c1751 531MB
docker-router-advertiser latest a76fa0ec5381 486MB
docker-router-advertiser nvidia_frr_fix.0-dirty-20230315.220429 a76fa0ec5381 486MB
docker-platform-monitor latest 248d40aed86d 910MB
docker-platform-monitor nvidia_frr_fix.0-dirty-20230315.220429 248d40aed86d 910MB
docker-orchagent latest dadbc8e97ea8 520MB
docker-orchagent nvidia_frr_fix.0-dirty-20230315.220429 dadbc8e97ea8 520MB
docker-mux latest b325bcd68d1c 534MB
docker-mux nvidia_frr_fix.0-dirty-20230315.220429 b325bcd68d1c 534MB
docker-lldp latest 127cb2110d03 528MB
docker-lldp nvidia_frr_fix.0-dirty-20230315.220429 127cb2110d03 528MB
docker-fpm-frr latest a38b0551d976 531MB
docker-fpm-frr nvidia_frr_fix.0-dirty-20230315.220429 a38b0551d976 531MB
docker-database latest 75821baa364c 485MB
docker-database nvidia_frr_fix.0-dirty-20230315.220429 75821baa364c 485MB
docker-sonic-mgmt-framework latest e7db28e543ae 598MB
docker-sonic-mgmt-framework nvidia_frr_fix.0-dirty-20230315.220429 e7db28e543ae 598MB
docker-sflow latest b409dc959f35 469MB
docker-sflow nvidia_frr_fix.0-dirty-20230315.220429 b409dc959f35 469MB
docker-nat latest 3c0023dfdcf8 471MB
docker-nat nvidia_frr_fix.0-dirty-20230315.220429 3c0023dfdcf8 471MB

@judyjoseph
Copy link
Contributor

@nmoray-ebay Could you share which release you see this error ?
Which was the version it was working. Can you add more information.

@judyjoseph judyjoseph added the Triaged this issue has been triaged label Jun 7, 2023
@nmoray-ebay
Copy link
Author

@nmoray-ebay Could you share which release you see this error ? Which was the version it was working. Can you add more information.

@judyjoseph
SONiC Software Version: SONiC.nvidia_frr_fix.0-dirty-20230315.220429
Distribution: Debian 11.6
Kernel: 5.10.0-18-2-amd64
Build commit: e6fde1d
Build date: Thu Mar 16 05:11:32 UTC 2023
Built by: nikhil.moray@aviz01

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2103T07773
Model Number: MSN2100-CB2FO
Hardware Revision: A2
Uptime: 10:05:34 up 14 days, 5:13, 2 users, load average: 0.65, 0.59, 0.55
Date: Thu 08 Jun 2023 10:05:34

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-macsec nvidia_frr_fix.0-dirty-20230315.102449 ffe5ca533d6b 504MB
docker-dhcp-relay nvidia_frr_fix.0-dirty-20230315.102449 563cd03e1f49 495MB
docker-syncd-mlnx latest 1662bf7b19a7 905MB
docker-syncd-mlnx nvidia_frr_fix.0-dirty-20230315.220429 1662bf7b19a7 905MB
docker-sonic-telemetry latest eb94532bf765 566MB
docker-sonic-telemetry nvidia_frr_fix.0-dirty-20230315.220429 eb94532bf765 566MB
docker-teamd latest 9fd89cf39839 502MB
docker-teamd nvidia_frr_fix.0-dirty-20230315.220429 9fd89cf39839 502MB
docker-snmp latest 3bb8b67c1751 531MB
docker-snmp nvidia_frr_fix.0-dirty-20230315.220429 3bb8b67c1751 531MB
docker-router-advertiser latest a76fa0ec5381 486MB
docker-router-advertiser nvidia_frr_fix.0-dirty-20230315.220429 a76fa0ec5381 486MB
docker-platform-monitor latest 248d40aed86d 910MB
docker-platform-monitor nvidia_frr_fix.0-dirty-20230315.220429 248d40aed86d 910MB
docker-orchagent latest dadbc8e97ea8 520MB
docker-orchagent nvidia_frr_fix.0-dirty-20230315.220429 dadbc8e97ea8 520MB
docker-mux latest b325bcd68d1c 534MB
docker-mux nvidia_frr_fix.0-dirty-20230315.220429 b325bcd68d1c 534MB
docker-lldp latest 127cb2110d03 528MB
docker-lldp nvidia_frr_fix.0-dirty-20230315.220429 127cb2110d03 528MB
docker-fpm-frr latest a38b0551d976 531MB
docker-fpm-frr nvidia_frr_fix.0-dirty-20230315.220429 a38b0551d976 531MB
docker-database latest 75821baa364c 485MB
docker-database nvidia_frr_fix.0-dirty-20230315.220429 75821baa364c 485MB
docker-sonic-mgmt-framework latest e7db28e543ae 598MB
docker-sonic-mgmt-framework nvidia_frr_fix.0-dirty-20230315.220429 e7db28e543ae 598MB
docker-sflow latest b409dc959f35 469MB
docker-sflow nvidia_frr_fix.0-dirty-20230315.220429 b409dc959f35 469MB
docker-nat latest 3c0023dfdcf8 471MB
docker-nat nvidia_frr_fix.0-dirty-20230315.220429 3c0023dfdcf8 471MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants