cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13305
Views
5
Helpful
4
Replies

Reading routing table for different VRF's by SNMP

Dirk Feldhaus
Level 1
Level 1

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?

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

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

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)

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.

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.