ipRouteTable, common subnet base?

Sep 29, 2005 3 Replies

I am looking at ip.ipRouteTable.ipRouteEntry (on a Cisco router), and I am wondering what I should be looking at to detect subnets with a common base address.



I see X.Y.Z.0/29 and X.Y.Z.8/29 clearly in the ipRouteEntry data, but I do not see how the larger route for X.Y.Z.0/24 is represented?



There is only one possible entry for ip.ipRouteTable.ipRouteEntry.ipRouteNextHop.X.Y.Z.0 in the table structure for example. I see that the ipRouteNextHop there is the router interface IP within X.Y.Z.0/29 so maybe some kind of "loopback" is going on, but I don't see quite how that would work when it came to deciding how to route X.Y.Z.0/29 itself ?


The ipRouteTable is seriously broken and can't really represent CIDR forwarding table entries. RFC 2096 defines the IP-FORWARD-MIB which provides you with a forwarding table which support CIDR. Another revision of this MIB which also adds support for IPv6 if waiting for publication. The ID is . Section 4 in this ID explains the evolution of the MIB module over time.

The bottom line is that you want to use the most recent forwarding table that your device supports. The ipRouteTable is nowadays simply broken. Still, many agents populate this table since the device vendors somehow believe it is better to "fool" customers by providing a misleading view on the forwarding engine instead of doing the right thing and not implement ipRouteTable at all.

/js

In article , Juergen Schoenwaelder wrote: :In comp.protocols.snmp Walter Roberson wrote: :> I am looking at ip.ipRouteTable.ipRouteEntry (on a Cisco router), :> and I am wondering what I should be looking at to detect subnets :> with a common base address.

:The ipRouteTable is seriously broken and can't really represent CIDR :forwarding table entries. RFC 2096 defines the IP-FORWARD-MIB which :provides you with a forwarding table which support CIDR.

Thanks for the reference. It appears that's at .1.3.6.1.2.1.4.24 and that the overall structure is analogous to ipRouteTable .

Yes similar, but the indexing makes a big difference:

ipRouteEntry: INDEX {ipRouteDest}

ipCidrRouteEntry: INDEX {ipCidrRouteDest, ipCidrRouteMask, ipCidrRouteTos, ipCidrRouteNextHop}

And the latest yet to be published revision of this MIB module has the following:

inetCidrRouteEntry: INDEX {inetCidrRouteDestType,inetCidrRouteDest,inetCidrRoutePfxLen, inetCidrRoutePolicy,inetCidrRouteNextHopType,inetCidrRouteNextHop}

(But to be honest, the indexing structure did not change that much except that IPv4/IPv6 support requires to blow up the index quite a bit.)

/js

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required