Interview Prep/Networking/Addressing, CIDR & Routing

The route table has both a static route and a BGP-propagated route to the same prefix. Which wins in a VPC?

AdvancedScenarioAddressing, CIDR & Routing
Answer

Situation read → AWS has a defined route priority order, and getting it wrong creates outages during failover.

What I'd do →

  1. Remember the order: local route first, then longest prefix match, then for equal prefixes static routes beat propagated ones
  2. Among propagated routes, Direct Connect beats VPN static, which beats VPN BGP
  3. Inspect the effective routes: aws ec2 describe-route-tables --route-table-ids rtb-0abc --query 'RouteTables[0].Routes'
  4. If a stale static route outlives a migration, delete it

Why → A forgotten static route pins traffic to a dead path because it outranks propagated BGP routes of equal length.

Interview tip → Say you audit static routes after every network migration.

All Networking questions Roadmap: Networking for DevOps

More on Addressing, CIDR & Routing