IP Ranges, Subnets & Availability Zones

Read CIDR notation like 10.0.0.0/16 and split a VPC into subnets across data centers.

1 min read

CIDR in 60 seconds

A VPC gets a range of private IP addresses written in CIDR notation. The number after the slash says how many leading bits are fixed, so a smaller number means a bigger range.

CIDRAddressesTypical use
10.0.0.0/1665,536A whole VPC
10.0.1.0/24256One subnet
10.0.1.0/2816A tiny subnet
Note

AWS reserves 5 addresses in every subnet (the first four and the last one), so a /24 gives you 251 usable IPs.

Subnets and Availability Zones

A Region has several Availability Zones (AZs): separate data centers with independent power and networking. A subnet is a slice of your VPC's range that lives in one AZ.

A common layout uses two AZs for resilience:

SubnetAZCIDRHolds
public-aus-east-1a10.0.0.0/24Load balancer, NAT gateway
public-bus-east-1b10.0.1.0/24Load balancer, NAT gateway
private-aus-east-1a10.0.10.0/24App servers, databases
private-bus-east-1b10.0.11.0/24App servers, databases
Tip

Plan ranges that don't overlap with your office network or other VPCs. Overlapping ranges make it very hard to connect them later.

Key takeaways

  • CIDR: a smaller suffix means more addresses (/16 is huge, /28 is tiny).
  • Each subnet lives in exactly one Availability Zone.
  • Use at least two AZs and non-overlapping IP ranges.

Check your understanding

Pick an answer to see the explanation.

  1. 1. Which range is larger?

  2. 2. Why spread subnets across two Availability Zones?