Lesson 7 of 11 Advanced Networking

Planning IP Address Space with VPC IPAM

This lesson explains how professional-level designs plan address space centrally from the start, since overlapping or exhausted ranges block connectivity between VPCs and with on-premises networks for years.

Learning outcomes

After completing this lesson, you will be able to:

  • Apply IP address planning principles.
  • Describe how VPC IP Address Manager allocates and audits ranges.
  • Explain how PrivateLink and private NAT handle overlapping CIDRs.
  • Describe the building blocks for IPv6.

Planning principles

Address space is cheap to allocate and expensive to change, so a large organisation plans it before the first VPC is created. The starting point is a large, contiguous private range for AWS that does not overlap on-premises networks, partner networks or the networks of likely acquisitions, because any overlap later blocks routing between them. Allocating that range hierarchically, first by Region, then by environment, then by VPC, allows routes to be summarised, so a transit gateway or on-premises router needs one route per Region rather than one per VPC.

VPCs should be sized for growth. A subnet cannot be resized after creation, and each subnet loses five addresses to AWS. Some services consume addresses quickly: Amazon EKS with the VPC CNI gives every pod an address from the VPC, and Lambda functions in a VPC use addresses for their network interfaces. Additional CIDR blocks can be added to a VPC later, for example a secondary range from the 100.64.0.0/10 space for pods, but they must not overlap any network the VPC connects to.

VPC IP Address Manager (IPAM)

IPAM plans, allocates, tracks and audits IP addresses across accounts and Regions. An administrator creates a hierarchy of pools (for example by Region and environment) with allocation rules such as minimum and maximum netmask and required tags, and shares them through RAM. Teams then create VPCs from a pool and receive a CIDR automatically, without overlap. IPAM also monitors compliance, finds overlapping or unmanaged CIDRs, and tracks public IPv4 use, which carries a charge.

The following diagram shows an example pool hierarchy by Region and environment.

An IPAM pool hierarchy. A top-level pool of 10.0.0.0/8 is divided into Regional pools for eu-west-1 and us-east-1, each divided into production and development pools. A team creating a VPC from the eu-west-1 production pool receives the next free /16 automatically, within the allocation rules, so CIDRs never overlap.
The CIDR ranges are an example. Because every VPC is allocated from a pool, IPAM can guarantee that no two VPCs overlap.
Select all that apply

IPAM capabilities

Exam skills 1.4.2

Identify what VPC IP Address Manager provides.

Log in to try this activity Interactive activities are free with an account.

Handling overlapping CIDRs

Overlapping ranges, which are common after acquisitions, prevent routing between the networks, because a router cannot tell which network an address belongs to. The most durable fix is to re-address the smaller network, which is disruptive but removes the problem for good.

Where re-addressing is not possible, the networks can be connected at the service level instead. PrivateLink and VPC Lattice need no routes between the networks, so specific services can be reached despite the overlap. When workloads need general connectivity, a private NAT gateway translates addresses: the overlapping workloads sit in a secondary, non-routable range, and their traffic leaves through a private NAT gateway in a routable subnet, so the other network sees only routable addresses.

Scenario questions

Overlapping networks

Exam skills 1.4.2

Connect networks whose address ranges overlap.

Log in to try this activity Interactive activities are free with an account.

IPv6

IPv6 removes address exhaustion, and IPAM can manage Amazon-provided or bring-your-own IPv6 ranges. Dual-stack VPCs, egress-only internet gateways for outbound IPv6, and IPv6-only subnets for workloads such as EKS are the main building blocks. DNS64 with NAT64 on a NAT gateway lets IPv6-only workloads reach IPv4 services.

Worked example

Overlap-free VPCs from IPAM

After two acquisitions created overlapping networks, a company wants to guarantee that every new VPC gets a unique range. IPAM holds a top-level pool for the organisation, Regional pools beneath it, and environment pools shared through RAM. Teams no longer choose CIDRs; they ask the pool for a block of the size they need:

aws ec2 create-vpc --ipv4-ipam-pool-id ipam-pool-0euw1prod --ipv4-netmask-length 22 \
  --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=orders-prod}]'

IPAM records the allocation, refuses any request that would overlap, and can enforce allocation rules such as a minimum and maximum netmask per pool. For the existing overlapping networks, re-addressing is the long-term fix; meanwhile, applications that must talk across the overlap use PrivateLink or a private NAT gateway that translates the overlapping range to a unique one.

Check yourself

How can two networks with overlapping CIDRs communicate when re-addressing is not possible?

Show answer

Through private NAT gateways that translate to non-overlapping addresses, or by exposing services through PrivateLink.

Exam Tips

Remember for the exam

  • For central CIDR allocation and overlap prevention across accounts, use VPC IPAM.
  • Share IPAM pools through RAM so teams receive non-overlapping CIDRs automatically.
  • Overlapping CIDRs that cannot be changed call for PrivateLink, VPC Lattice or a private NAT gateway.
  • Allocate address space hierarchically so routes can be summarised.
  • IPv6 with egress-only internet gateways removes address exhaustion; NAT64 reaches IPv4 services.