Tuần 4 - Ngày 4: VPN và Hybrid Connectivity
Mục tiêu học tập
- Hiểu các VPN options trên AWS
- Nắm vững Site-to-Site VPN configuration
- Biết cách thiết kế hybrid architectures
1. AWS VPN Options
Types of VPN
2. Site-to-Site VPN Components
Architecture
Customer Gateway (CGW)
Requirements for CGW device:
- IKEv1 or IKEv2 support
- IPsec support
- BGP (optional but recommended)
- Static public IP address
Supported devices:
- Cisco (ASA, IOS, IOS-XE)
- Juniper
- Palo Alto
- Fortinet
- pfSense
- Many others...
3. VPN Tunnel Configuration
Two Tunnels for HA
Routing Options
1. Static Routing:
- Manually specify on-premises CIDR
- Simple but no automatic failover
2. Dynamic Routing (BGP):
- Exchange routes automatically
- Faster failover
- Recommended for production
BGP Configuration:
- AWS ASN: 64512 (default) or custom
- Customer ASN: Your ASN
- BGP over tunnel inside IPs
4. Accelerated Site-to-Site VPN
With AWS Global Accelerator
5. AWS Client VPN
Architecture
Use Cases
- Remote worker access
- Contractor access
- Emergency access during disaster
6. VPN CloudHub
Hub-and-Spoke Connectivity
7. Hybrid Architecture Patterns
Pattern 1: VPN Only
Best for:
- Getting started with hybrid
- Lower bandwidth requirements (<1.25 Gbps)
- Quick setup needed
- Backup for Direct Connect
Limitations:
- Performance varies with internet
- Max ~1.25 Gbps per tunnel
Pattern 2: Direct Connect + VPN Backup
Pattern 3: Dual Direct Connect
8. VPN Performance Tuning
Bandwidth Optimization
Latency Optimization
1. Use Accelerated Site-to-Site VPN
2. Enable Dead Peer Detection (DPD)
3. Configure BFD for fast failover
4. Use BGP for dynamic routing
9. Câu hỏi ôn tập
-
Site-to-Site VPN có bao nhiêu tunnels?
Xem đáp án
2 tunnels per VPN connection — active-active (BGP) hoặc active-standby. Hai tunnels terminate ở 2 endpoints AWS khác nhau (different AZ) để HA. Mỗi tunnel max 1.25 Gbps. Cả hai tunnels nên được config trên Customer Gateway device. Nếu chỉ dùng 1 tunnel: không có redundancy phía AWS side. BGP ưu tiên tunnel với best path; non-BGP (static routing) thường dùng active-standby.
-
Accelerated VPN khác VPN thường như thế nào?
Xem đáp án
Accelerated VPN (Accelerated Site-to-Site VPN) route traffic qua AWS Global Accelerator anycast IPs — traffic vào AWS network tại Edge Location gần nhất, rồi traverse AWS backbone. Giảm latency và jitter so với routing toàn bộ qua public internet. Phù hợp cho: global on-premises offices cách xa AWS Region, latency-sensitive applications, gaming/VoIP qua VPN. Chi phí thêm Global Accelerator fee (~$0.025/giờ + data fees).
-
Client VPN dùng authentication methods nào?
Xem đáp án
3 methods: (1) Active Directory (AWS Managed Microsoft AD hoặc AD Connector — authenticate bằng corporate credentials), (2) Certificate-based (mutual TLS — client và server đều có certificates từ CA), (3) SAML-based federated authentication (Okta, Azure AD, Ping Identity). Có thể kết hợp AD + Certificate. Client VPN dùng OpenVPN protocol — compatible với nhiều VPN clients (AWS VPN Client, OpenVPN Connect).
-
VPN CloudHub dùng để làm gì?
Xem đáp án
VPN CloudHub cho phép nhiều on-premises sites giao tiếp với nhau qua AWS như một hub. Mỗi site có Site-to-Site VPN kết nối đến cùng VGW (Virtual Private Gateway). Traffic từ Site A → AWS VGW → Site B — AWS đóng vai trò trung gian. Phù hợp cho công ty có nhiều văn phòng cần kết nối với nhau mà không cần MPLS network riêng. Không phải service riêng — chỉ là architecture pattern với existing VPN.
-
Làm sao để tăng VPN bandwidth?
Xem đáp án
(1) Multiple VPN connections + ECMP qua Transit Gateway — nhiều connections parallel, aggregate bandwidth. (2) Accelerated VPN giảm latency nhưng không tăng throughput per tunnel. (3) Nếu cần > 10 Gbps: migrate sang Direct Connect (1G, 10G, hoặc 100G). Với TGW + ECMP: N VPN connections × 2 tunnels/connection × 1.25 Gbps/tunnel = N × 2.5 Gbps. Cần Customer Gateway device hỗ trợ ECMP và BGP.
10. Bài tập thực hành
- Create Site-to-Site VPN connection
- Download và review VPN configuration
- Setup Client VPN endpoint
- Test failover scenarios
Tài liệu tham khảo chính thức
Ngày tiếp theo: Route 53 Advanced