What is CIDR
A compact way to describe IP ranges
Used in routing, firewall rules, and IP planning
Advertisement
Your ad could be here
Quick summary
CIDR (Classless Inter-Domain Routing) represents IP ranges using a prefix length. Example: 192.0.2.0/24 means the first 24 bits are the network part, leaving the rest for host addresses.
How to read CIDR
- /24 equals 256 IPv4 addresses.
- /16 equals 65,536 IPv4 addresses.
- Higher prefix = smaller range; lower prefix = larger range.
Quick example
203.0.113.0/24 covers 256 IPv4 addresses. In practice, .0 and .255 are reserved in many networks, leaving 254 usable hosts.
203.0.113.0 - 203.0.113.255
Common use cases
- Allow or block a range of IPs in firewall rules.
- Summarize routes in BGP or internal routing.
- Plan subnet allocation for networks.
FAQ
Is CIDR only for IPv4?
No. CIDR applies to both IPv4 and IPv6, using the same prefix length notation.
Why do I see /32 or /128?
Those are single-address routes: /32 for IPv4 and /128 for IPv6.
Does CIDR change the IP address?
No. It describes the size and boundaries of a range.