Skip to content

Classless Inter-Domain Routing

An Internet addressing and routing architecture that represents contiguous IP address blocks by arbitrary-length prefixes, enabling hierarchical allocation, longest-prefix forwarding, and route aggregation beyond fixed address classes.

Version
v3 · 2026-09-19 · History
Domain-specific #
1478
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomains
Computing, Internet Addressing and Inter Domain Routing → Computer Science & Software Engineering
Aliases
CIDR, Classless routing, Classless addressing

Core Idea

Classless Inter-Domain Routing replaces fixed IPv4 network classes with an address prefix plus explicit prefix length, conventionally written address/length. A /p prefix fixes the first p bits and identifies a contiguous block of 2^(32-p) IPv4 addresses before reservations and operational subdivision. Routing advertisements carry such prefixes, and forwarding chooses the most specific matching route.

Arbitrary prefix lengths support hierarchical allocation and aggregation: a provider can advertise one shorter covering prefix rather than every customer subprefix, reducing routing state. More-specific routes remain possible for traffic engineering, multihoming, or exceptions, but deaggregation increases global table size. CIDR does not by itself conserve addresses, authorize ownership, secure route origin, or make an arbitrary set of networks aggregatable; binary contiguity and aligned boundaries matter.

How would you explain it like I'm…

Starts-Like-This Addresses

Every computer on the internet has an address, like a house number. With Classless Inter-Domain Routing, instead of big fixed-size neighborhoods, you can say 'all the houses whose numbers start with these digits', and you choose how many digits. When a letter arrives, the helpers send it along the road that matches the most digits of its address.

Pick-Your-Size Address Groups

An IPv4 address is a string of 32 bits (ones and zeros). Long ago, addresses were split into a few fixed-size groups called classes. Classless Inter-Domain Routing (CIDR) got rid of those fixed sizes: now a block of addresses is written like 192.168.0.0/24, where the number after the slash tells how many of the first bits are fixed. The more bits fixed, the smaller the block. Routers share these blocks with each other, and when a message arrives, a router picks the most specific block that matches its address. This lets an internet provider announce one big block instead of many little ones.

Variable-Length Prefix Routing

Classless Inter-Domain Routing (CIDR) replaced the old fixed IPv4 classes with a prefix plus an explicit length, written address/length. A /p prefix fixes the first p of the 32 bits, so it names a contiguous block of 2^(32−p) addresses (before reservations or further subdivision). Routers advertise these prefixes, and when forwarding they use longest-prefix match: the most specific route that covers the destination wins. Because lengths are arbitrary, a provider can aggregate many customer blocks into one shorter covering prefix, shrinking routing tables, while still allowing more-specific routes for exceptions. Aggregation only works when the blocks are binary-contiguous and aligned; CIDR itself does not save addresses, prove who owns them, or secure routes.

 

CIDR replaces classful IPv4 addressing with a prefix plus an explicit prefix length, written address/length. A /p prefix fixes the leading p bits and denotes a contiguous block of 2^(32−p) addresses, before any reserved addresses or internal subdivision. Routing protocols advertise such prefixes, and the forwarding decision uses longest-prefix match: among all matching routes, the most specific wins. Arbitrary lengths enable hierarchical allocation and route aggregation: a provider can advertise one shorter covering prefix instead of every customer subprefix, reducing global routing state. More-specific routes can still be announced for traffic engineering, multihoming, or exceptions, and longest-prefix match makes them override the aggregate, but such deaggregation grows the global table. Aggregation requires binary contiguity and aligned boundaries. CIDR by itself does not conserve addresses, establish who legitimately holds a prefix, or secure route origins.

Scope of Application

CIDR is literal in IP address planning, routing policy, forwarding, registry allocation, and Internet-scale route aggregation.

  • Address allocation. Assigning variable-sized contiguous blocks.
  • Subnet design. Nesting operational networks under a covering prefix.
  • BGP routing. Advertising aggregated or more-specific reachability.
  • Forwarding tables. Applying longest-prefix match.
  • Route summarization. Compressing aligned subprefixes with compatible policy.
  • Capacity planning. Estimating address counts and growth boundaries.
  • Security operations. Binding route-origin authorizations to exact prefixes as a separate layer.

Clarity

State address family, canonical network address, prefix length, mask, inclusive range, usable-address convention, containing/contained prefixes, routing origin, aggregation assumptions, and more-specific exceptions. Perform calculations in binary or with verified tools. Distinguish a configured subnet, an allocated block, and an advertised route.

State address family, prefix, prefix length, allocation context, and whether the operation is assignment, aggregation, advertisement, filtering, or forwarding.

Manages Complexity

Prefix hierarchy compresses many addresses and routes into one representation and lets the same containment rule drive allocation and forwarding. Longest-prefix match localizes exceptions. Aggregation loses value when address assignment ignores topology, policies differ, multihoming proliferates, or operators announce unnecessary specifics.

Classful addressing coupled network size to a few fixed boundaries and caused both allocation waste and rapid routing-table growth. CIDR replaces those coarse classes with arbitrary-length hierarchical blocks.

Abstract Reasoning

  1. Choose the address family and required block size.
  2. Derive a valid prefix length and aligned boundary.
  3. Represent the block canonically.
  4. Place it within a delegated covering hierarchy.
  5. Allocate nonoverlapping subprefixes.
  6. Advertise the least-specific route consistent with policy and reachability.
  7. Apply longest-prefix match for exceptions.
  8. Monitor table growth, leaks, and authorization separately.
  9. Prefix reasoning should be performed bitwise rather than by visual similarity of decimal addresses.

Knowledge Transfer

CIDR is a canonical hierarchical address: an address carries a nested prefix path, and specificity selects the closest applicable rule. Hierarchical Address is the strict parent; binary IP blocks, delegation, routing aggregation, and longest-prefix forwarding supply the accent.

Hierarchical Address is the strict parent because a prefix locates an address within nested blocks whose lengths express containment and delegation. The transferable pattern is variable-depth shared prefix → nested address region → inheritance with more-specific override. It applies to tries and naming systems when prefix containment is literal.

Relationships to Other Abstractions

Local relationship map for Classless Inter-Domain RoutingParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.ClasslessInter-Domain RoutingDOMAINPrime abstraction: Hierarchical Address — is a kind ofHierarchicalAddressPRIME

Current abstraction Classless Inter-Domain Routing Domain-specific

Parents (1) — outgoing typed relations

  • Classless Inter-Domain Routing is a kind of Hierarchical Address Prime

    Hierarchical Address is the strict parent because a CIDR prefix locates a block at one depth in a nested namespace and supports inheritance plus more-specific override.

Hierarchy paths (4) — routes to 4 parentless roots

Neighborhood in Abstraction Space

Classless Inter-Domain Routing sits in a sparse region of the domain-specific corpus (94th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Combinatorial Covering & Dispatch Structures (6 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25