網路題先畫 source、destination、route、stateful filter、stateless filter 與 return path。Packet path 一明確,大多數 distractor 會自己消失。
Public/private 是 routing property
Public subnet 有指向 Internet Gateway 的 route。只有 public IPv4 不會自動可上網。Private-subnet IPv4 egress 通常經 public subnet 裡的 NAT Gateway;外部不能用它發起 unsolicited inbound connection。IPv6 的 egress-only Internet Gateway 提供不需 NAT 的 outbound-only behavior。
Security group 是 stateful resource control;NACL 是 stateless subnet control,依 rule order 評估,所以 return traffic 與 ephemeral port 都要考慮。Application tiers 之間優先以 SG reference 放行。
根據 topology 選連線
| 需求 | 選擇 |
|---|---|
| 兩個 VPC,簡單非 transitive | VPC peering |
| 多 VPC 與 on-prem | Transit Gateway |
| Private access 單一 provider service | PrivateLink/interface endpoint |
| Private access S3/DynamoDB | Gateway endpoint |
| 走 Internet 的 encrypted link | Site-to-Site VPN |
| 穩定 dedicated capacity | Direct Connect,通常加 VPN backup |
Peering 不 transitive。Direct Connect 預設不加密。大量存取 AWS service 時,NAT Gateway 費用可能讓 endpoint 更便宜。
DNS 與 edge service 處理不同 layer
Route 53 Alias 可指向支援的 AWS resource,並可用在 zone apex;CNAME 不行。Routing policy 看 intent:weighted 分流量、latency 看 network latency、failover 做 active/passive、geolocation 依 user location 套規則。
CloudFront 在 edge cache HTTP content,並用 OAC 或合適 private-origin pattern 保護 origin。Global Accelerator 提供 static anycast IP,把 TCP/UDP 導入 AWS global network;它不 cache content。
考試視角: CloudFront 是「把 HTTP cache 靠近 user」;Global Accelerator 是「穩定並加速 global network entry」;Route 53 是「DNS 要回哪個 endpoint」。
複習卡
- Reachability 由 route table 建立,不是 address。
- SG stateful;NACL stateless。
- Peering 非 transitive;Transit Gateway 是 hub。
- PrivateLink 能暴露單一 service,無需打通整個 network。
- DNS、CDN、anycast acceleration 解決不同問題。