Classless Inter-Domain Routing

This division is used as the basis of traffic routing between IP networks and for address allocation policies.

Whereas classful network design for IPv4 sized the network prefix as one or more 8-bit groups, resulting in the blocks of Class A, B, or C addresses, under CIDR address space is allocated to Internet service providers and end users on any address-bit boundary.

In IPv6, however, the interface identifier has a fixed size of 64 bits by convention, and smaller subnets are never allocated to end users.

CIDR is based on variable-length subnet masking (VLSM), in which network prefixes have variable length (as opposed to the fixed-length prefixing of the previous classful network design).

Blocks of addresses having contiguous prefixes may be aggregated as supernets, reducing the number of entries in the global routing table.

The smallest allocation and routing block contained 28 = 256 addresses, larger than necessary for personal or department networks, but too small for most enterprises.

Within a decade after the invention of the Domain Name System (DNS), the classful network method was found not scalable.

Routing protocols were revised to carry not just IP addresses, but also their subnet masks.

[5] After a period of experimentation with various alternatives, Classless Inter-Domain Routing was based on variable-length subnet masking (VLSM), which allows each network to be divided into subnetworks of various power-of-two sizes, so that each subnetwork can be sized appropriately for local needs.

CIDR notation is a compact representation of an IP address and its associated network mask.

[9][10] CIDR notation specifies an IP address, a slash ('/') character, and a decimal number.

The decimal number is the count of consecutive leading 1-bits (from left to right) in the network mask.

CIDR notation can even be used with no IP address at all, e.g. when referring to a /24 as a generic description of an IPv4 network that has a 24-bit prefix and 8-bit host numbers.

A subnet mask is a bitmask that encodes the prefix length associated with an IPv4 address or network in quad-dotted notation: 32 bits, starting with a number of 1-bits equal to the prefix length, ending with 0-bits, and encoded in four-part dotted-decimal format: 255.255.255.0.

A subnet mask encodes the same information as a prefix length but predates the advent of CIDR.

CIDR is principally a bitwise, prefix-based standard for the representation of IP addresses and their routing properties.

These groups, commonly called CIDR blocks, share an initial sequence of bits in the binary representation of their IP addresses.

The prefix length can range from 0 to 128, due to the larger number of bits in the address.

However, by convention, a subnet on broadcast MAC layer networks always has 64-bit host identifiers.

[13] Larger prefixes (/127) are only used on some point-to-point links between routers, for security and policy reasons.

The RIRs, each responsible for a single, large, geographic area, such as Europe or North America, subdivide these blocks and allocate subnets to local Internet registries (LIRs).

End-user networks receive subnets sized according to their projected short-term need.

Networks served by multiple ISPs, on the other hand, may obtain provider-independent address space directly from the appropriate RIR.

208.128.0.0/11, a large CIDR block containing over 2 million addresses, had been assigned by ARIN (the North American RIR) to MCI.

Automation Research Systems (ARS), a Virginia VAR, leased an Internet connection from MCI and was assigned the 208.130.28.0/22 block, capable of addressing just over 1000 devices.

Within MCI's network, 208.130.28.0/22 would become visible, directing traffic to the leased line serving ARS.

The standard subnet size for IPv6 networks is a /64 block, which is required for the operation of stateless address autoconfiguration.

[21] Topologically, the set of subnets described by CIDR represent a cover of the corresponding address space.