cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
754
Views
0
Helpful
9
Replies

MIBs on a router

John Blakley
VIP Alumni
VIP Alumni

Is there a way to pull the mib db from the router locally with show commands, or do I have to use snmpwalk?

HTH, John *** Please rate all useful posts ***
2 Accepted Solutions

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

You have to use an SNMP operation. IOS has a built-in SNMP manager which can be enabled with the command:

snmp-server manager

Then, you can use snmp get and get-next directly from the device:

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 ...

View solution in original post

Joe Clarke
Cisco Employee
Cisco Employee

None, unfortunately. You can't use these commands to build a proper SNMP Walk since some of the OIDs come back partially translated. However, if you want to see all of the OIDs supported by a given device, use the command:

show snmp mib

You can then plug those OIDs into the "snmp get" command to get their values.

View solution in original post

9 Replies 9

Joe Clarke
Cisco Employee
Cisco Employee

You have to use an SNMP operation. IOS has a built-in SNMP manager which can be enabled with the command:

snmp-server manager

Then, you can use snmp get and get-next directly from the device:

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 ...

You have NO idea how much trouble you've saved me :)

Thanks Joe!

John

HTH, John *** Please rate all useful posts ***

Joe,

I'm not great with snmp, but this isn't working. I can enable snmp-server manager, but when I try to do the above commands, it doesn't work. It says that it's invalid. What version IOS do I need for this to be able to work? I'm trying to get the oid for the interface that I need to monitor in the other thread that we were discussing. The problem is that I'm running this in gns (same IOS I'm running on my real routers), and I don't have any other way to be able to pull the mibs.

Thanks,

John

HTH, John *** Please rate all useful posts ***

Joe Clarke
Cisco Employee
Cisco Employee

The SNMP commands are hidden. You won't be able to use '?' to get help from the parser. Just type blindly following me examples. If you provide me the full inputs to the command, I can give you the exact command to type.

Which command above will allow me to get all of the oids like snmpwalk?

HTH, John *** Please rate all useful posts ***

Joe,

I found a Cisco mib db listing here to get me started:

ftp://ftp-sj.cisco.com/pub/mibs/oid/

Thanks!

John

HTH, John *** Please rate all useful posts ***

Joe Clarke
Cisco Employee
Cisco Employee

None, unfortunately. You can't use these commands to build a proper SNMP Walk since some of the OIDs come back partially translated. However, if you want to see all of the OIDs supported by a given device, use the command:

show snmp mib

You can then plug those OIDs into the "snmp get" command to get their values.

Joe,

I've got two routers, back to back, in gns. I configured snmp on one router, and then I enabled snmp-server manager on the other. I can't get anything from one router to the other. I'm assuming this could be a problem with gns, or is this an issue with using the get statement on the router?

I also tried forwarding udp using a helper statement thinking that was doing something, but it still times out.

Thanks,

John

HTH, John *** Please rate all useful posts ***

I would need to see the config from the target router, and the command you're running on the source router.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: