Direct Connect & Site-to-Site VPN

Dedicated circuits, hosted connections, virtual interface types (public/private/transit), BGP over Direct Connect, and VPN as failover.

Overview

Overview AWS Direct Connect and Site-to-Site VPN are the two primary mechanisms for establishing private connectivity between on-premises data centers and AWS. They serve different use cases and are frequently deployed together for redundancy.

AWS Direct Connect provides dedicated network connections from your premises to AWS via a physical fiber circuit. Connections are established at one of AWS's Direct Connect locations (co-location facilities operated by partners). You can order a Dedicated Connection (1G or 10G port owned by you) or a Hosted Connection (sub-1G or 1G/10G shared on a partner's port). Direct Connect provides consistent network performance, reduced data transfer costs compared to internet, and higher bandwidth than VPN.

Once the physical connection is established, you create Virtual Interfaces (VIFs) on it. A Private VIF connects to a Virtual Private Gateway or Direct Connect Gateway to access your VPCs' private resources. A Public VIF connects you to AWS public services (S3, DynamoDB, SQS) over the AWS backbone using public IP addresses. A Transit VIF connects to a Direct Connect Gateway attached to a Transit Gateway, enabling connectivity to all TGW-attached VPCs.

AWS Site-to-Site VPN creates IPsec VPN tunnels over the public internet between your on-premises VPN device and an AWS Virtual Private Gateway or Transit Gateway. Each VPN connection consists of two tunnels for redundancy. VPN is faster to provision (minutes vs weeks for Direct Connect), lower cost, and typically used as backup for Direct Connect or as primary connectivity for smaller offices.

BGP is mandatory for Direct Connect and optional but recommended for Site-to-Site VPN. BGP enables dynamic route exchange, making failover between Direct Connect and VPN automatic when properly configured with appropriate route preferences.

Key concepts

  • Direct Connect Location
  • Virtual Interface (VIF) Types
  • Direct Connect Gateway
  • IPsec Site-to-Site VPN
  • BGP Route Preference for Failover

Interview questions

  • How do you configure Direct Connect with VPN failover? Walk through the BGP configuration on both sides.
  • What is MACsec and when would you use it over a Direct Connect connection instead of IPsec VPN?

Sign up free to read the full topic

More Networking topics

Start free on Cariara · Coding problems · System design studio