CIDR Notation

What is CIDR Notation?

A system called 'Classless Inter-Domain Routing', or CIDR, was developed as an alternative to the specification of IP address ranges using subnet masks. With CIDR you can add a specification to the IP address itself as to the number of significant bits that make up the routing or networking portion.


For example, we could express the idea that the IP address is associated with the netmask by using the CIDR notation of This means that the first 24 bits of the IP address given are considered significant for the network routing.

Advantages of CIDR Notation

This allows us some interesting possibilities. We can use these to reference “supernets”. In this case, we mean a more inclusive address range that is not possible with a traditional subnet mask. For instance, in a class C network, like above, we could not combine the addresses from the networks and because the netmask for class C addresses is

However, using CIDR notation, we can combine these blocks by referencing this network address range as This specifies that there are 23 bits used for the network portion that we are referring to.

So the first network ( could be represented like this in binary:

1100 0000 - 1010 1000 - 0000 0000 - 0000 0000

While the second network ( would be like this:

1100 0000 - 1010 1000 - 0000 0001 - 0000 0000

The CIDR address we specified indicates that the first 23 bits are used for the network block we are referencing. This is equivalent to a netmask of, or:

1111 1111 - 1111 1111 - 1111 1110 - 0000 0000

As you can see, with this block the 24th bit can be either 0 or 1 and it will still match, because the network block only cares about the first 23 digits. As such, CIDR allows us more control over addressing continuous blocks of IP addresses.

Additional Information

Read more about Notation for Networking in the original Digital Ocean article.