CIDR
CIDR is a way to write an IP range as one address with a prefix length, e.g. 203.0.113.0/24.
Updated · Prokso editorial team
The number after the slash shows how many leading bits of the address are shared by the whole block. For IPv4, /24 means 256 addresses that share the first three numbers, and /32 means exactly one address.
This notation is used for ISP subnets, firewall rules and allowlists. When a website restricts access "by block", it usually sets exactly a CIDR range.
For IPv6 the prefixes are different: a subscriber is often given a /64 or /56, and each such block holds a huge number of addresses.
The smaller the number after the slash, the larger the range: /16 contains 65,536 IPv4 addresses, /8 more than 16 million.
How to work out the size of a range without a calculator
For IPv4, the number of addresses in a block equals two to the power of "32 minus the number after the slash". A /28 block has 24 = 16 addresses, a /26 has 64. Each step down by one doubles the range, and each step up halves it.
| Prefix | Mask | Addresses |
|---|---|---|
/32 | 255.255.255.255 | 1 |
/30 | 255.255.255.252 | 4 |
/28 | 255.255.255.240 | 16 |
/24 | 255.255.255.0 | 256 |
/16 | 255.255.0.0 | 65,536 |
How to find the first and last address of a block
A block always starts at a number that is a multiple of its size. The notation 203.0.113.64/26 means the addresses from .64 to .127, because 64 divides by 64. By contrast, 203.0.113.10/24 is written carelessly: it actually means the whole block from .0 to .255, and some programs do not accept such a mistake.
Routers and firewalls often use a mask instead of a prefix. The table above helps you convert one into the other without errors. For IPv6 nobody writes a mask at all, only the prefix is used.
CIDR in everyday work with proxies
Most often you need CIDR to tell whether two proxies are neighbors. For IPv4, compare the first three numbers of the address, which is the /24 block; for IPv6, compare the first four groups, which is the /64. Address neighborhoods are covered in the subnet article.
The second case is firewall rules on your own network. If an office network lets traffic out only to allowed ranges, the administrator needs to allow connections to the host gw.prokso.com on the ports you use. The Prokso IP whitelist itself takes individual addresses, up to 5 per plan, as described in the IP whitelist article.
FAQ
How many addresses are in a /24?
256 IPv4 addresses, of which usually 254 can be assigned to devices.
How do I write a single address in CIDR?
Add /32 for IPv4 or /128 for IPv6, for example 203.0.113.5/32.
Related terms
Residential $1.59, mobile $2.50, datacenter $0.65 per GB
Sign up in a minute, get access right after payment.