Let’s break down CIDR notation like you’re hearing it for the first time:
CIDR = Classless Inter-Domain Routing
It defines how many bits are used for the network part of an IP address.
Example:
192.168.1.0/24
That /24 means the first 24 bits are for the network, and the rest are for hosts.
Each IP address has 4 octets (sections).
Each octet = 8 bits.
So:
11111111 in binary = 255 in decimal.
This is key to understanding subnet masks!
Let’s see how it works:
/8 = 11111111.00000000.00000000.00000000 → 255.0.0.0 → 16,777,214 hosts
/16 = 11111111.11111111.00000000.00000000 → 255.255.0.0 → 65,534 hosts
/24 = 11111111.11111111.11111111.00000000 → 255.255.255.0 → 254 hosts
/30 = 11111111.11111111.11111111.11111100 → 255.255.255.252 → 2 hosts
/32 = 11111111.11111111.11111111.11111111 → 255.255.255.255 → 1 host
What this means in real life:
•/8 = Over 16 million IPs (used by huge networks)
•/16 = 65k+ IPs (used by ISPs or large companies)
•/24 = 254 usable IPs (used in homes or small offices)
•/30 = 2 IPs (used in point-to-point links between routers)
•/32 = A single device (often used in firewall rules or identifying one server)
Easy trick:
Each 255 = 8 bits set to 1 in binary = /8
So:
•255.255.255.0 = /24
•255.255.255.192 = /26 (because 192 in binary is 11000000 → 2 more bits)
CIDR gives us more flexibility than the old Class A/B/C system.
We can break networks into just the sizes we need — no waste.
If you’re in networking or cybersecurity, CIDR is a concept you’ll use all the time.