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 →
- Remember the order: local route first, then longest prefix match, then for equal prefixes static routes beat propagated ones
- Among propagated routes, Direct Connect beats VPN static, which beats VPN BGP
- Inspect the effective routes:
aws ec2 describe-route-tables --route-table-ids rtb-0abc --query 'RouteTables[0].Routes' - 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.
More on Addressing, CIDR & Routing
You own 10.0.0.0/16 for a new VPC and need separate /24 subnets for dev, QA and prod across two AZs. How do you carve it up?BeginnerA host is configured as 192.168.1.130/25. What network does it belong to and what is the broadcast address?BeginnerHow many usable IPs does an AWS subnet of /28 have?BeginnerA route table has 10.0.0.0/16 -> local and 10.0.1.0/24 -> vpn-gw. Where does a packet to 10.0.1.5 go?BeginnerA newly built server can ping everything in its subnet but nothing outside. What is the first thing you check?BeginnerYou are picking a private range for a new company network. Which RFC 1918 range do you choose and why?Beginner