Interview Prep/Networking/Addressing, CIDR & Routing

Why can't two VPCs with the same CIDR be peered?

BeginnerScenarioAddressing, CIDR & Routing
Answer

Situation read → A router cannot decide where to send 10.0.1.5 if both sides own that prefix.

What I'd do →

  1. Show the conflict: both route tables would need 10.0.0.0/16 pointing at the peer and local at once
  2. AWS rejects the peering request with an overlapping CIDR error
  3. Real options are re-IP one VPC, add a non-overlapping secondary CIDR for the shared workloads, or use PrivateLink for specific services
  4. Prevent it with a central IPAM, for example AWS VPC IPAM allocations

Why → Peering is pure routing with no NAT, so addresses must be globally unique inside the connected domain.

Interview tip → Offer PrivateLink as the answer when the requirement is only "expose one service" rather than full network reachability.

All Networking questions Roadmap: Networking for DevOps

More on Addressing, CIDR & Routing