Networking interview question · Most asked

How do you connect many VPCs together, and why isn't VPC peering always enough?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

Peering connects exactly two VPCs and isn't transitive, so a full mesh grows quadratically and is hard to segment. A hub such as AWS Transit Gateway (Azure Virtual WAN or hub VNet, Google Cloud Network Connectivity Center) lets every VPC attach once, with route tables for segmentation and central links to on-premises.

Longer Answer

Peering is still good for a few high-bandwidth pairs (no hourly attachment or data-processing charges on the hub). All options require non-overlapping CIDRs. Shared VPC models (Google Cloud Shared VPC, AWS VPC sharing) avoid connectivity altogether by letting several projects/accounts use one network.

Key Points

  • Peering: 1-to-1, non-transitive.
  • Mesh = n(n-1)/2 connections.
  • Transit hub with route-table segmentation.
  • No overlapping ranges anywhere.

Deep dive: Networking Tutorial: Connecting Networks

Explanation

What interviewers look for

Scaling, segmentation and cost trade-offs.

More most-asked Networking questions

← All Networking questions

Was this page helpful?