CIDR (Classless Inter-Domain Routing) describes an IP block as a base address followed by a slash and the number of leading bits that identify the network. A /24 fixes 24 bits and leaves 8 for hosts.
Why it matters
CIDR replaced the old class A, B and C system, which wasted huge numbers of addresses. It lets providers allocate any size block and lets routers aggregate many routes into one, which keeps the global routing table smaller. You will meet CIDR in firewall rules, cloud security groups, allowlists and route tables.
Example
| CIDR | Addresses | Subnet mask |
|---|---|---|
| /32 | 1 | 255.255.255.255 |
| /24 | 256 | 255.255.255.0 |
| /16 | 65,536 | 255.255.0.0 |
| /8 | 16,777,216 | 255.0.0.0 |
The rule is 2 raised to (32 minus prefix). So 198.51.100.0/22 covers 1,024 addresses, from 198.51.100.0 to 198.51.103.255.
Common mistakes
- Mixing up direction: a larger prefix number means a smaller block.
- Allowing 0.0.0.0/0 in a firewall rule when you meant a single address, which opens the service to the whole Internet.
- Writing a prefix whose host bits are not zero, such as 10.0.0.5/24, and assuming it means the whole block.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.