Books

Saturday, June 01, 2019

How To Tell Which CIDR Notation is Bigger

This post is about how to quickly tell which range, represented by CIDR notation is bigger: that is contains a higher number of IP addresses. It is part of series of posts on Tips to Quickly Perform Binary and CIDR Operations.

How to tell which CIDR notation is bigger

Task:
Given CIDR notations, be able to tell which is bigger: That is which contains more IP addresses.

Step to answer:
The CIDR notation with the biggest IP prefix, contains the lesser IP address.

This can be deduced in the steps outlined in the post: How To Tell The Count of IP Numbers In a CIDR Notation: the larger the prefix, the less the amount that would be left after it is subtracted from 32 or 128 if IPv6.

Example:
Out of the following CIDR prefix: /17, /25, /30 which is the largest and the smallest?
/17 - Largest
/30 - Smallest

I admit, it needs some getting used to, to be able to infer that the smaller number actually depicts a larger range.

Previous post: How To Tell The Count of IP Numbers In a CIDR Notation
Next post: How to quickly tell the first and last ip in a CIDR range

No comments:

Post a Comment