Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

SNMP browser using Tcl scripts

I wonder if there is a way to implement a Mib browser with limited functionality using Tcl. I know that one can examine the MIB on the router itself but I need the ability to query a box that is sitting in front of a router (an EVDO box for example). There is a ASN.1 Tcl library that could be used but the real problem is, there is no native UDP support in Tcl. Are there any UDP extensions for Cisco or is there a different way to do that?



Cisco Employee

Re: SNMP browser using Tcl scripts

UDP support is coming for Tcl in an upcoming 12.4T release. However, you can use the built-in SNMP Manager capability in IOS to do simple polling of external devices. Unfortunately, things like SNMP Walks will be difficult since some MIB objects will come back translated to object names, and it will be difficult to determine if an object is lexicographically greater than a previous object.

To enable SNMP Manager, configure:

snmp-server manager

Then, you can use the following commands from example mode:

snmp get IPADDRESS COMMUNITY [retry X] [timeout X] oid OID

snmp get-next IPADDRESS COMMUNITY [retry X] [timeout X] oid OID

snmp get-bulk v2c IPADDRESS COMMUNITY [retry X] [timeout X] non-repeaters X max-repititions X OID OID

snmp set IPADDRESS COMMUNITY [retry X] [timeout X] oid VARBIND {integer | string | ip-address | counter | gauge | timeticks} VALUE ...

New Member

Re: SNMP browser using Tcl scripts

Thanks for the reply. I must be missing something. I was able to configure the snmp-server manager but I do not have a 'snmp get' available. In enable mode snmp is unknown and in config mode I can only chose between snmp mib|ifmib. I am running 12.4(15)T7 (advanced IP services) on a Cisco 871 router.

Cisco Employee

Re: SNMP browser using Tcl scripts

The commands are all hidden. You must type them out. Using '?' will not work.