09-24-2010 12:31 PM
Hello,
using standard mib2 it is possible to read a router's routing table by snmp. But apparently this is just for router without different VRFs. Is there a way to read vrf specific routing tables by SNMP?
09-25-2010 10:17 AM
You need to use SNMP contexts to poll MIB data from individual VRFs. See this document for more details:
http://www.cisco.com/en/US/partner/docs/ios/12_3t/12_3t2/feature/guide/gtsnmpvp.html
09-16-2013 10:18 PM
Hi.
Can anyone give good example on the topic?
The URL above doesn't open.
All info i've found talks about sending traps, but i need to query router.
Tried config like this:
ip vrf LAN
rd 5:5
snmp context LAN
snmp-server user lan lan v2c
snmp-server group lan v2c context LAN
snmp-server host 10.96.37.103 vrf LAN version 2c lan
snmp mib target list lan vrf LAN
but snmp-tools give no result:
# snmpbulkwalk -c lan 10.96.200.56 .1.3.6.1.2.1.4.21
.1.3.6.1.2.1.4.21 = No more variables left in this MIB View (It is past the end of the MIB tree)
09-17-2013 09:00 AM
The document moved. Check out
http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/configuration/12-4t/nm-snmp-vpn-context.html . There are a few commands you need to add to map the user to the community.
04-24-2020 04:08 AM
Hi all,
I tried on a ISR4451, IOS XE 3.16 (15.5.3).
You do not even have to configure a snmp user. Use the following command in (config-vrf) mode or (config-vrf-af) mode.
snmp context <context name> community <community> ro
That done, you can use
snmpwalk -v 2c -c <community> <host> 1.3.6.1.2.1.4.24.4.1
Using different communities for different vrfs, you get all routing tables from all vrfs using the same oid.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide