As the gateway of a branch, the FW uses the IPSec intelligent link selection function for dynamic IPSec tunnel switching.
As shown in Figure 1, the headquarters and branch connect to the Internet through FW_A and FW_B, respectively. FW_A connects to the Internet through one link. FW_B connects to the Internet through two links.
The purposes of this networking are as follows:
The local interface in IPSec intelligent link selection can be an interface that dynamically obtains IP addresses through PPPoE or DHCP. That is, when GE0/0/1 or GE0/0/2 on FW_B in Figure 1 obtains IP addresses through PPPoE or DHCP, the IPSec intelligent link selection function is also available.
The method for configuring IPSec intelligent link selection when the local interface has a fixed IP address is the same as that when the local interface obtains IP addresses dynamically.
Item |
Data |
|---|---|
FW_A |
Interface: GigabitEthernet 0/0/3 IP address: 10.1.1.1/24 Security zone: Trust |
Interface: GigabitEthernet 0/0/1 IP address: 3.3.3.3/24 Security zone: Untrust |
|
IPSec configuration Scenario: Site-to-multisite Peer IP Address: Do not Specify Peer Gateway Authentication Type: Pre-Shared Key Pre-Shared Key: Admin@123 Local ID: IP Address Peer ID: Any |
|
FW_B |
Interface: GigabitEthernet 0/0/1 IP address: 1.1.1.1/24 Security zone: Untrust |
Interface: GigabitEthernet 0/0/2 IP address: 2.2.2.2/24 Security zone: Untrust |
|
Interface: GigabitEthernet 0/0/3 IP address: 10.1.2.1/24 Security zone: Trust |
|
IPSec configuration Enable IPSec smart-link Scenario: Site-to-site Peer IP Address: 3.3.3.3 Authentication Type: Pre-Shared Key Pre-Shared Key: Admin@123 Local ID: IP Address Peer ID: Any |
|
Tunnel detection Switching times: 3 Detection packets: 10 Sending interval: 1s Source address of detection packets: IP address of the local IPSec tunnel interface; destination address of detection packets: IP address of the peer IPSec tunnel interface Packet loss ratio < 30% Delay < 500ms |
After the configuration is complete, the branch first uses Link 1 (1.1.1.1 -> 3.3.3.3) to establish an IPSec tunnel. The IPSec Negotiation Status value is Succeeded, and the branch can access the headquarters.

Shut down GE0/0/1 on FW_B at the branch, FW_B automatically uses Link 2 (2.2.2.2 -> 3.3.3.3) to establish an IPSec tunnel.

In V600R007C20SPC500 and later versions, Policy Type can be displayed in the IPSec Policy List.
Configuration script on FW_A (Headquarters):
# acl number 3000 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255 rule 10 permit icmp source 3.3.3.3 0 destination 1.1.1.1 0 rule 15 permit icmp source 3.3.3.3 0 destination 2.2.2.2 0 # ike proposal 1 authentication-algorithm sha2-256 integrity-algorithm aes-xcbc-96 hmac-sha2-256 # ike peer ike183144438250 exchange-mode auto pre-shared-key %$%$921NG0I(@0aT8y@GhOS97G>5%$%$ ike negotiate compatible ike-proposal 1 remote-id-type none # ipsec proposal prop18314443825 encapsulation-mode auto esp authentication-algorithm sha2-256 # ipsec policy-template tpl183144438250 1 security acl 3000 ike-peer ike183144438250 alias policy proposal prop18314443825 route inject dynamic preference 65 sa duration traffic-based 200000000 sa duration time-based 3600 # ipsec policy ipsec1831444383 10000 isakmp template tpl183144438250 # interface GigabitEthernet0/0/3 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 3.3.3.3 255.255.255.0 ipsec policy ipsec1831444383 service-manage ping permit # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.1.0 24 destination-address 10.1.2.0 24 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.2.0 24 destination-address 10.1.1.0 24 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local source-address 1.1.1.1 32 source-address 2.2.2.2 32 destination-address 3.3.3.3 32 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 3.3.3.3 32 destination-address 1.1.1.1 32 destination-address 2.2.2.2 32 action permit
Configuration script on FW_B (Branch):
# acl number 3000 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ike proposal 1 authentication-algorithm sha2-256 integrity-algorithm aes-xcbc-96 hmac-sha2-256 # ike peer ike183104627184 exchange-mode auto pre-shared-key %$%$QoAR'zsMp!&5y%7qm\)XOZQH%$%$ ike-proposal 1 remote-id-type none remote-address 3.3.3.3 # ipsec proposal prop18310462718 encapsulation-mode auto esp authentication-algorithm sha2-256 # ipsec smart-link profile prop18310462718 link-quality-detection interval 1 number 10 auto-switch cycles 3 link-quality-threshold loss 30 link-quality-threshold delay 500 smart-link enable link 1 interface GigabitEthernet0/0/0 local 1.1.1.1 nexthop 1.1.1.254 remote 3.3.3.3 link 2 interface GigabitEthernet0/0/3 local 2.2.2.2 nexthop 2.2.2.254 remote 3.3.3.3 # ipsec policy ipsec1831046272 10000 isakmp security acl 3000 ike-peer ike183104627184 alias policy proposal prop18310462718 sa duration traffic-based 200000000 sa duration time-based 3600 smart-link profile prop18310462718 # interface GigabitEthernet0/0/3 ip address 10.1.2.1 255.255.255.0 # interface GigabitEthernet0/0/2 ip address 2.2.2.2 255.255.255.0 gateway 2.2.2.254 # interface GigabitEthernet0/0/1 ip address 1.1.1.1 255.255.255.0 gateway 1.1.1.254 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 add interface GigabitEthernet0/0/2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.2.0 24 destination-address 10.1.1.0 24 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.1.0 24 destination-address 10.1.2.0 24 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local source-address 3.3.3.3 32 destination-address 1.1.1.1 32 destination-address 2.2.2.2 32 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.1.1 32 source-address 2.2.2.2 32 destination-address 3.3.3.3 32 action permit