What Is CIDR (Classless Inter-Domain Routing)?

Share This Article

Updated on May 9, 2025

Classless Inter-Domain Routing (CIDR) replaced the old class-based IP system, using variable-length subnet masks (VLSMs) for efficient address allocation and routing. Introduced in 1993, it’s now essential for managing IP addresses. This article covers its basics, features, and real-world examples.

Definition and Core Concepts

CIDR allows IP address allocation to be more flexible and efficient. It replaces the limitations of classful addressing (Class A, B, and C networks) with classless addressing, enabling subnetting and supernetting, which depend on prefix lengths rather than fixed classes.

Key concepts of CIDR include the following:

IP Address 

An IP address is a 32-bit identifier in IPv4 (or a 128-bit identifier in IPv6) that represents a device on a network. For example, an IPv4 address looks like 192.168.1.1.

Network Prefix 

The network prefix identifies the portion of an IP address that defines the network. For example, in 192.168.0.0/24, the /24 indicates that the first 24 bits are part of the network prefix.

Host Identifier 

The remaining bits in an address after the prefix represent the host on the network. Continuing the previous /24 example, the 8-bit host identifier allows 2^8 (256) possible addresses, accommodating 254 usable host addresses (excluding the network and broadcast addresses). It’s important to note that VLSM allows for different prefix lengths to suit various needs, such as a /30 providing 2 usable host addresses for point-to-point links.

Subnet Mask 

A subnet mask ensures differentiation between the network portion and the host portion of an IP address. Instead of fixed masks for classful networks, CIDR uses variable masks for more efficient allocation.

Variable Length Subnet Mask (VLSM) 

VLSM allows networks to be divided into subnets with varying sizes, optimizing address utilization by tailoring subnet sizes to specific requirements.

CIDR Block 

A CIDR block represents a range of IP addresses, such as 192.168.1.0/24, where the /24 defines the prefix length.

Supernetting 

Supernetting combines multiple adjacent CIDR blocks into a single, larger block. For example, aggregating 192.168.0.0/24 and 192.168.1.0/24 results in 192.168.0.0/23.

Route Aggregation 

Route aggregation reduces the number of entries in routing tables by summarizing multiple routes with a single, broader route.

How It Works

CIDR enables more efficient IP address management through mechanisms such as prefix lengths, VLSM-based subnetting, routing based on prefixes, and supernetting for route aggregation.

Prefix Length 

The number following the slash (e.g., /24) denotes the length of the network prefix. This defines how many bits are reserved for the network portion, allowing flexible subnet sizes.

For example:

  • /24 reserves 24 bits for the network, leaving 8 bits for hosts (up to 254 devices).
  • /16 reserves 16 bits for the network, leaving 16 bits for hosts (up to 65,534 devices).

Subnetting with VLSM 

CIDR’s VLSM enables the creation of smaller subnets within a network. Instead of allocating the same subnet size regardless of need, VLSM customizes subnet sizes based on device count.

For instance:

  • Allocate /28 for a subnet requiring 14 devices (16 total addresses minus reserved ones).
  • Allocate /30 for point-to-point links that only need two addresses.

Routing Based on Prefixes 

Routers use the prefix length in CIDR to perform routing decisions. This hierarchical addressing simplifies routing tables by aggregating entries.

For example:

  • Instead of separate entries for 192.168.0.0/24 and 192.168.1.0/24, a single entry for 192.168.0.0/23 suffices.

Supernetting for Route Aggregation 

Supernetting combines smaller networks into a larger one. This is beneficial for ISPs or large organizations managing contiguous IP blocks.

Example:

  • Combine 10.0.0.0/24, 10.0.1.0/24, and 10.0.2.0/24 into a supernet 10.0.0.0/22.

Key Features and Components

Variable-Length Subnetting (VLSM) 

By subdividing an IP address into smaller networks of varying sizes, VLSM eliminates wasteful allocation of unused addresses, ensuring efficient distribution of resources.

Route Aggregation (Supernetting) 

Route aggregation simplifies network routing by reducing routing table entries. This improves efficiency while lowering memory and processor demands on routers.

Hierarchical Addressing 

CIDR fosters hierarchical structures in IP address allocation, making it easier to manage, delegate, and organize addresses at scale.

Classless Addressing 

CIDR abandons the rigid classful system. Instead, it operates with flexible prefix lengths, enabling precise allocation and preventing exhaustion of IP address space.

Use Cases and Applications

CIDR finds applications in various environments, addressing different scale requirements:

Internet Service Providers (ISPs) 

ISPs frequently use CIDR to allocate IP address blocks to their customers efficiently. By assigning variable-sized CIDR blocks, ISPs tailor IP allocations to the specific needs of individual clients.

Large Organizations 

Organizations with multiple departments or locations benefit from CIDR-based subnetting and supernetting. By organizing IP addresses hierarchically, they simplify network management.

Backbone Networks 

Backbone networks utilize CIDR and route aggregation to minimize the size of routing tables. Reducing table size improves lookup speed and routing efficiency.

IPv6 Addressing 

CIDR principles are integral to IPv6 addressing, where enormous address space (128-bit addresses) requires hierarchical allocation to maintain manageability.

Key Terms Appendix 

  • CIDR (Classless Inter-Domain Routing): A method of classless IP addressing that supports flexible subnetting and supernetting.
  • IP Address: A numerical label assigned to devices in a network, identifying their location and connection.
  • Network Prefix: The portion of an IP address reserved for network identification.
  • Host Identifier: The portion of an IP address defining individual devices in a network.
  • Subnet Mask: A 32-bit number used with an IP address to separate the network and host portions.
  • VLSM (Variable Length Subnet Mask): A technique that allows subnets of different sizes within the same network.
  • CIDR Block: A range of IP addresses defined by a shared prefix length.
  • Supernetting: Aggregation of multiple IP address ranges into a larger block for simplified routing.
  • Route Aggregation: Consolidation of routing table entries using summarizable address ranges.
  • IPv6: The sixth revision of IP addressing, designed to replace IPv4 and expand available address space.

Continue Learning with our Newsletter