Subnet
A subnet is a contiguous block of addresses that share a common leading prefix and are administered as one network.
A subnet is a contiguous block of addresses that share a common leading prefix and are administered as one network. Subnetting was introduced so that a single allocation could be split internally without the rest of the internet needing to know.
#Mask and prefix
The split is expressed either as a mask or as a prefix length. They carry the same information; the mask form is older, and RFC 950 is where the procedure was first specified.
| Mask | Prefix | Addresses |
|---|---|---|
255.255.255.0 |
/24 |
256 |
255.255.255.128 |
/25 |
128 |
255.255.255.240 |
/28 |
16 |
255.255.255.252 |
/30 |
4 |
Not every address in a block is usable as a host address on a conventional broadcast network, because the first and last are reserved for the network and broadcast addresses.
#Why proxy buyers should care
Addresses issued in one purchase are frequently consecutive, which means they sit in one subnet. To a target that filters by prefix, they are one address wearing several numbers. A pool counted in addresses can therefore be far smaller than it looks when counted in blocks.
This is most pronounced with datacenter proxies, where a hosting company allocates in blocks by construction. Ask how many distinct blocks you are being sold, then verify against the addresses you receive rather than the answer you were given.
The same reasoning explains why a single bad neighbour matters. If another customer abuses a target from an address next to yours and the target responds at the prefix, your addresses were removed by a decision you had no part in and cannot appeal.
#Checking adjacency yourself
sort -t. -k1,1n -k2,2n -k3,3n -k4,4n ips.txt | awk -F. '{print $1"."$2"."$3".0/24"}' | uniq -c | sort -rn
Counting how many of your addresses fall in each /24 takes one command and answers a question no product page does. Repeat it against the addresses actually issued over a few days, because a list handed over at purchase and a list observed in use are not always the same set.
#Commonly confused with
CIDR is the notation and the allocation scheme; a subnet is a block within an allocation. An ASN identifies the network announcing a route, and one network announces many subnets.