SNMP query to get routing table info and search first 2 octets

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • Doesn't Need an Answer
I have a simple python script that does a SNMP walk on a Extreme switch and returns routing table.  

snmpwalk -v2c extreme-sw1.com -c comm-string  .1.3.6.1.2.1.4.21.1.11

The issue is, this slows down the script significantly as it takes around 1 minute to complete listing whole routing table.  I do not need to search whole routing table but instead want it so if I specify first 2 octets, it shows me only entries that start with that.   

For some strange reason the above OID allows me to specify first three octets but not 2.

For example:

snmpwalk -v2c extreme-sw1.com -c comm-string  .1.3.6.1.2.1.4.21.1.11.10.10.0

This will give me all ips starting with 10.10.0 in couple seconds.  However if I do this:

snmpwalk -v2c extreme-sw1.com -c comm-string  .1.3.6.1.2.1.4.21.1.11.10.10

It says "No Instance exists for this OID".

Is there any way to make it work with 2 octets or if Extreme has a special OID MIB I can download that will allow me to achieve searching in this fashion?

Thanks
Photo of Marvell Kay

Marvell Kay

  • 280 Points 250 badge 2x thumb

Posted 7 months ago

  • 0
  • 1
Photo of Marvell Kay

Marvell Kay

  • 280 Points 250 badge 2x thumb
bump