---
title: "What is CIDR notation?"
url: https://proxy.wiki/glossary/cidr/
type: Glossary Term
author: "proxy.wiki editorial"
published: 2026-09-06
updated: 2026-10-21
site: proxy.wiki
topics: ["Proxy fundamentals"]
license: CC BY 4.0; quote freely with attribution to https://proxy.wiki/
---

# What is CIDR notation?

> CIDR is the notation and allocation scheme that writes a block of IP addresses as an address followed by a prefix length, such as 203.0.113.0/24.

Everything after the slash is bit arithmetic. Once you can do it in your head, an allowlist entry, a `whois` answer or a firewall rule stops needing a calculator. The number counts the leading bits that every address in the block shares. The bits left over are free to vary, and each one left over doubles the size of the block.

CIDR replaced the old class A, B and C boundaries, which only allowed blocks of 8, 16 or 24 fixed bits. RFC 4632 lets a prefix be any length, so a network can be sized to what it needs and neighbouring blocks can be announced as one route. Aggregation is the same arithmetic run backwards: `198.51.100.0/25` and `198.51.100.128/25` differ only in their 25th bit, so together they are `198.51.100.0/24`, and Python’s `ipaddress.collapse_addresses()` returns exactly that single network when given the two halves.

## One address, read bit by bit

Take `203.0.113.77/26`. Written in binary, the first 26 bits are the network and the last 6 are the host part:

```
203.0.113.77/26

11001011.00000000.01110001.01|001101
<------- 26 network bits ------->|<- 6 host bits ->

host bits all 0    203.0.113.64     first address of the block
host bits all 1    203.0.113.127    last address of the block
size               2^6 = 64 addresses
```

The same rule runs over 128 bits for [IPv6](/glossary/ipv6/), so the size of any block is 2 to the power of (32 minus the prefix) for IPv4 and (128 minus the prefix) for IPv6. Python’s standard library does the arithmetic and is the quickest way to check your own. This is the real output on Python 3.15.0:

```
import ipaddress
n = ipaddress.ip_network("203.0.113.64/26")
print(n.num_addresses, n.netmask, n[0], n[-1])
print(ipaddress.ip_network("203.0.113.77/24", strict=False))
ipaddress.ip_network("203.0.113.77/24")

64 255.255.255.192 203.0.113.64 203.0.113.127
203.0.113.0/24
ValueError: 203.0.113.77/24 has host bits set
```

The last line matters more than it looks. `203.0.113.77/24` is a host written with its network’s prefix, which is how interface addresses are often shown, but it is not a block. A strict parser refuses it. A lenient one rounds it down to `203.0.113.0/24`, which may be far wider than the single address you meant to allow. When a control panel accepts a range, read back what it stored.

## Sizes you will meet

| Prefix | Family | Size | Where it turns up |
| --- | --- | --- | --- |
| /32 | IPv4 | 1 address | One host in an allowlist or firewall rule |
| /31 | IPv4 | 2 addresses | Point-to-point links, where RFC 3021 lets both be used |
| /29 | IPv4 | 8 addresses | Six usable hosts once the network and broadcast addresses are set aside |
| /24 | IPv4 | 256 addresses | The route returned for 1.1.1.1 in the lookup below |
| /10 | IPv4 | 4,194,304 addresses | 100.64.0.0/10, the shared space reserved for [carrier-grade NAT](/glossary/carrier-grade-nat/) |
| /128 | IPv6 | 1 address | One IPv6 host |
| /64 | IPv6 | 18,446,744,073,709,551,616 addresses | One IPv6 subnet, because RFC 4291 fixes interface identifiers at 64 bits |
| /48 | IPv6 | 65,536 subnets of /64 | The end-site size RFC 3177 once recommended; RFC 6177 left the choice to operators |

## Where proxy work runs into it

**Allowlists.** Providers that authorise by source address take a `/32` for one machine. If your traffic leaves through a NAT pool or a cloud range, you list the range instead, and every host inside it gains access. That trade is covered under [IP whitelisting](/glossary/ip-whitelisting/).

**Bypass lists.** A range in `no_proxy` works in some clients and silently fails in others. curl and Go match an address against the network; CPython’s `urllib` compares strings, so `10.0.0.0/8` never matches `10.1.2.3` and the request goes to the proxy. The [guide to proxy environment variables](/guides/proxy-environment-variables/#no_proxy-four-clients-four-sets-of-rules) has the tested behaviour per client.

**Reading an exit address.** Registries and routing databases record the block an address belongs to and the network that announces it:

```
$ whois -h whois.radb.net 1.1.1.1 | grep -E '^(route|origin|source):'
route:          1.1.1.0/24
origin:         AS13335
source:         APNIC
route:          1.1.1.0/24
origin:         AS13335
source:         RADB
route:          1.1.1.0/24
origin:         AS13335
source:         RPKI  # Trust Anchor: apnic
```

Three databases hold a route object for the same `/24`, all naming the same origin [ASN](/glossary/asn/). That block is the unit a reputation system can act on in one step, and it says nothing about how many of its 256 addresses any provider actually holds. Counting how your own addresses fall into blocks is a [subnet](/glossary/subnet/) question, and the checks worth running before you buy are in [residential vs datacenter vs ISP vs mobile](/guides/residential-vs-datacenter-proxies/#what-to-verify-before-committing).

The `whois` output above was captured on 21 October 2026 against `whois.radb.net`, filtered to three fields. Route objects change when networks re-announce space, so run the query again rather than relying on this copy.

## Frequently asked questions

### How do I work out how many addresses a CIDR block holds?

Subtract the prefix from the address width and raise 2 to that power: 32 for IPv4, 128 for IPv6. A /26 leaves 6 bits, so 64 addresses. A /64 in IPv6 leaves 64 bits, which is why nobody counts IPv6 subnets in addresses.

### Is 192.168.1.10/24 a valid CIDR block?

It is a valid way to write an interface address together with its network, but it is not a block, because the host bits are not zero. Python's ipaddress raises "has host bits set" for it unless told to be lenient, and lenient tools round it down to 192.168.1.0/24, which allows 256 addresses rather than one.

### What is the difference between CIDR notation and a subnet mask?

They carry the same information. 255.255.255.192 and /26 both fix the first 26 bits. The prefix form is shorter, works the same way for IPv6, and is what routing registries, firewalls and most proxy dashboards accept.

## Sources

1. [RFC 4632: Classless Inter-domain Routing (CIDR), the prefix notation and aggregation plan](https://www.rfc-editor.org/rfc/rfc4632.html)
2. [RFC 4291: IP Version 6 Addressing Architecture, 64-bit interface identifiers](https://www.rfc-editor.org/rfc/rfc4291.html)
3. [RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links](https://www.rfc-editor.org/rfc/rfc3021.html)
4. [RFC 6177: IPv6 Address Assignment to End Sites, replacing the /48 recommendation of RFC 3177](https://www.rfc-editor.org/rfc/rfc6177.html)
5. [RFC 6598: IANA-Reserved IPv4 Prefix for Shared Address Space, 100.64.0.0/10](https://www.rfc-editor.org/rfc/rfc6598.html)
6. [Python documentation: ipaddress, IPv4/IPv6 manipulation library](https://docs.python.org/3/library/ipaddress.html)
7. [RADb: the routing registry queried for the route objects shown](https://www.radb.net/)
