How to calculate CIDR notation from entries in a routing table

Posted by febreezey on Super User See other posts from Super User or by febreezey
Published on 2012-10-03T02:00:32Z Indexed on 2012/10/03 3:41 UTC
Read the original article Hit count: 438

Filed under:
|
|

I have some entries in a routing table that were created using longest prefix matching, and I have to use those entries to determine the a.b.c.d/x notation (CIDR).

This is an example entry:

11001000 00010111 00010.

That was calculated from the range

11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111.

I know the range is from IP addresses 200.23.16.0 to 200.23.23.255, but getting the /x for the subnet # doesn't make sense to me. Anyone know how to properly go about calculating it?

© Super User or respective owner

Related posts about networking

Related posts about ip