[c-nsp] howto get next-hop information via SNMP

Bruce Pinsky bep at whack.org
Tue Mar 14 20:30:48 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Per Carlson wrote:
> On Tue Mar 14 15:04:23 2006 +0200, Emanuel Popa wrote:
> 
>> We are trying to find out the next-hop for a specified IP address via
>> SNMP from a Cisco 7600 router. The information would be used to
>> redirect abuse requests automatically to the abuse department from a
>> different region.
>>
>> Has anybody done this in an elegant manner?
> 
> if the 7600 supports the IP-FORWARD-MIB, you could just snmpwalk
> one instance. for example:
> 
> mgmt$ snmpwalk <router> ipCidrRouteNextHop.192.168.1.140
> IP-FORWARD-MIB::ipCidrRouteNextHop.192.168.1.140.255.255.255.255.0.172.17.0.1
> = IpAddress: 172.17.0.1
> 
> the only thing you need to do is append the dotted decimal
> IP-address after the ipCidrRouteNextHop object. the netmask is not
> needed, but could be useful if you have several prefixes with
> different netmasks.
> 
> the cotcha is whether the 7600 supports the MIB or not. the one in
> our lab doesn't...
> 
> mgmt(per)$ snmpwalk <7600> ipCidrRouteNextHop
> IP-FORWARD-MIB::ipCidrRouteNextHop = No Such Object available on
> this agent at this OID
> 
> BTW, our 7600 is currently running:
> 
> mgmt$ snmpwalk <7600> sysDescr.0
> SNMPv2-MIB::sysDescr.0 = STRING: Cisco Internetwork Operating
> System Software
> IOS (tm) c6sup2_rp Software (c6sup2_rp-PSV-M), Version 12.1(26)E6,
> RELEASE SOFTWARE (fc1)
> 

12.2SX supports the "cisco-ized" version of the IETF IP-FORWARD-MIB.  It
can be found at:

ftp://ftp-sj.cisco.com/pub/mibs/v2/CISCO-IETF-IP-FORWARD-MIB.my

The object "ipCidrRouteNextHop" is replaced with "cInetCidrRouteNextHop"
since draft-ietf-ipngwg-rfc2096-update-00.txt was attempting to deprecate
the former.  ipForwardNextHop (from RFC1354) was also deprecated and
replaced by ipCidrRouteNextHop by RFC2096

Version 12.1E only supported the ipRouteTable found MIB-II which has
support for ipRouteNextHop.

- --
=========
bep

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEF25IE1XcgMgrtyYRAsNOAJ96twFtNx47MLTpmuXgdnd25u/XGwCeKUIQ
3lAZkeYMlSW+M0m0kh2Aayk=
=lTH4
-----END PGP SIGNATURE-----


More information about the cisco-nsp mailing list