Interview Prep/Networking/Addressing, CIDR & Routing

You have 12 VPCs that need to talk to each other. Peering or Transit Gateway?

IntermediateScenarioAddressing, CIDR & Routing
Answer

Situation read → Peering is non-transitive and needs a full mesh, so the link count grows quickly.

What I'd do →

  1. Count: full mesh of 12 VPCs needs 66 peering connections and route table entries in each VPC
  2. Create one Transit Gateway and attach each VPC
  3. Use separate TGW route tables to control who can reach whom
  4. Accept the per-attachment and per-GB cost versus peering, which has no hourly charge

Why → Hub-and-spoke scales linearly and gives central routing control, at a price.

Interview tip → Say peering is still right for two or three VPCs with heavy traffic because it is cheaper and has no throughput cap.

All Networking questions Roadmap: Networking for DevOps

More on Addressing, CIDR & Routing