What is a Network Prefix (CIDR)?
A network prefix is a block of contiguous IP addresses that are routed as a single unit. Prefixes are written in CIDR notation — the starting IP address followed by a slash and the prefix length. For example, 8.8.8.0/24 represents all 256 addresses from 8.8.8.0 to 8.8.8.255.
CIDR Notation Explained
CIDR stands for Classless Inter-Domain Routing, introduced in 1993 to replace the old class-based system (Class A, B, C). The number after the slash indicates how many bits of the address are the "network" part:
/8— 16,777,216 addresses (e.g., 10.0.0.0/8)/16— 65,536 addresses (e.g., 172.16.0.0/16)/24— 256 addresses (e.g., 8.8.8.0/24)/32— 1 address (a single host, IPv4)/48— A typical IPv6 allocation to an organization/128— 1 address (a single host, IPv6)
Each additional bit in the prefix length halves the number of addresses. A /23 has 512 addresses, a /24 has 256, a /25 has 128, and so on.
Prefixes in BGP
BGP routes traffic based on prefixes. Each autonomous system announces the prefixes it is responsible for. When multiple prefixes overlap, routers use the longest prefix match rule — the most specific (longest) prefix wins.
For example, if one AS announces 8.8.0.0/16 and another announces 8.8.8.0/24, traffic destined for 8.8.8.8 would follow the /24 route because it is more specific.
This is why BGP hijacks can be effective: an attacker can announce a more specific prefix than the legitimate holder, attracting traffic. RPKI helps prevent this by allowing prefix holders to cryptographically specify the maximum prefix length that should be accepted.
Prefix Size Conventions
Most networks follow conventions about which prefix sizes they will accept:
- IPv4 — Most networks accept prefixes from /8 to /24. Prefixes more specific than /24 are generally filtered out and not propagated globally.
- IPv6 — Most networks accept prefixes from /12 to /48. Prefixes more specific than /48 are typically filtered.
These filtering policies exist to prevent the global routing table from growing unmanageably large. If every /32 (single IP) were announced individually, the routing table would contain billions of entries instead of roughly one million.
See Prefixes in Action
When you look up any IP address, the result shows the most specific prefix covering that address. Look up an ASN to see all the prefixes that network announces: