CIDR Notation Explained: IP Addressing Made Simple

The slash notation you see in IP addresses decoded — from /32 to /0 and everything in between

What Is CIDR Notation?

CIDR stands for Classless Inter-Domain Routing. CIDR notation is a compact way to represent an IP address and its associated subnet mask using a single string — the IP address followed by a forward slash and a number representing how many bits are in the network portion.

For example: 192.168.1.0/24

Before CIDR (introduced in 1993 via RFC 1519), IP addresses were assigned in fixed classes (A, B, C) with predetermined network sizes. This caused massive waste — a company needing 500 IPs had to receive a Class B block with 65,534 addresses. CIDR solved this by allowing any prefix length, enabling precise allocation.

Today CIDR is universal. Every IP block assignment, routing table entry, firewall rule, and cloud security group uses CIDR notation. Our IP lookup tool displays the CIDR prefix for any IP address you query.

Reading CIDR Notation: The Prefix Length

The number after the slash (called the prefix length or prefix bits) tells you how many of the 32 bits in an IPv4 address are fixed as the network identifier. The remaining bits are available for host addresses.

Key relationships to internalize:

Reference table for common prefixes:

The subnet mask equivalent of any prefix: fill the left-most N bits with 1s and the rest with 0s, then convert to dotted decimal. A /24 = 11111111.11111111.11111111.00000000 = 255.255.255.0. See our full breakdown in the subnet mask guide.

Calculating Network Range from CIDR

Given a CIDR block, you can calculate the full range of addresses it covers. Let's work through 10.20.30.0/24:

  1. Network address: 10.20.30.0 (the address as written — all host bits are 0)
  2. Host bits: 32 - 24 = 8 bits
  3. Total addresses: 28 = 256
  4. Usable hosts: 256 - 2 = 254 (minus network and broadcast)
  5. First host: 10.20.30.1
  6. Last host: 10.20.30.254
  7. Broadcast: 10.20.30.255 (all host bits = 1)

For a less tidy example, try 172.16.10.128/26:

  1. Host bits: 32 - 26 = 6 bits → 26 = 64 addresses
  2. Network: 172.16.10.128
  3. Broadcast: 172.16.10.128 + 63 = 172.16.10.191
  4. Usable range: 172.16.10.129 to 172.16.10.190 (62 hosts)

The pattern: the block size = 2(32 - prefix). Networks always start at multiples of their block size.

🛡️

Explore Any IP or Network Block

Our IP lookup tool shows CIDR block details, ASN info, and geolocation for any address.

Hide My IP Now

Supernetting and Route Aggregation

CIDR enables not only subnetting (splitting large networks into smaller ones) but also supernetting — aggregating multiple smaller networks into a single larger CIDR block for more efficient routing.

Example: instead of advertising four separate /24 routes to the internet:

203.0.113.0/24
203.0.114.0/24
203.0.115.0/24
203.0.116.0/24

An ISP can advertise a single /22 supernet:

203.0.113.0/22  (covers all four /24 blocks)

This reduces the global routing table size significantly — a critical optimization given that internet routing tables contain over 900,000 prefixes as of 2026. Route aggregation (also called route summarization) is a core function of BGP (Border Gateway Protocol), the routing protocol that interconnects the internet's autonomous systems.

For ISPs and large organizations, efficient CIDR block management is essential. Tools like our WHOIS lookup show the CIDR allocations registered to any IP address or organization.

CIDR in Cloud Networking and Firewalls

CIDR notation is ubiquitous in modern cloud and security configurations. Understanding it is essential for working with:

Cloud platforms (AWS, GCP, Azure): Virtual Private Clouds (VPCs) are defined with CIDR blocks. You choose a CIDR range like 10.0.0.0/16 for your VPC and then carve out subnets (10.0.1.0/24, 10.0.2.0/24, etc.) for different availability zones or workloads.

Security groups and firewall rules: IP-based allow/deny rules use CIDR to specify source or destination ranges. Common patterns:

DNS and network tooling: Our IP lookup tool and port checker accept CIDR notation in advanced queries. DNS leak tests check whether your DNS queries are escaping to unexpected network ranges.

Special Offer

Frequently Asked Questions

What does 0.0.0.0/0 mean?

0.0.0.0/0 means 'all IPv4 addresses' — the prefix length of 0 means no bits are fixed, so every possible IP address matches. In routing, it's the default route (catch-all). In firewall rules, it means 'any source' or 'any destination.' In IPv6 the equivalent is ::/0.

How many IPs are in a /24 block?

A /24 block contains 256 total addresses (2^8), of which 254 are usable for hosts. The first address is the network address and the last is the broadcast address. The usable range in 192.168.1.0/24 is 192.168.1.1 through 192.168.1.254.

What is the difference between /24 and /32?

/24 defines a subnet containing 254 usable host addresses (a whole network). /32 defines a single specific host — it's a host route with no room for additional addresses. /32 routes are common in BGP for advertising individual server IPs, and in firewall rules for whitelisting specific IPs.

How do I convert between CIDR and subnet mask notation?

Count the number of consecutive 1 bits in the subnet mask — that's the CIDR prefix. 255.255.255.0 has 24 consecutive 1s → /24. 255.255.0.0 → /16. 255.255.255.128 has 25 1s → /25. Conversely, a /26 means 26 1-bits followed by 6 0-bits: 11111111.11111111.11111111.11000000 = 255.255.255.192.

Special Offer×