Skip to content
On this page 7

IP address planning that survives growth

Overlapping CIDRs are the cheapest mistake to make and one of the most expensive to fix. Here is how to plan an address space once and enforce it in CI.

IP address planning is the allocation of private network ranges to regions, environments and subnets before anything is built. It takes an afternoon and it is close to irreversible, because every route table, firewall rule, partner connection and on-premises allow list written afterwards refers to the ranges you chose. It is the least glamorous architectural decision in a cloud estate and one of the few with no cheap undo.

The failure mode is boring, which is why it keeps happening. Somebody creates the first VPC, accepts the default 10.0.0.0/16, and ships. Somebody else creates the second VPC in a different account eighteen months later and accepts the same default. Nothing breaks, because the two VPCs have never needed to speak. Then they do.

What an address plan is actually deciding

#

Not “how many IP addresses do we need”. Almost nobody runs out of addresses inside a /16; that question is a distraction. The plan decides four things that are much harder to change:

  • Whether two networks can ever be joined. Overlapping ranges cannot be routed between. This is not a policy, it is arithmetic.
  • Whether routing can be summarized. If every environment’s addresses are scattered, every route table entry is specific and the tables grow with the estate. If the plan is hierarchical, one prefix describes a whole region.
  • Whether an address tells you anything. In a good plan, the range answers “which environment is this?” without a lookup. In a bad one, the only way to know what 10.0.4.12 is is to ask someone.
  • Where the next environment goes. With a plan, it is an allocation. Without one, it is a conversation, and conversations do not scale to twenty accounts.

Why overlaps are so expensive to fix

#

Consider the ordinary sequence. Two VPCs, both 10.0.0.0/16, both fine in isolation. Then one of these happens, and one of them always does:

  1. A shared service — a monitoring collector, an internal API, a database somebody needs to read — is placed in one VPC and needed from the other.
  2. The company acquires a business, or is acquired, and the two networks must be joined.
  3. A customer or partner requires a private connection and sends their own range, which turns out to be 10.0.0.0/16 as well.
  4. A second region is opened and the default was used again there.

At that point, the options are all bad. You can put network address translation in the path, which works and leaves you with a permanent translation layer that every future engineer must learn about, that breaks anything embedding IP addresses in payloads, and that makes logs lie about who called what. You can expose the specific services through private endpoints, which is cleaner but scales per service and costs per hour and per endpoint. Or you can renumber.

Renumbering is the honest fix and it is a project. New CIDR association, new subnets, migrate every instance, task, endpoint and database into them, then update every route table, security group that referenced a range rather than a group, DNS record, partner firewall rule, on-premises allow list and internal document that named the old addresses. None of the steps are difficult. The coordination is the cost, and it lands in whatever quarter the acquisition or the enterprise deal happens to fall — which is to say, the worst possible quarter, because that is the only kind that forces the issue.

What a hierarchical plan looks like

#

The shape that works is a tree: a large reserved range at the top, a fixed-size slice per region, a fixed-size slice per stage inside a region, and subnets below that. Fixed sizes matter more than efficient sizes, because a plan where every allocation is the same size can be computed rather than remembered.

Here is a concrete one. The AWS Enterprise Baseline — the AWS edition of the BuiltForProd Baseline — reserves a /8 and divides it with capacity for 16 regions, each with 8 workload stages. A region takes a /12. A stage inside that region takes a /16. Subnets are carved at /18. The numbers below describe that edition.

Figure 1
A hierarchical address plan from a slash 8 down to slash 18 subnets

A reserved slash 8 range sits at the top. It divides into sixteen regional slash 12 blocks, of which two are shown: a home region and a second region, with the rest unallocated. One regional block divides into eight stage slash 16 blocks, of which sandbox, dev, staging and production are shown and four are unallocated. One stage block divides into slash 18 subnets spread across availability zones.

reserved /816.7 million addresseshome region /121 of 16region 2 /1214 unallocated /12sstages inside one regionsandboxdevstagingprodeach a /16 · 4 stage slots still freeinside one stage/18/18subnets across 3 AZs
A /8 divides into 16 regional /12s; each regional /12 has room for 8 stage /16s with headroom to spare; each stage /16 divides into /18 subnets. Every level is a fixed size, so any address can be decoded to a region and a stage by arithmetic rather than by asking.

The useful property is not the size. It is that the arithmetic is closed. Sixteen regions is more than any company this side of a hyperscaler will open; eight stages per region is more than the four most organizations run, which leaves room for the regulated tenant, the acquisition and the partner sandbox that nobody has asked for yet. Adding a region does not require anyone to reopen the plan, because the plan already has a slot for it. In that edition a region is a folder in the repository, and the address map, the region-restriction policy and the tag policy discover it.

DecisionCheap versionThe version that lasts
Top-level reservationThe default 10.0.0.0/16A large reserved block with room for every region you will not open
Per-region sizingWhatever the first region neededA fixed size per region, identical everywhere
Per-stage sizingGrown as stages appearedA fixed size per stage, so stage is readable from the address
Who allocatesWhoever creates the VPCA pool with rules, which refuses an allocation that breaks the plan
Where the plan livesA wiki page, last edited two years agoOne address map in the repository that the code reads
What stops a bypassReview, when the reviewer noticesA CI guard that fails the build on a hardcoded range

Why VPC IPAM matters more than a spreadsheet

