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

MIBs on a router

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
Cisco Employee

Re: MIBs on a router

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

Cisco Employee

Re: MIBs on a router

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.

9 REPLIES
Cisco Employee

Re: MIBs on a router

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

Re: MIBs on a router

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

Thanks Joe!

John

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

Re: MIBs on a router

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 ***
Cisco Employee

Re: MIBs on a router

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.

Re: MIBs on a router

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

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

Re: MIBs on a router

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 ***
Cisco Employee

Re: MIBs on a router

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.

Re: MIBs on a router

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 ***
Cisco Employee

Re: MIBs on a router

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

304
Views
0
Helpful
9
Replies
CreatePlease to create content