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

Fixed issue#15359 by adding support of IpaddrToIfIndex MIB #284

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nmoray
Copy link

@nmoray nmoray commented Jun 30, 2023

- What I did
Added support of ipAddressIfIndex MIB [OID: OID 1.3.6.1.2.1.4.34.1.3] to fix issue#15359.

- How I did it
Updated rfc1213.py to add a support IfIndexUpdater() class which will eventually create a map between Ipaddress and the respective interface index.

- How to verify it

root@sonic:~# show ip int
Interface     Master    IPv4 address/mask    Admin/Oper    BGP Neighbor    Neighbor IP
------------  --------  -------------------  ------------  --------------  -------------
Ethernet0              172.21.227.120/31    up/up         N/A             N/A
Ethernet8              172.21.227.122/31    up/up         N/A             N/A
docker0                 240.127.1.1/24       up/down       N/A             N/A
eth0                    10.4.4.85/23         up/up         N/A             N/A
lo                      127.0.0.1/16         up/up         N/A             N/A

root@sonic:~# ip addr show docker0
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:b3:6d:c9:52 brd ff:ff:ff:ff:ff:ff
    inet 240.127.1.1/24 brd 240.127.1.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fd00::1/80 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link 
       valid_lft forever preferred_lft forever

root@sonic:~# ip addr show Bridge
42: Bridge: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9100 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:30:64:6a:fa:a3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::1837:a4ff:fed5:3cfd/64 scope link 
       valid_lft forever preferred_lft forever

root@sonic:/# snmpwalk -v2c -c <comm> localhost 1.3.6.1.2.1.4.34.1.3
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.227.120 = INTEGER: 1
iso.3.6.1.2.1.4.34.1.3.1.4.172.21.227.122 = INTEGER: 9
iso.3.6.1.2.1.4.34.1.3.1.4.10.4.4.85 = INTEGER: 10000
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
iso.3.6.1.2.1.4.34.1.3.2.16.253.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1 = INTEGER: 4000
iso.3.6.1.2.1.4.34.1.3.2.16.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1 = INTEGER: 4000
iso.3.6.1.2.1.4.34.1.3.2.16.254.128.0.0.0.0.0.0.2.48.100.255.254.106.250.163 = INTEGER: 10000
iso.3.6.1.2.1.4.34.1.3.2.16.254.128.0.0.0.0.0.0.24.55.164.255.254.213.60.253 = INTEGER: 4000

- PR linkage
PR#142

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

Successfully merging this pull request may close these issues.

SNMP MIB Issue: IpAddrToIfIndex MIB is returning wrong interface indexes
1 participant