AWS in 1 Min · Episode 37

AWS CIDR blocks explained, part 2: splitting a VPC into subnets

Splitting a VPC into subnets. Watch the one-minute video, then read the details.

David Gomez1:22 video · 3 min read

"Every address in a subnet is yours to use." Not in AWS. Five addresses in every subnet are reserved, whatever its size. In a large subnet you never notice. In a small one, it can be a third of the space. Part 1 covered how to read a CIDR block. This part covers how to cut a VPC into subnets without painting yourself into a corner.

A subnet is a slice of the VPC

A subnet is a range of IP addresses taken from your VPC's CIDR block. Two facts shape every design:

  • A subnet lives in exactly one Availability Zone. To run in three Availability Zones, you need at least three subnets.
  • A subnet's block must sit inside the VPC's block, and it can be as large as the whole VPC or any smaller piece.

Take a VPC with 10.0.0.0/16: 65,536 addresses. Cut it into /24 subnets and you can fit 256 subnets of 256 addresses each: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24 and so on.

The five reserved addresses

In every subnet, AWS keeps the first four addresses and the last one. In 10.0.1.0/24 those are:

  • 10.0.1.0: the network address
  • 10.0.1.1: reserved for the VPC router
  • 10.0.1.2: reserved by AWS (DNS-related)
  • 10.0.1.3: reserved for future use
  • 10.0.1.255: the broadcast address. A VPC doesn't support broadcast, so AWS reserves it

So a /24 gives you 251 usable addresses, not 256. The smallest subnet AWS allows is a /28: 16 addresses, of which only 11 are usable.

Remember that you aren't the only one using addresses. Load balancers, NAT gateways, VPC endpoints, Lambda functions attached to the VPC and managed databases all take IP addresses from your subnets. Container platforms can use one address per pod or task. Subnets fill up faster than a count of servers suggests.

The rules that bite later

  • Subnets in a VPC can't overlap. AWS refuses to create a subnet whose range overlaps an existing one.
  • You can't resize a subnet. To change its size you create a new one, move everything over and delete the old one.
  • You can't resize the VPC's block either, although you can add secondary CIDR blocks to a VPC.

That makes the first plan important. A sensible approach:

  1. Decide how many Availability Zones you'll use (two at least; three is common) and how many tiers you need, for example public, private application and private data.
  2. Size each subnet for growth, not for today. Addresses inside a VPC are free; running out is expensive.
  3. Leave unallocated space in the VPC for subnets you haven't thought of yet.

A common mistake is slicing the whole VPC into equal /24s on day one. It looks tidy, but the container cluster that needs thousands of addresses then has nowhere to go.

Where AI fits

An AI assistant is good at this arithmetic. Give it the VPC block, the number of Zones and tiers, and it will draft a full subnet plan in seconds, with ranges that fit together.

What it can't see is the rest of your network. You still have to check for overlap with your other VPCs, your office or data center ranges, and any partner networks you connect to. It matters because two VPCs with overlapping CIDR blocks can't be connected with VPC peering, and overlapping ranges make routing through VPNs or transit gateways ambiguous. For larger setups, Amazon VPC IP Address Manager (IPAM) keeps a central record of your ranges and can flag overlaps, so the check doesn't depend on a spreadsheet.

Quick recap

  • A subnet is a slice of the VPC's range, in one Availability Zone.
  • Five addresses are reserved in every subnet: a /24 gives 251, a /28 gives 11.
  • Subnets can't overlap and can't be resized, so size for growth and leave spare space.
AWS in 1 Min #37 · 1:22

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS