cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

Marvell_Kay
New Contributor II
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
1 REPLY 1

Marvell_Kay
New Contributor II
bump
GTM-P2G8KFN