In article <. com>,
gullu <> wrote:
>Does any one know a resource which provides some statistics about IPv4
>and IPv6 addresses stored in a forwarding table of a router.
>For Example,
>for IPv4, each entry in a forwarding table contains at least the
>destination address and the corresponding next hop. Destination
>addresses might be stored entirely or they can match a set of IP
>addresses. What I am looking for is some statistics that can tell me
>how on the average how many entries are of the form
>127.123.65.42
>136.121.45.12x (where 'x' means a don't care i.e. use the longest
>prefix matching here)
>136.121.45.1xx (where 'x' means a don't care i.e. use the longest
>prefix matching here)
>136.141.54.xxx (where 'x' means a don't care i.e. use the longest
>prefix matching here)
>136.141.5x.xxx (where 'x' means a don't care i.e. use the longest
>prefix matching here)
> and so on.
Your examples hint that you might be misunderstanding the routing
table. "longest prefix matching" does not use the decimal address
values: it uses the binary addresses, the "longest" is based upon
the number of bits matched, not the number of decimal digits matched.
Cisco routers do not keep statistics about the routing table size
(and on Cisco routers, the routing process can end up being -much-
more complex than a simple forwarding table.) However, you can
generate these kinds of statistics yourself by using snmp to
periodically read out the forwarding table and doing some simple
totalling. You want the IP-FORWARD-MIB, base OID 1.3.6.1.2.1.4.24
In particular, you might want ipCidrRouteTable 1.3.6.1.2.1.4.24.4
or the inetCidrRouteTable 1.3.6.1.2.1.4.24.7
http://tools.cisco.com/Support/SNMP/...6.1.2.1.4.24.7