01-17-2007 02:07 PM
I'd like to get some GRE tunnel specific config parameters via SNMP. Given
interface tunnel 1
ip address 1.1.1.1 255.255.255.252
tunnel source 2.2.2.2
tunnel destination 3.3.3.3
How do I extract the tunnel source & tunnel destination via SNMP? I've found the interface number & interface ip address via an snmpwalk; but I've yet to locate the tunnel source / destination. Is there a particular mib or oid this is tracked in?
01-18-2007 06:30 AM
It doesn't look like there is a specific object for GRE tunnel source/destination as of yet. I see that there are objects for IPSec tunnels, but not GRE.
Abou the best workaround I could find would be to do the following:
Poll the ifTable, especially the ifDescr object.This will give you the names of all intefaces configured on the router
snmpwalk -c public router_ip_address ifDescr
router_ip_address can be any address on this router (reachable) from the NMS station.
Then locate the index assigned to the tunnel interface
example: IF-MIB::ifDescr.20 = STRING: Tunnel1
and do
snmpwalk -c public router_ip_address
ipAddrEntry
This alternative would only give you the source address of the tunnel, defined locally.
Another workaround would be to put an explanatory description on the router's local Tunnel interface indicating the remote address of the tunnel and then poll the ifAlias Object from the ifTable MIB as follows:
snmpwalk -c public router_ip_address ifAlias
There you would see the description of the tunnel interface pointing to the remote tunnel interface's address.
04-11-2014 09:02 AM
I know this is 7 years old... sorry!
But wouldn't this solution (snmpwalk -c public router_ip_address ifAlias) just give the interface address as opposed to the tunnel source? So in this case, you would only be able to find 1.1.1.1 and not 2.2.2.2. Is there a way to find the tunnel source, then?
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