CIDR
/ SY-der or SID-er /
CIDR is the modern way of slicing up IP addresses so we can hand out blocks of exactly the right size and keep routing tables small. Picture phone-area codes: instead of forcing every city into one of three rigid sizes, CIDR lets you draw the boundary anywhere, so a tiny town and a huge city each get a block that fits. The original IPv4 scheme (classful addressing) had only three fixed network sizes — Class A (/8), Class B (/16), Class C (/24) — which wasted enormous numbers of addresses: an organization needing 300 hosts had to take a whole Class B of 65,534.
CIDR replaces the fixed classes with a flexible prefix length written in slash notation: an address block is written as an address followed by a slash and a number, like 203.0.113.0/24, where the number says how many leading bits are the fixed network part. So /24 means the first 24 bits are the network and the remaining 8 bits (256 addresses) are for hosts; /20 means the first 20 bits are the network, leaving 12 bits (4096 addresses). Any prefix length is allowed, so blocks come in powers of two of any granularity.
CIDR also enables route aggregation (supernetting): a provider that owns 200.0.0.0/16 can advertise that single prefix to the rest of the Internet instead of 256 separate /24 routes, which is the main reason the global routing table did not explode. The flip side, longest-prefix match, is how a router picks the most specific matching prefix when several overlap. CIDR is why you almost never hear about address classes anymore — they have been obsolete since the 1990s.
Need room for ~1000 hosts? A /22 gives 2^(32-22) = 2^10 = 1024 addresses — far less wasteful than the old Class B (/16, 65,536). The prefix 198.51.100.0/22 covers 198.51.100.0 through 198.51.103.255.
The slash number is the count of fixed network bits; smaller number means a bigger block.
Smaller slash = larger block (a /8 is huge, a /30 is tiny). The host count is 2^(32 − prefix), but two of those (the all-zeros network address and all-ones broadcast) are usually not assignable to hosts on a regular subnet.