teluzia.Cloud Engineer · Day 43
CHAPTER 07 · AWS VPC AND NETWORKING

VPC CIDR planning

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Plan the VPC address space before creating subnets. You will reserve room for public, application and database tiers across two AZs and check alignment with Python. A good plan balances current capacity with future network connections, because overlapping blocks are difficult to connect cleanly. A VPC is a logically isolated network with associated CIDR blocks. Subnets consume nonoverlapping portions of those blocks. RFC1918 private IPv4 space is commonly used, but choose a block that does not collide with connected VPCs, on-premises networks or VPN routes. Prefix length controls total IPv4 addresses, but AWS reserves five addresses in each subnet. A /24 therefore has 256 total addresses and 251 assignable addresses under the normal AWS reservation rule. Include service needs, scaling and spare capacity rather than planning exactly one address per current server.

Think of it this way

The VPC is the campus property boundary; subnet blocks reserve separate building plots within it.

TOPIC 01 / 03Step by step

VPC CIDR boundaries

A VPC is a logically isolated network with associated CIDR blocks. Subnets consume nonoverlapping portions of those blocks. RFC1918 private IPv4 space is commonly used, but choose a block that does not collide with connected VPCs, on-premises networks or VPN routes. Use 10.20.0.0/16 as a fictional parent and validate each child with ipaddress.ip_network before adding it to the plan. Address planning reduces later renumbering and connectivity problems when a learning VPC becomes connected to another network or organization environment. Selecting a familiar 10.0.0.0/16 without checking existing networks may create overlap and make future peering or VPN routing impossible as planned.

WORKED EXAMPLE
Use 10.20.0.0/16 as a fictional parent and validate each child with ipaddress.ip_network before adding it to the plan.
Why this matters

Address planning reduces later renumbering and connectivity problems when a learning VPC becomes connected to another network or organization environment.

A common trap

Selecting a familiar 10.0.0.0/16 without checking existing networks may create overlap and make future peering or VPN routing impossible as planned.

MAKE IT VISIBLE

Explore a network boundary

CHANGE ONE VALUE. SEE WHAT HAPPENS.

Where does this network begin?

A CIDR prefix reserves the first bits for the network. More network bits means fewer addresses inside each network.

00001010000000000000000100101010
Network bits: 24Host bits: 8
NETWORK10.0.1.0/24
ADDRESS RANGE10.0.1.0 – 10.0.1.255
TOTAL ADDRESSES256
AWS SUBNET USABLE251
✦

AWS reserves five addresses in each subnet. Conventional IPv4 host counting often subtracts two instead. This explorer uses the AWS subnet count. AWS IPv4 subnet sizes range from /16 to /28; values outside that range are shown here to teach CIDR math.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

VPC CIDR boundaries

A VPC is a logically isolated network with associated CIDR blocks. Subnets consume nonoverlapping portions of those blocks. RFC1918 private IPv4 space is commonly used, but choose a block that does not collide with connected VPCs, on-premises networks or VPN routes. Use 10.20.0.0/16 as a fictional parent and validate each child with ipaddress.ip_network before adding it to the plan. Address planning reduces later renumbering and connectivity problems when a learning VPC becomes connected to another network or organization environment. Selecting a familiar 10.0.0.0/16 without checking existing networks may create overlap and make future peering or VPN routing impossible as planned.

WORKED EXAMPLE
Use 10.20.0.0/16 as a fictional parent and validate each child with ipaddress.ip_network before adding it to the plan.

Why this matters

Address planning reduces later renumbering and connectivity problems when a learning VPC becomes connected to another network or organization environment.

A common trap

Selecting a familiar 10.0.0.0/16 without checking existing networks may create overlap and make future peering or VPN routing impossible as planned.

Capacity and AWS reservations

Prefix length controls total IPv4 addresses, but AWS reserves five addresses in each subnet. A /24 therefore has 256 total addresses and 251 assignable addresses under the normal AWS reservation rule. Include service needs, scaling and spare capacity rather than planning exactly one address per current server. Six /24 subnets reserve separate tiers in two AZs; each has 251 assignable IPv4 addresses rather than the traditional LAN count of 254. Capacity arithmetic makes scale limits visible and prevents a correct CIDR calculation from becoming an incorrect cloud capacity estimate after provider reservations are applied. Subtracting two rather than five for ordinary AWS subnet planning overstates assignable addresses; separate mathematical block size from the documented service reservation rules.

WORKED EXAMPLE
Six /24 subnets reserve separate tiers in two AZs; each has 251 assignable IPv4 addresses rather than the traditional LAN count of 254.

Why this matters

Capacity arithmetic makes scale limits visible and prevents a correct CIDR calculation from becoming an incorrect cloud capacity estimate after provider reservations are applied.

A common trap

Subtracting two rather than five for ordinary AWS subnet planning overstates assignable addresses; separate mathematical block size from the documented service reservation rules.

Growth and connection compatibility

Leave unassigned address ranges for later tiers and check overlap with every network expected to connect. Adding a secondary VPC CIDR may help growth but has constraints and does not repair arbitrary conflicts. Keep a registry describing prefix, role, AZ and owner so future changes are reviewed against the original plan. Reserve 10.20.0.0/24 and .1.0/24 for public, .10.0/24 and .11.0/24 for app, and .20.0/24 and .21.0/24 for database. A visible registry keeps address choices coherent and gives reviewers evidence for future expansion rather than relying on remembered unused ranges. Randomly adding overlapping child blocks or connected network CIDRs makes routes ambiguous; validate containment and pairwise nonoverlap before any resource creation.

WORKED EXAMPLE
Reserve 10.20.0.0/24 and .1.0/24 for public, .10.0/24 and .11.0/24 for app, and .20.0/24 and .21.0/24 for database.

Why this matters

A visible registry keeps address choices coherent and gives reviewers evidence for future expansion rather than relying on remembered unused ranges.

A common trap

Randomly adding overlapping child blocks or connected network CIDRs makes routes ambiguous; validate containment and pairwise nonoverlap before any resource creation.

KEEP THESE WITH YOU

Today’s takeaways

Validate containment and overlap.

Apply cloud reservations.

Reserve documented growth space.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed