Re: SNMP quandry

From: R.P. Aditya (aditya@grot.org)
Date: Wed Jan 09 2002 - 15:14:24 EST


On Wed, Jan 09, 2002 at 11:58:53AM +0200, Hank Nussbacher wrote:
> At 09:58 AM 08-01-02 -0800, R.P. Aditya wrote:
> >On Tue, Jan 08, 2002 at 07:50:30PM +0200, Hank Nussbacher wrote:
> >> snmpget router-ip public .1.3.6.1.2.1.4.21.1.7.192.168.168.0
> >>
> >> ip.ipRouteTable.ipRouteEntry.ipRouteMask.192.168.168.0 = IpAddress:
> >> 255.255.255.240
> >
> >Try just:
> >
> > snmpget router-ip public .1.3.6.1.2.1.4.21.1.7.192.168.168
> >
> >And that should give you all the routes that start with 192.168.168
>
> Tried it. Doesn't work. Returns just one prefix :-(

oops, the numerical OID you gave above that I used is for ipRouteNextHop which
isn't what you want -- try:

  snmpget router-ip public .1.3.6.1.2.1.4.21.1.1.192.168.168

which corresponds to:

  ip.ipRouteTable.ipRouteEntry.ipRouteDest.192.168.168

and then, using the routes you get back, you can get their netmasks by using
them in the .7.x.x.x.x form of the above snmpget.

BTW, a useful web-based SNMP browser is at:

  http://www.ibr.cs.tu-bs.de/cgi-bin/sbrowser.cgi?HOST=&OID=IP-MIB!ip

Adi



This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:13:28 EDT