Page MenuHomeVyOS Platform

SNMP GET broken at least for BGP4-MIB
Needs testing, Requires assessmentPublicBUG

Description

Hello,

1.2.0-rolling+201901100337 has some issues related to SNMP processing.
Walk and Get requests to exact OID gives "No such instance" result instead of correct value:

Walk returns exact OID:

# snmpwalk -v2c -c public 10.10.10.10 SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1
SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2 = INTEGER: 0

Trying to walk exact OID:
# snmpwalk -v2c -c public 10.10.10.10 SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2
SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2 = No Such Instance currently exists at this OID

Trying to GET exact OID:
# snmpget -v2c -c public 10.10.10.10 SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2
SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2 = No Such Instance currently exists at this OID

Trying the same host rebooted to VyOS 1.1.8:
# snmpget -v2c -c public 10.10.10.10 SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2
SNMPv2-SMI::mib-2.15.6.1.10.10.3.1.0.24.10.0.1.2 = INTEGER: 0

Thanks.

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.0-rolling+201901100337
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Dmitry changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
Dmitry set Is it a breaking change? to Unspecified (possibly destroys the router).
[email protected]:/home/vyos# snmpget -v 2c -c public 192.168.122.11 IF-MIB::ifAdminStatus.1
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)

@MaxiM In which exact version was a different behavior?
The same result ever in 1.1.8

[email protected]:/home/vyos# snmpwalk -v 2c -c public 192.168.122.15 SNMPv2-SMI::mib-2.15.6.1.1
SNMPv2-SMI::mib-2.15.6.1.1.192.168.122.0.24.192.168.122.11 = IpAddress: 192.168.122.11
[email protected]:/home/vyos# 
[email protected]:/home/vyos# snmpwalk -v 2c -c public 192.168.122.15 SNMPv2-SMI::mib-2.15.6.1.1.1
SNMPv2-SMI::mib-2.15.6.1.1.1 = No Such Instance currently exists at this OID
[email protected]:/home/vyos#

Are you sure, that you use the correct mibs??
Most likely you need this? SNMPv2-SMI::mib-2.15.6.1.1. <<

[email protected]:/home/vyos# snmpwalk -v 2c -c public 192.168.122.15 SNMPv2-SMI::mib-2.15.6
SNMPv2-SMI::mib-2.15.6.1.1.192.168.122.0.24.192.168.122.11 = IpAddress: 192.168.122.11
SNMPv2-SMI::mib-2.15.6.1.2.192.168.122.0.24.192.168.122.11 = INTEGER: 24
SNMPv2-SMI::mib-2.15.6.1.3.192.168.122.0.24.192.168.122.11 = IpAddress: 192.168.122.0
SNMPv2-SMI::mib-2.15.6.1.4.192.168.122.0.24.192.168.122.11 = INTEGER: 2
SNMPv2-SMI::mib-2.15.6.1.5.192.168.122.0.24.192.168.122.11 = Hex-STRING: 02 02 FD E9 FD EA
SNMPv2-SMI::mib-2.15.6.1.6.192.168.122.0.24.192.168.122.11 = IpAddress: 192.168.122.12
SNMPv2-SMI::mib-2.15.6.1.7.192.168.122.0.24.192.168.122.11 = INTEGER: 0
SNMPv2-SMI::mib-2.15.6.1.8.192.168.122.0.24.192.168.122.11 = INTEGER: 0
SNMPv2-SMI::mib-2.15.6.1.9.192.168.122.0.24.192.168.122.11 = INTEGER: 1
SNMPv2-SMI::mib-2.15.6.1.10.192.168.122.0.24.192.168.122.11 = INTEGER: 0
SNMPv2-SMI::mib-2.15.6.1.11.192.168.122.0.24.192.168.122.11 = IpAddress: 0.0.0.0
SNMPv2-SMI::mib-2.15.6.1.12.192.168.122.0.24.192.168.122.11 = INTEGER: -1
SNMPv2-SMI::mib-2.15.6.1.13.192.168.122.0.24.192.168.122.11 = INTEGER: 1

c-po changed the task status from Open to Needs testing.May 29 2021, 4:39 PM
c-po added a subscriber: c-po.

We have had a lot of tickets about SNMP MIBS for BGP - most of them beeing for IPv6.

I am not an expert on SNMP MIBS but we can now easily extend out MIBS by simply adding the MIB in question to:
https://github.com/vyos/vyos-1x/tree/current/data/mibs

@MaxiM In which exact version was a different behavior?

Are you sure, that you use the correct mibs??
Most likely you need this? SNMPv2-SMI::mib-2.15.6.1.1. <<

I never got true behaviour in VyOS.
Just comparing it to Cisco/JunOS.