问题描述
在广域互联场景中,总部与分支,总部为固定地址,分支为动态地址(例如 PPPoE 拨号);
此时,总部的 IPSec VPN 就无法配置 IKE Peer remote-address 为分支的公网地址;
解决方案
通过 IKEv1 协商
如果需要使用 IKEv1 协议,那么需要使用野蛮模式,才能处理客户端地址为动态地址的场景;
当配置华为网络设备时,在 IKE Peer 中:
1)通过 exchange-mode 使用野蛮模式;
2)并且该配置用于对方地址无法确定的场景,要向取消对该 Peer 的引用);
但是,在实际实践中,我们很少使用野蛮模式,所以这里不再叙述相关细节;
通过 IKEv2 协商
// -------------------------------------------------------- // IKE // 配置 IKE 提议 ike proposal 10 // 配置 IKE Peer 信息 ike peer rmt-employee v1 ike-proposal 10 pre-shared-key cipher Huawei123 # nat traversal // -------------------------------------------------------- // IPSec // 配置 IPSec Proposal 信息 ipsec proposal rmt-employee encapsulation-mode transport // 配置 IPSec 策略 ipsec policy-template rmt-employee 10 ike-peer rmt-employee proposal rmt-employee ipsec policy rmt-employee_P 10 isakmp template rmt-employee // -------------------------------------------------------- // 引用安全策略 interface GigabitEthernet 0/0/9 ipsec policy rmt-employee_P