What is CIDR?

Classless Inter-Domain Routing (CIDR) represents an IP address allocation method designed to enhance routing efficiency across internet infrastructure. Every device connecting to the internet—from servers to end-user machines—requires a unique IP address to enable communication and discovery. Through CIDR, organizations gain the ability to assign and manage IP addresses with greater flexibility and efficiency across their network infrastructure.

IP Address Formats and Evolution

IP addresses consist of two fundamental components: a network address serving as the unique identifier for the network itself, and a host address identifying individual devices or hosts within that network.

Prior to the early 1990s, the classful addressing system governed IP allocation, with fixed total address length and predetermined bit allocations for both network and host portions.

Classful Address Architecture

IPv4 addresses span 32 bits total, with each octet (the numbers between periods) representing 8 bits and ranging from 0 to 255. Organizations received addresses from one of three predefined classes.

Class A addresses allocated 8 bits for the network prefix. For instance, in the address 44.0.0.1, the value 44 identifies the network while 0.0.1 identifies the specific host.

Class B addresses designated 16 bits for the network prefix. In the address 128.16.0.2, the network portion is 128.16 and the host portion is 0.2.

Class C addresses used 24 bits for the network prefix. Taking 192.168.1.100 as an example, 192.168.1 represents the network and 100 represents the host.

Classless Address Architecture

Classless addresses, also referred to as CIDR addresses, employ variable length subnet masking (VLSM) to dynamically adjust the proportion between network and host address bits. A subnet mask functions as a set of identifiers that extracts the network address value from an IP address by converting host address bits to zeros.

VLSM enables network administrators to partition IP address space into subnets of differing sizes, with each subnet accommodating a variable number of hosts and a specific quantity of IP addresses. CIDR notation appends a numeric suffix to a standard IP address, indicating how many bits comprise the network address prefix.

The address 192.0.2.0/24 exemplifies an IPv4 CIDR address, where the initial 24 bits (192.0.2.0) constitute the network address.

Limitations of Classful Addressing

The classful system created significant inefficiencies that CIDR was designed to overcome.

Inflexible IP Addressing

Each classful category supported a predetermined device capacity:

  • Class A accommodated 16,777,214 hosts
  • Class B accommodated 65,534 hosts
  • Class C accommodated 254 hosts

This rigid structure generated substantial inefficiencies in IP address distribution and resulted in considerable address space waste. An organization requiring 300 devices could not utilize a Class C address, which supported only 254 devices. Instead, it would need to request a Class B address offering 65,534 unique host addresses, leaving 65,234 addresses unused.

Network Design Constraints

Classful IP addresses restricted the ability to merge networks according to operational requirements. For example, these addresses belong to separate Class C networks under classful architecture:

  • 192.168.1.0
  • 192.168.0.0

A network administrator could not consolidate these networks because the Class C subnet mask remained fixed at 255.255.255.0.

Advantages of CIDR

CIDR delivers substantially greater flexibility in IP address assignment and data routing between networked devices.

Minimize IP Address Waste

CIDR introduces flexibility in determining network and host identifier assignments within IP addresses. Organizations can leverage CIDR to allocate precisely the required number of IP addresses for a given network while minimizing waste. Furthermore, CIDR decreases the size of routing tables and streamlines the process of routing data packets.

Enhance Routing and Network Security

CIDR enables routers to organize IP addresses into multiple subnets with improved efficiency. A subnet represents a smaller network segment existing within a larger network. All devices connected to a router typically reside on the same subnet and share the same IP address prefix.

CIDR permits organizations to establish and consolidate multiple subnets, ensuring data reaches its destination through optimal paths. Organizations can also apply CIDR for network security purposes, using notation such as 10.0.0.0/8 to limit traffic to internal communications only.

Establish a Virtual Private Cloud

A virtual private cloud (VPC) constitutes a private digital environment hosted within cloud infrastructure. It enables organizations to deploy workloads in an isolated and protected setting. VPCs utilize CIDR IP addresses when transferring data packets among connected devices.

Build Supernets with Greater Flexibility

A supernet groups multiple subnets sharing comparable network prefixes. CIDR facilitates flexible supernet creation, a capability unavailable in traditional masking approaches. For example, an organization might consolidate IP addresses into a single network block using the notation 192.168.0.0/23, encompassing both the 192.168.0.1 and 192.168.0.0 subnets.

This notation applies a subnet mask of 255.255.254.0 to the IP address, designating the first 23 bits as the network address. A router requires only a single routing table entry to manage data packets flowing between devices on these subnets.

How CIDR Functions

CIDR enables network routers to direct data packets to appropriate devices based on the specified subnet. Rather than categorizing IP addresses by class, routers extract network and host addresses according to the CIDR suffix designation.

Understanding CIDR blocks and CIDR notation proves essential to comprehending CIDR's operational mechanics.

CIDR Blocks

A CIDR block comprises a collection of IP addresses sharing an identical network prefix and bit count. Larger blocks contain more IP addresses and carry smaller suffix values.

The Internet Assigned Numbers Authority (IANA) distributes large CIDR blocks to regional internet registries (RIR). These registries then allocate smaller blocks to local internet registries (LIR), which distribute them to organizations. Individual users obtain CIDR blocks from their internet service providers.

CIDR Notation

CIDR notation expresses an IP address alongside a suffix indicating the network identifier bits in a standardized format. The address 192.168.0.0 with a 22-bit network identifier would be written as 192.168.0.0/22.

CIDR Implementation in IPv6

IPv6 represents a networking addressing system intended to supersede IPv4. IPv6 employs a 128-bit unique identifier, enabling it to support substantially more IP addresses than IPv4.

An IPv6 address comprises 8 colon-separated hexadecimal values. IPv6 provides a vastly expanded address space suited to the growing volume of devices connecting to the internet.

Under CIDR, IPv6 addresses can be consolidated using prefixes of variable bit length, functioning similarly to IPv4 addresses. The address 2001:0db8::/32 demonstrates an IPv6 CIDR address, with the initial 32 bits (2001:db8) serving as the network address.

AWS Support for CIDR Requirements

Amazon Virtual Private Cloud (Amazon VPC) provides a secure, isolated virtual network environment where organizations can deploy Amazon Web Services (AWS) resources. Amazon VPC IP Address Manager (IPAM) now enables the allocation of contiguous IPv6 Classless Inter-Domain Routing (CIDR) blocks. Network architects employ contiguous CIDR blocks when designing virtual private clouds (VPCs).

Additional capabilities of Amazon VPC include:

  • IPAM facilitates the creation of IPv6 publicly scoped pools and their provisioning with Bring Your Own IP (BYOIP) CIDR blocks
  • Organizations can provision IPv6 CIDR blocks ranging from /52 to /40 into separate pools and link them with VPCs
  • Network administrators can consolidate CIDRs across Amazon VPC networking and security constructs including network access control lists, route tables, security groups, and firewalls

Source: AWS News Blog