Interview Prep/Networking/Addressing, CIDR & Routing

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 →

  1. Advertise the same prefixes over both paths
  2. AWS prefers Direct Connect for equal-length prefixes, so keep both prefixes the same length
  3. On-prem set higher local preference for the DX learned path and prepend the AS path on the VPN advertisement
  4. Enable BFD on the DX virtual interface for sub-second failure detection
  5. Run a failover test during a change window and watch the ConnectionState metric

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.

All Networking questions Roadmap: Networking for DevOps

More on Addressing, CIDR & Routing