Fork me on GitHub

IPv4 CIDR Notation

A system called Classless Inter-Domain Routing, or CIDR, was developed as an alternative to traditional subnetting. The idea is that you can add a specification in 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 192.168.0.15 is associated with the netmask 255.255.255.0 by using the CIDR notation of 192.168.0.15/24. This means that the first 24 bits of the IP address given are considered significant for the network routing.

CIDR allows us more control over addressing continuous blocks of IP addresses. This is much more useful than the subnetting using IPv4 Addresses Classes and Reserved Ranges.

.

.

.

.

/

IPv4 Address

11000000
10101000
01100100
10000000

Subnet Mask

11111111
11111111
11111110
00000000

Subnet

Total IPv4512
Subnet Mask255.255.254.0
Wildcard Mask0.0.1.255
Network192.168.100.0/23
Broadcast Address192.168.101.255
Host Addresses192.168.100.1 - 192.168.101.254

* For routing mask values >= 31, first and last IPs are network and broadcast addresses and are unusable.
Inspired from https://cidr.xyz.