What Is CIDR Notation? IP Address Ranges Explained
Key takeaways
- A /24 is a prefix length, not a count of 24 addresses.
- A larger prefix number describes a smaller block within the same IP version.
- Total addresses and addresses available to devices are different quantities.
- The address at the start of a network block must align with its size.
On this page
- How do you read a CIDR block?
- How do you calculate the number of addresses?
- Common IPv4 CIDR sizes
- Why does block alignment matter?
- Are all addresses in a block usable by devices?
- What is the difference between CIDR and subnetting?
- Does CIDR notation apply to IPv6?
- Where will you encounter CIDR notation?
- FAQ
- Related resources
CIDR notation describes an IP address range using an address, a slash, and a prefix length. For example, 192.0.2.0/24 describes a block of 256 IPv4 addresses, from 192.0.2.0 through 192.0.2.255.
CIDR stands for Classless Inter-Domain Routing. The number after the slash tells you how many leading bits belong to the network prefix. It does not tell you the number of devices in the range. The notation and classless addressing model are described in RFC 4632.
How do you read a CIDR block?
Consider 192.0.2.0/24:
| Part | Meaning |
|---|---|
192.0.2.0 | The starting address of this block |
/24 | The first 24 bits form the network prefix |
| Remaining 8 bits | The part that varies within the block |
| 256 addresses | The number of possible values in those 8 bits |
IPv4 addresses contain 32 bits. If 24 are fixed by the prefix, 8 remain. Eight bits have 28, or 256, possible values.
The IPv4 examples using 192.0.2.0/24 and 203.0.113.0/24 in this article are drawn from ranges reserved for documentation. They illustrate the notation and are not public addresses to assign to a live service.
How do you calculate the number of addresses?
For an IPv4 block, use:
Total addresses = 2^(32 - prefix length)
For example:
/24: 32 - 24 = 8 remaining bits, so 28 = 256 addresses./26: 32 - 26 = 6 remaining bits, so 26 = 64 addresses./28: 32 - 28 = 4 remaining bits, so 24 = 16 addresses.
Each time the prefix length increases by one, the block size halves. A /25 is half the size of a /24, and a /26 is half the size of a /25.
Common IPv4 CIDR sizes
| CIDR prefix | Equivalent subnet mask | Total addresses |
|---|---|---|
/16 | 255.255.0.0 | 65,536 |
/24 | 255.255.255.0 | 256 |
/25 | 255.255.255.128 | 128 |
/26 | 255.255.255.192 | 64 |
/27 | 255.255.255.224 | 32 |
/28 | 255.255.255.240 | 16 |
/29 | 255.255.255.248 | 8 |
/30 | 255.255.255.252 | 4 |
/31 | 255.255.255.254 | 2 |
/32 | 255.255.255.255 | 1 |
A subnet mask expresses the same network boundary as the prefix length. For example, 255.255.255.0 contains 24 leading one-bits followed by 8 zero-bits, making it equivalent to /24. See What Is a Subnet? for how a device uses that boundary.
Why does block alignment matter?
A CIDR block is not an arbitrary starting address followed by a count. Its start must align with the boundary set by its prefix.
For example, splitting 203.0.113.0/24 into four equal /26 blocks produces:
| Block | First address | Last address | Total |
|---|---|---|---|
203.0.113.0/26 | 203.0.113.0 | 203.0.113.63 | 64 |
203.0.113.64/26 | 203.0.113.64 | 203.0.113.127 | 64 |
203.0.113.128/26 | 203.0.113.128 | 203.0.113.191 | 64 |
203.0.113.192/26 | 203.0.113.192 | 203.0.113.255 | 64 |
The starts advance in steps of 64. 203.0.113.20/26 can describe an interface address with its prefix length, but it is not the aligned name of a network block. The containing block starts at 203.0.113.0.
A tool expecting a network block may reject a non-aligned value or normalize it. AWS documents canonicalizing subnet CIDR entries, illustrating why you should check the resulting range rather than assume the typed address becomes its start.
Are all addresses in a block usable by devices?
Not necessarily. In a conventional IPv4 subnet, the first address identifies the network and the last is the broadcast address. A /24 therefore normally has 254 host addresses out of 256 total.
That subtraction is not universal. On supported point-to-point links, an IPv4 /31 uses both addresses as endpoints under RFC 3021. A /32 represents one address, often used in an individual-host route or access rule.
Cloud platforms may reserve additional addresses for infrastructure. AWS’s subnet sizing guide describes its reservations and exceptions. The table above deliberately lists total addresses, so it remains useful independently of a platform’s assignment rules.
What is the difference between CIDR and subnetting?
CIDR supplies the classless prefix notation and addressing model. Subnetting divides a network into smaller networks, which are commonly described using that notation.
In the example above, creating four /26 blocks from one /24 is subnetting. Describing a destination range in a route or access rule as 203.0.113.0/26 also uses CIDR notation, even if you are not creating a new subnet.
CIDR also supports combining correctly aligned, adjacent blocks into a larger prefix when routing policy permits. For example, the first two /26 blocks in the table together cover 203.0.113.0/25.
Does CIDR notation apply to IPv6?
IPv6 uses the same slash-prefix notation, but its addresses contain 128 bits. The total size of an IPv6 prefix is therefore 2^(128 - prefix length).
For example, an IPv6 /64 contains 264 address values. A /128 identifies one address. Ordinary IPv6 LANs commonly use /64, although not every IPv6 prefix represents a LAN. RFC 7421 explains the role of that boundary.
A /64 IPv6 block and a /24 IPv4 block are both common subnet sizes, but they have vastly different capacities. Read IPv4 vs IPv6 for the address-format comparison.
Where will you encounter CIDR notation?
You will see it in subnet configuration, routing tables, firewall rules, and provider address-range requirements.
For example, 192.0.2.10/32 matches one IPv4 address, while 192.0.2.0/24 covers the full example block. In a routing table, 0.0.0.0/0 is commonly the default IPv4 route. In an access rule, that same prefix matches every IPv4 address, so the rule’s action and scope matter.
BYOIP documentation also uses prefixes to describe public ranges. Knowing a block’s notation tells you its size; it does not establish permission to use or announce it.
FAQ
Related resources
Ready to see where BYOIP is supported?
Continue the series
What Is a Subnet? A Beginner's Guide
Subnets organize a network into smaller address ranges. Learn how devices, subnet masks, and gateways fit together with a simple office example.
5 min read · Updated 10 September 2026
Read articleWhat Is NAT, and How Does It Work?
Follow two devices through a NAT gateway to see how address translation works, why ports matter, and what NAT does and does not provide.
6 min read · Updated 10 September 2026
Read article