Cisco 路由器支援兩大類 VPN 部署模式:遠端存取 VPN 針對單一用戶端對企業總部;站點對站點 VPN 連接分公司與總部整個網段。本文釐清兩者架構差異、配置重點與 IKE/IPsec 階段設定要領。
| 項目 | Remote Access VPN | Site-to-Site VPN |
|---|---|---|
| 連接主體 | 單一 Client (PC/手機) ↔ 中心 VPN Gateway | 分公司 Gateway ↔ 總部 Gateway |
| 流量特徵 | Client 端產生虛擬介面,全域流量導入隧道 | 兩側子網互訪,跑動態路由(OSPF/EIGRP/BGP) |
| 配置重心 | 中心端:AAA、IP Pool、Group Policy、Split Tunnel | 雙邊:IKE Phase 1/2、Transform Set、ACL 匹配有趣流量 |
| 典型協議 | IPsec over UDP/TCP、SSL VPN (AnyConnect) | IPsec (GRE over IPsec、VTI、DMVPN、FlexVPN) |
aaa new-model → aaa authentication login default local → ip local pool VPN_POOL 10.10.10.10 10.10.10.50。crypto isakmp policy 10 → 加密 aes 256、雜湊 sha、群組 14、認證 pre-share、lifetime 86400。crypto isakmp client configuration group GROUP1 → key、dns、wins、pool VPN_POOL、save-password。crypto ipsec transform-set TS_ESP_AES_SHA esp-aes 256 esp-sha-hmac → mode tunnel。crypto dynamic-map DYN_MAP 10 → set transform-set TS_ESP_AES_SHA → reverse-route。crypto map STATIC_MAP 10 ipsec-isakmp dynamic DYN_MAP → 套用至 WAN 介面 crypto map STATIC_MAP。access-list 101 permit ip 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.255。crypto ipsec transform-set、crypto map match ACL 101、set peer、set transform-set、set pfs group14。crypto map,啟用 ipsec-isakmp。tunnel protection ipsec profile,OSPF/EIGRP 跑在 Tunnel 上。