Skip to content

SNMP: IfIndex MIB [RFC 1213] starts from 0 #13049

@nmoray-ebay

Description

@nmoray-ebay

Description

The Interface index MIB [OID:1.3.6.1.2.1.2.2.1.1] in SONiC starts from 0. As per RFC 1213, the IfIndex should be ranging from 1 to the value of ifNumber.

Steps to reproduce the issue:

  1. Do a snmpwalk for OID: 1.3.6.1.2.1.2.2.1.1
  2. Check the IfIndex mapping. It starts from 0.

Describe the results you received:

root@SN2100-Leaf1:/# snmpwalk -v2c -c public localhost 1.3.6.1.2.1.2.2.1.1
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 0
iso.3.6.1.2.1.2.2.1.1.5 = INTEGER: 4
iso.3.6.1.2.1.2.2.1.1.9 = INTEGER: 8
iso.3.6.1.2.1.2.2.1.1.13 = INTEGER: 12
iso.3.6.1.2.1.2.2.1.1.17 = INTEGER: 16
iso.3.6.1.2.1.2.2.1.1.21 = INTEGER: 20
iso.3.6.1.2.1.2.2.1.1.25 = INTEGER: 24

Describe the results you expected:

iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.5 = INTEGER: 5
iso.3.6.1.2.1.2.2.1.1.9 = INTEGER: 9
iso.3.6.1.2.1.2.2.1.1.13 = INTEGER: 13
iso.3.6.1.2.1.2.2.1.1.17 = INTEGER: 17
iso.3.6.1.2.1.2.2.1.1.21 = INTEGER: 21
iso.3.6.1.2.1.2.2.1.1.25 = INTEGER: 25

Output of show version:

SONiC Software Version: SONiC.202111.0-dirty-20221010.231127
Distribution: Debian 11.5
Kernel: 5.10.0-8-2-amd64
Build commit: ec691aa9f
Build date: Tue Oct 11 07:54:06 UTC 2022
Built by: kuldip.patel@aviz01

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1950X05002
Model Number: MSN2100-CB2FO
Hardware Revision: A2
Uptime: 02:17:01 up 1 day,  3:46,  1 user,  load average: 0.24, 0.25, 0.45

Docker images:
REPOSITORY                    TAG                              IMAGE ID       SIZE
avizdock/ones-agent           v1.0.0                           5a2603b6a936   645MB
docker-dhcp-relay             latest                           890165d1d890   442MB
docker-teamd                  202111.0-dirty-20221010.231127   9e11eeacb228   443MB
docker-teamd                  latest                           9e11eeacb228   443MB
docker-syncd-mlnx             202111.0-dirty-20221010.231127   27f47464cdb1   928MB
docker-syncd-mlnx             latest                           27f47464cdb1   928MB
docker-sonic-telemetry        202111.0-dirty-20221010.231127   25aadf90f50c   517MB
docker-sonic-telemetry        latest                           25aadf90f50c   517MB
docker-sonic-mgmt-framework   202111.0-dirty-20221010.231127   843df6f803e6   585MB
docker-sonic-mgmt-framework   latest                           843df6f803e6   585MB
docker-snmp                   202111.0-dirty-20221010.231127   46007feaed7f   472MB
docker-snmp                   latest                           46007feaed7f   472MB
docker-sflow                  202111.0-dirty-20221010.231127   e89436c8880a   443MB
docker-sflow                  latest                           e89436c8880a   443MB
docker-router-advertiser      202111.0-dirty-20221010.231127   5df23e70624a   428MB
docker-router-advertiser      latest                           5df23e70624a   428MB
docker-platform-monitor       202111.0-dirty-20221010.231127   fe3e4ad48b2f   820MB
docker-platform-monitor       latest                           fe3e4ad48b2f   820MB
docker-orchagent              202111.0-dirty-20221010.231127   bf418d947316   460MB
docker-orchagent              latest                           bf418d947316   460MB
docker-nat                    202111.0-dirty-20221010.231127   291ea6094720   445MB
docker-nat                    latest                           291ea6094720   445MB
docker-mux                    202111.0-dirty-20221010.231127   b597c3040a27   481MB
docker-mux                    latest                           b597c3040a27   481MB
docker-macsec                 202111.0-dirty-20221010.231127   646a92998af7   446MB
docker-macsec                 latest                           646a92998af7   446MB
docker-lldp                   202111.0-dirty-20221010.231127   d1cf3fae008a   468MB
docker-lldp                   latest                           d1cf3fae008a   468MB
docker-fpm-frr                202111.0-dirty-20221010.231127   74a326b8bfff   461MB
docker-fpm-frr                latest                           74a326b8bfff   461MB
docker-database               202111.0-dirty-20221010.231127   19a368f709dc   428MB
docker-database               latest                           19a368f709dc   428MB

Metadata

Metadata

Labels

Triagedthis issue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions