SNMP walk/get from the the Cisco IOS CLI

SNMP walk/get from the the Cisco IOS CLI

In my previous post I have discussed about how to do a SNMP walk from the MIB browser or from the Cisco Prime Infrastructure.

http://the-ethernets.com/2020/09/using-mib-browser-for-snmp-walk-query/

http://the-ethernets.com/2020/09/snmpwalk-from-cisco-prime-infrastructure/

 

However many a times you would like to test if the device is responding to a specific MIB/OID or not, while you don’t have access to the PI or you cannot connect to the device via MIB browser.

Interestingly the Cisco IOS device does support querying the device itself for a specific OID using SNMP under the tclsh (TCL shell).

Enable the snmp server manager on the device using the command:

 

Router(config)# snmp-server manager

Router#tclsh
Router(tcl)#snmp_getnext TEST 1.3.6.1.4.1.9.9.13.1.3 // here TEST is the community {<obj oid=’ciscoEnvMonTemperatureStatusEntry.2.1′ val=’chassis’/>}

More on this is available on the following link:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/15-mt/ios-tcl-15-mt-book/nm-script-tcl.html#GUID-C3694BC4-2CD9-4873-843B-3CDA5B4FCC39

Happy Reading…..

SNMPWALK from Cisco Prime Infrastructure

SNMPWALK from Cisco Prime Infrastructure

Many a times when information is not polled correctly on Cisco PI, from your WLC or any other added devices, you would like to check if the device is responding to SNMP queries send by the Cisco Prime or not.

SNMP walk would be good test to check if are getting any SNMP response from the managed devices. Following would be the syntax for the Snmpv2 and Snmpv3 for doing an snmp walk from your Cisco Prime.

You need to have root access to run the snmpwalk on the Cisco Prime. 

SNMPWALK VERSION 2:

nms-pi/admin# rootEnter root patch password :
Starting root bash shell …
ade # su –

[root@nms-pi ~]# snmpwalk -v2c -c <community> <ip>

You can also follow this with the OID or the MIB identifier you want to query, like: 

[root@nms-pi ~]#snmpwalk -v2c -c bharath 10.10.10.10 1.3.6.1.4.1.9.9.513.1.2.10.1.2
[root@nms-pi ~]#snmpwalk -v2c -c bharath 10.10.10.10 cLApDot11RadioRateStatsRxPackets

SNMPWALK VERSION 2:

[root@nms-pi ~]#snmpwalk -v3 -l <noAuthNoPriv|authNoPriv|authPriv> -u <username> [-a <MD5|SHA>] [-A <authphrase>]  [-x DES|AES] [-X <privaphrase>] <ipaddress>[:<dest_port>]

[root@nms-pi ~]#snmpwalk -v3 -u piv3user -l authPriv -a SHA -A piv3user1234 -x AES -X piv3user1234 10.10.10.1 cLApDot11RadioRateStatsRxPackets

Happy Reading….

Using MIB Browser for SNMP Walk/Query

Using MIB Browser for SNMP Walk/Query

At times you would need to quick easy way to do a SNMPwalk/query for specific OIDs of your managed devices for some troubleshooting purpose.

This could be done using open/free snmp tools available on the internet. I found the Ireasoning mib browser quick helpful and easy.

http://ireasoning.com/mibbrowser.shtml

Install the Mib Browser and add your managed device using v2/v3.

Configured the MIB browser as following: Tools > Options > Agent > Add > Add the managed device ip address and the community string.

Get the correct MIB file for your managed device. I am using Cisco WLC as the managed device and got the MIB downloaded from the Cisco support Site.

http://software.cisco.com/download/release.html?mdfid=284493532&flowid=34542&softwareid=280775088&release=8.0&relind=AVAILABLE&rellifecycle=&reltype=latest

Load the correct MIB file on the Mib Browser. File > Load Mibs > Choose the file location.

Browse and poll for the related OID.

I am polling for the AP native vlan Id as follows:

If you know the OID, you can directly use the OID and do get to get the related information:


Happy Reading…..