09-10-2009 08:07 AM
Is there a way to pull the mib db from the router locally with show commands, or do I have to use snmpwalk?
Solved! Go to Solution.
09-10-2009 08:07 AM
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
snmp get-next
snmp get-bulk v2c IPADDRESS COMMUNITY [retry X] [timeout X] non-repeaters X max-repititions X OID OID
snmp set
09-10-2009 08:56 AM
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.
09-10-2009 08:07 AM
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
snmp get-next
snmp get-bulk v2c IPADDRESS COMMUNITY [retry X] [timeout X] non-repeaters X max-repititions X OID OID
snmp set
09-10-2009 08:57 AM
You have NO idea how much trouble you've saved me :)
Thanks Joe!
John
09-10-2009 09:21 AM
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
09-10-2009 08:37 AM
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.
09-10-2009 09:25 AM
Which command above will allow me to get all of the oids like snmpwalk?
09-10-2009 09:29 AM
Joe,
I found a Cisco mib db listing here to get me started:
ftp://ftp-sj.cisco.com/pub/mibs/oid/
Thanks!
John
09-10-2009 08:56 AM
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.
09-10-2009 12:03 PM
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
09-10-2009 01:16 PM
I would need to see the config from the target router, and the command you're running on the source router.
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: