We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

CIDR Blocks

The CIDR block (Classless Inter-Domain Routing) we chose when we created the VPC tells us how many addresses can exist inside the VPC.

CIDR is pronounced "sih-der."

No, it's pronounced "sigh-der." I'm the author, Lane, go back to YouTube.

This isn't a networking course, but we'll cover the basics of IP addressing.

IPv4 addresses (the "normal" kind) have four segments: A.B.C.D.

Each segment is a number from 0 to 255 (an 8-bit unsigned integer). After a segment hits 255, it rolls over to 0, and the previous segment increments. For example:

10.20.30.255 + 1 = 10.20.31.0
10.20.255.255 + 1 = 10.21.0.0
10.255.255.255 + 1 = 11.0.0.0

An IPv4 address is a 32-bit number split into four 8-bit segments. The lowest possible address is 0.0.0.0, and the highest is 255.255.255.255 (though much of that space is reserved for special purposes).

CIDR describes a block of IP addresses in terms of a starting address and a size:

starting.address.goes.here/size

The size suffix follows the formula 2^(32 - size) = number_of_addresses. So a larger suffix actually means fewer addresses. Here are some examples:

CIDR Size suffix Number of addresses
10.25.37.123/32 32 1
10.25.37.0/24 24 256
10.25.0.0/16 16 65,536
10.0.0.0/8 8 16,777,216

You may have heard about another kind of addressing called IPv6, and may have encountered its advocates in the wild. It's a newer standard for IP addressing that supports 340 undecillion addresses, rather than the ~4.3 billion addresses in IPv4, but its support by many cloud providers is still... lackluster.