#

A spreadsheet is a record of intent. AWS VPC IPAM is an allocating authority, and the difference shows up on the day intent and reality diverge.

With IPAM, you define pools that mirror the plan — a top-level pool, a pool per region, a pool per stage — and a VPC requests a CIDR from a pool instead of declaring one. Four things follow. Allocations cannot overlap inside a scope, because the service will not issue an overlapping range. Allocation rules, such as a minimum and maximum netmask, are enforced at creation time rather than at review time. Utilization is monitored, so “we are running out in staging” arrives as a metric rather than as an outage. And the pools are shared across the organization, so every account in every team draws from the same authority instead of from local memory.

That last point is the one that matters at scale. An address plan is only as good as its weakest participant, and the weakest participant is always the account created in a hurry for a proof of concept that then became load-bearing.

The guard that makes the plan true

#

Enforcement at creation time still leaves one hole: code that hardcodes a range and never asks the pool for anything. A security group rule with a literal 10.0.0.0/8. A route added by hand during an incident. A module input defaulted to a CIDR because that was faster than plumbing the real value through.

The fix is small and mechanical. One file — an address map — is the only place in the repository allowed to contain a CIDR literal. Everything else derives its ranges from that map or from IPAM. Then a check in continuous integration greps the codebase for address literals outside the allowed file and fails the build when it finds one.

The AWS Enterprise Baseline ships six such guard scripts, and rejecting hardcoded CIDRs is one of them. Its siblings are a similar shape: a VPC map check, a stack layout check, a module version check, a required-input check, and a full set of mock outputs so that a brand-new environment can be planned end to end before any of it exists. None of them are clever. All of them convert a rule somebody has to remember into a rule the pipeline remembers.

What to do if you already overlap

#

You probably do, at least somewhere. The order that works:

  1. Inventory. Every VPC, every on-premises range, every partner range, in every account and region. This is the step people skip; it is also the step that finds the problem you did not know about.
  2. Reserve properly now. Pick the large block and write the plan even though the current estate does not fit it. New environments go into the plan immediately; the plan being partially populated is fine, and beats a plan that waits for a migration.
  3. Rank the overlaps by whether they can ever meet. Two ranges that will never be routed together are a documentation problem, not an engineering one. Prioritize the ones with a plausible path: anything that might attach to the same transit gateway, reach the same shared services, or meet an on-premises network.
  4. Renumber the smallest first. Usually a non-production environment, which gives you the runbook before you need it in production.
  5. Guard the boundary. Once the plan is in a file, add the CI check the same week. Otherwise you will do this again.

Where this sits in the bigger picture

#

An address plan is one of the decisions a landing zone makes on your behalf, alongside the account structure and the network topology it routes on. They are related for a practical reason: a hub and spoke topology is exactly the design that turns an overlap from a curiosity into an outage, because it is the design in which every environment eventually meets every other.

If you want the plan and the enforcement to arrive as one working system rather than a design document, that is what the BuiltForProd Baseline delivers, deployed into your own accounts with the repositories handed over. If you would rather have someone read the estate you already have and tell you which overlaps will actually bite, that is what the BuiltForProd Assessment is for.

Either way, do step one this week. An inventory of your own address space is a morning’s work, it belongs to you regardless of what you buy, and nobody has ever regretted having it before the acquisition call.

Questions

How large should a cloud address plan be?

Larger than your current need by at least an order of magnitude, because private address space is free and renumbering is not. The RFC 1918 10.0.0.0/8 range holds about 16.7 million addresses; reserving a big slice of it for cloud use costs nothing today and removes an entire class of future problem.

Why are overlapping CIDRs such a problem?

Because IP routing cannot disambiguate two identical ranges. Two VPCs with the same CIDR cannot be peered, cannot both attach usefully to the same transit gateway, and cannot be reached from a shared on-premises network. The workarounds — network address translation in the path, or private endpoints per service — add permanent operational cost to solve a problem that a spreadsheet would have prevented.

What is AWS VPC IPAM for?

IPAM is an address allocation service: you define pools that mirror your plan, and VPCs request CIDRs from a pool rather than declaring one. It enforces allocation rules, prevents overlap inside the scope it manages, tracks utilization, and can be shared across accounts in an organization so that every account draws from the same authority.

Can we fix an overlapping range later?

Yes, and it is never a small piece of work. You create the new range alongside the old one, move subnets and workloads into it, update every route table, security group reference, DNS record, allow list and partner firewall rule that named the old range, and then remove it. The engineering is straightforward; the coordination is what costs, and it lands on a quarter you did not choose.

Should each environment have its own address range?

Yes. Beyond the routing benefits, distinct ranges per stage mean a firewall rule, an allow list or an audit question can be answered by the address itself. "Is 10.48.x.x production?" should have a one-word answer, and it only does if the plan made stage a property of the address.

This is what we build.

BuiltForProd deploys a production foundation into your own cloud accounts, hands over the repositories and the documentation, and, if you want it, keeps running it with your team. Tell us what you are running and what is coming next. The first call is 30 minutes, with an engineer who scopes engagements, not a salesperson.

The calendar invite and the video link go to this address. Prefer to write? Send a message instead.

Nine security services, one account

What GuardDuty, Security Hub, Config, CloudTrail and their siblings each actually catch, what they cost, and the order to switch them on.