Direct Connect is primary and a Site-to-Site VPN is backup. How do you make sure traffic prefers Direct Connect and fails over cleanly?
AdvancedScenarioAddressing, CIDR & Routing
Answer
Situation read → AWS prefers Direct Connect over VPN when prefixes are equal, but you must control it deliberately.
What I'd do →
- Advertise the same prefixes over both paths
- AWS prefers Direct Connect for equal-length prefixes, so keep both prefixes the same length
- On-prem set higher local preference for the DX learned path and prepend the AS path on the VPN advertisement
- Enable BFD on the DX virtual interface for sub-second failure detection
- Run a failover test during a change window and watch the
ConnectionStatemetric
Why → A more specific prefix on the backup path would steal traffic, so keep prefixes aligned and control the preference with attributes.
Interview tip → Say you test failover on a schedule, because untested backup paths fail on the day you need them.
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