Introduction
CIDR (Classless Inter-Domain Routing) notation replaced the old classful IP addressing system. It provides a flexible way to specify IP address ranges and subnet masks in a compact format.
What is CIDR?
CIDR uses slash notation to specify how many bits are used for the network portion:
192.168.1.0/24
│
└─ 24 bits for network, 8 bits for hosts
Breaking Down CIDR
192.168.1.0/24:
- Network bits: 24
- Host bits: 8 (32 - 24)
- Subnet mask: 255.255.255.0
- Number of hosts: 2^8 - 2 = 254
CIDR vs Traditional Subnet Masks
Traditional Notation
IP Address: 192.168.1.0
Subnet Mask: 255.255.255.0
CIDR Notation
192.168.1.0/24
Advantages:
- More compact
- Easier to calculate
- Flexible (any number of bits)
Common CIDR Blocks
| CIDR | Subnet Mask | Hosts | Networks | Use Case |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16M+ | 1 | Very large networks |
| /16 | 255.255.0.0 | 65K | 256 | Large organizations |
| /24 | 255.255.255.0 | 254 | 65K | Small networks |
| /32 | 255.255.255.255 | 1 | 4B | Single host |
Calculating CIDR
From Subnet Mask
Subnet Mask: 255.255.255.0
Binary: 11111111.11111111.11111111.00000000
Bits: 8 + 8 + 8 + 0 = 24
CIDR: /24
Number of Hosts
Hosts = 2^(32 - CIDR) - 2
Examples:
/24: 2^8 - 2 = 254 hosts/25: 2^7 - 2 = 126 hosts/30: 2^2 - 2 = 2 hosts
Tools
Use our tools:
- CIDR Calculator - Calculate CIDR ranges
- IP Subnet Calculator - Calculate subnet information
Conclusion
CIDR notation simplifies IP addressing:
Key concepts:
- Slash notation
- Network vs host bits
- Flexible addressing
- Modern standard
Benefits:
- Compact notation
- Easy calculations
- Flexible subnetting
- Efficient routing
Next Steps
- Calculate with CIDR Calculator
- Learn IP Subnetting
- Explore Network Planning