Classless Inter-Domain Routing (CIDR) is an IP addressing standard (RFC 4632) utilizing variable-length prefix bitmasks to replace legacy Class A, B, and C networks.
CIDR (Classless Inter-Domain Routing) is an IP addressing and routing architecture standardized in RFC 1519 and updated by RFC 4632. Designed in 1993 to replace the inflexible 1980s classful networking system (Class A, B, and C), CIDR enables Variable-Length Subnet Masking (VLSM) and route aggregation (supernetting) to drastically reduce the size of global internet core routing tables and conserve IPv4 address exhaustion.
Calculate subnet masks, broadcast boundaries, usable host capacities, and visual bitwise slices with our interactive CIDR & Subnet Calculator.
| Property | IPv4 CIDR (RFC 4632) | IPv6 CIDR (RFC 4291) | Legacy Classful (RFC 791) |
|---|---|---|---|
| Address Length | 32 bits (4 decimal octets) | 128 bits (8 hexadecimal fields) | 32 bits (Class A/B/C) |
| Prefix Range | /0 (default route) to /32 (host) |
/0 to /128 (/64 standard subnet) |
Fixed: /8 (A), /16 (B), /24 (C) |
| Mask Notation | Slash notation (/24) or Dotted decimal (255.255.255.0) |
Slash notation (/64) |
Implicit class-based mask |
| Route Aggregation | Supernetting multiple /24 blocks into /22 or /20 |
Hierarchical ISP /48 down to customer /64 |
Inflexible; cannot aggregate classes |
| Usable Hosts Formula | $2^{(32 - \text{prefix})} - 2$ (Standard) / $-5$ (AWS VPC) | $2^{(128 - \text{prefix})}$ ($2^{64}$ per /64) |
Class A ($2^{24}-2$), Class B ($2^{16}-2$), Class C ($2^8-2$) |
A CIDR block is expressed as an IP address followed by a forward slash / and a decimal integer prefix length $N$. The prefix $N$ dictates how many leading contiguous bits represent the Network Identifier, leaving the remaining bits ($32 - N$ for IPv4) for assigning individual host interface addresses.
CIDR Block: 10.0.4.0/22
Binary IPv4: 00001010 . 00000000 . 00000100 . 00000000
Netmask (/22): 11111111 . 11111111 . 11111100 . 00000000 (255.255.252.0)
Wildcard Mask: 00000000 . 00000000 . 00000011 . 11111111 (0.0.3.255)
Bit Distribution: [--------- 22 Network Bits ---------] [ 10 Host Bits ]
Total Addresses: 2^(32 - 22) = 2^10 = 1,024 IP Addresses
Standard Usable: 1,024 - 2 = 1,022 Usable Hosts (10.0.4.1 to 10.0.7.254)
Network Address: 10.0.4.0
Broadcast IP: 10.0.7.255
In traditional networking, /30 subnets (4 addresses) were assigned to point-to-point router interfaces, wasting 2 addresses per connection for network and broadcast IDs. Under RFC 3021, modern routing devices treat /31 subnets as valid point-to-point links where both IP addresses are usable hosts ($2^{(32-31)} = 2$), cutting IPv4 waste on transit networks by 50%.
Amazon Web Services (AWS) reserves five IP addresses across every VPC subnet block:
Base + 0: Subnet Network Address (e.g. 10.0.0.0).Base + 1: Reserved by AWS for the default VPC router gateway.Base + 2: Reserved by AWS for DNS resolution (AmazonProvidedDNS).Base + 3: Reserved by AWS for future routing extensions.Last Address: Network Broadcast Address (e.g. 10.0.0.255 in a /24).Planning Tip: In AWS, an architect deploying a /28 subnet gets $16 - 5 = 11$ usable IPs rather than the standard 14.
Free, browser-based utilities to test, generate, and inspect CIDR (Classless Inter-Domain Routing) payloads directly.
Calculate IPv4/IPv6 subnets, network/broadcast addresses, usable IP ranges, wildcard masks, and visual bitwise subnet splitting.
Look up geolocation, network, and security details for any IP address.
Reverse DNS lookup — resolve PTR records to find hostnames for any IPv4 or IPv6 address.