As shown in Figure 1, FW_A connects to the Internet through active and standby links, and active and standby interfaces use fixed public IP addresses. FW_B connects to the Internet through one link, and its outbound interface uses a fixed public IP address.
Item |
Data |
|---|---|
FW_A |
Interface number: GigabitEthernet 0/0/0 IP address: 10.1.1.1/24 Security zone: Trust |
Interface number: GigabitEthernet 0/0/1 IP address: 1.1.3.1/24 Security zone: Untrust |
|
Interface number: GigabitEthernet 0/0/2 IP address: 1.1.4.1/24 Security zone: Untrust |
|
IPSec configuration Peer IP address: 2.2.2.2 Authentication type: pre-shared key Pre-shared key: Test!1234 Local ID type: IP address Peer ID type: IP address |
|
FW_B |
Interface number: GigabitEthernet 0/0/1 IP address: 2.2.2.2/24 Security zone: Untrust |
Interface number: GigabitEthernet 0/0/0 IP address: 10.2.1.1/24 Security zone: Trust |
|
Tunnel1 and Tunnel2 interfaces IP address: 2.2.2.2/24 An IPSec tunnel is established between FW_B and FW_A on the Internet using tunnel interfaces. In this example, interfaces Tunnel1 and Tunnel2 use the IP address of interface GigabitEthernet 0/0/1 as their public IP addresses. Security zone: Untrust |
|
IPSec configuration Peer IP address: 1.1.3.1 Authentication type: pre-shared key Pre-shared key: Test!1234 Local ID type: IP address Peer ID type: IP address |
To establish two IPSec tunnels between FW_A (with active and standby interfaces) and FW_B (with only one physical interface), configure two tunnel interfaces on FW_B. When an active/standby link switchover occurs on FW_A, the tunnel interfaces on FW_B are switched accordingly for re-negotiating an IPSec tunnel.
Configure two routes with different priorities from FW_A to FW_B for redundancy. Then bind IP-link to the active route for detecting the status of the active link. When the active link is faulty, the system automatically switches traffic to the standby link.
Apply the same IPSec policy to active interface GigabitEthernet 0/0/1 and standby interface GigabitEthernet 0/0/2 on FW_A. When active interface GigabitEthernet 0/0/1 becomes faulty, standby interface GigabitEthernet 0/0/2 takes over service traffic.
Configure active interface Tunnel1 and standby interface Tunnel2 on FW_B, corresponding to active and standby interfaces on FW_A. When an active/standby link switchover occurs on FW_A, the tunnel interfaces on FW_B are switched accordingly.
Divert data flows to be protected on FW_B to tunnel interfaces along routes. Because FW_B has two tunnel interfaces, namely, Tunnel1 and Tunnel2, configure two routes with different priorities to the headquarters for redundancy. Then bind IP-link to the active route for detecting the status of the active link. When the active link is faulty, the system automatically switches traffic to the standby link.
An IPSec tunnel needs to be established between FW_B and FW_A using active and standby interfaces. Therefore, configure two IPSec policies.
Apply IPSec policies to interfaces Tunnel1 and Tunnel2. When the active interface Tunnel1 becomes faulty, the standby interface Tunnel2 takes over service traffic.
<FW_A> display ike sa
IKE SA information :
Conn-ID Peer VPN Flag(s) Phase RemoteType RemoteID
-----------------------------------------------------------------------------
40002 2.2.2.2:500 RD|ST|A v2:2 IP 2.2.2.2
40001 2.2.2.2:500 RD|ST|A v2:1 IP 2.2.2.2
Number of IKE SA : 2
-------------------------------------------------------------------------------
Flag Description:
RD--READY ST--STAYALIVE RL--REPLACED FD--FADING TO--TIMEOUT
HRT--HEARTBEAT LKG--LAST KNOWN GOOD SEQ NO. BCK--BACKED UP
M--ACTIVE S--STANDBY A--ALONE NEG--NEGOTIATING
<FW_A> display ipsec sa =============================== Interface: GigabitEthernet0/0/1 =============================== ----------------------------- IPSec policy name: "map1" Sequence number : 10 Acl group : 3000 Acl rule : 5 Mode : ISAKMP ----------------------------- Connection ID : 40002 Encapsulation mode: Tunnel Tunnel local : 1.1.3.1 Tunnel remote : 2.2.2.2 Flow source : 10.1.1.0/255.255.255.0 0/0 Flow destination : 10.2.1.0/255.255.255.0 0/0 [Outbound ESP SAs] SPI: 120037772 (0x727a18c) Proposal: ESP-ENCRYPT-AES-256 SHA2-256-128 SA remaining key duration (bytes/sec): 1887436464/3549 Max sent sequence-number: 5 UDP encapsulation used for NAT traversal: N SA decrypted packets (number/kilobytes): 4/0 [Inbound ESP SAs] SPI: 38742361 (0x24f2959) Proposal: ESP-ENCRYPT-AES-256 SHA2-256-128 SA remaining key duration (bytes/sec): 1887436464/3549 Max received sequence-number: 4 UDP encapsulation used for NAT traversal: N SA decrypted packets (number/kilobytes): 4/0 Anti-replay : Enable Anti-replay window size: 1024
<FW_A> display ipsec statistics
IPSec statistics information:
the security packet statistics:
input/output security packets: 4/4
input/output security bytes: 400/400
input/output dropped security packets: 0/0
the encrypt packet statistics:
send chip: 4, recv chip: 4, send err: 0
local cpu: 4, other cpu: 0, recv other cpu: 0
intact packet: 4, first slice: 0, after slice: 0
the decrypt packet statistics:
send chip: 4, recv chip: 4, send err: 0
local cpu: 4, other cpu: 0, recv other cpu: 0
reass first slice: 0, after slice: 0
dropped security packet detail:
can not find SA: 0, wrong SA: 0
authentication: 0, replay: 0
front recheck: 0, after recheck: 0
change cpu enc: 0, dec change cpu: 0
fib search: 0, output l3: 0
flow err: 0, slice err: 0, byte limit: 0
negotiate about packet statistics:
IKE fwd packet ok: 23300, err: 0
IKE ctrl packet inbound ok: 22100, outbound ok: 1105
SoftExpr: 0, HardExpr: 0, DPDOper: 0
trigger ok: 0, switch sa: 2, sync sa: 0
recv IKE nat keepalive: 0, IKE input: 0
FW_A (headquarters) configuration file
# sysname FW_A # acl number 3000 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.2.1.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ike proposal 10 encryption-algorithm aes-256 dh group14 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer b ike-proposal 10 remote-address 2.2.2.2 pre-shared-key %$%$SP!UWlu=$B7`~B!@iRn+jvmd%$%$ # ipsec policy map1 10 isakmp security acl 3000 ike-peer b proposal tran1 # ipsec policy map2 10 isakmp security acl 3000 ike-peer b proposal tran1 # interface GigabitEthernet0/0/0 undo shutdown ip address 10.1.1.1 24 interface GigabitEthernet0/0/1 undo shutdown ip address 1.1.3.1 24 ipsec policy map1 interface GigabitEthernet0/0/2 undo shutdown ip address 1.1.4.1 24 ipsec policy map2 # firewall zone trust add interface GigabitEthernet0/0/0 # firewall zone untrust add interface GigabitEthernet0/0/1 add interface GigabitEthernet0/0/2 # ip-link check enable ip-link name n1 destination 2.2.2.2 interface GigabitEthernet0/0/1 next-hop 1.1.3.2 # ip route-static 10.2.1.0 24 1.1.3.2 preference 10 track ip-link n1 ip route-static 10.2.1.0 24 1.1.4.2 preference 20 ip route-static 0.0.0.0 0.0.0.0 1.1.3.2 preference 10 track ip-link n1 ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 preference 20 # security-policy rule name 1 source-zone trust destination-zone untrust source-address 10.1.1.0 255.255.255.0 destination-address 10.2.1.0 255.255.255.0 action permit rule name 2 source-zone untrust destination-zone trust source-address 10.2.1.0 255.255.255.0 destination-address 10.1.1.0 255.255.255.0 action permit rule name 3 source-zone local destination-zone untrust source-address 1.1.0.0 255.255.0.0 destination-address 2.2.2.0 255.255.255.0 action permit rule name 4 source-zone untrust destination-zone local source-address 2.2.2.0 255.255.255.0 destination-address 1.1.0.0 255.255.0.0 action permit # return
FW_B (branch) configuration file
# sysname FW_B # acl number 3000 rule 5 permit ip source 10.2.1.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ike proposal 10 encryption-algorithm aes-256 dh group14 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer a1 ike-proposal 10 remote-address 1.1.3.1 pre-shared-key %$%$SP!UWlu=$B7`~B!@iRn+jvmd%$%$ # ike peer a2 ike-proposal 10 remote-address 1.1.4.1 pre-shared-key %$%$SP!UWlu=$B7`~B!@iRn+jvmd%$%$ # ipsec policy map1 10 isakmp security acl 3000 proposal tran1 ike-peer a1 # ipsec policy map2 10 isakmp security acl 3000 proposal tran1 ike-peer a2 # interface tunnel 1 ip address unnumbered interface GigabitEthernet0/0/1 tunnel-protocol ipsec ipsec policy map1 interface tunnel 2 ip address unnumbered interface GigabitEthernet0/0/1 tunnel-protocol ipsec ipsec policy map2 # interface GigabitEthernet0/0/0 undo shutdown ip address 10.2.1.1 24 interface GigabitEthernet0/0/1 undo shutdown ip address 2.2.2.2 24 # firewall zone trust add interface GigabitEthernet0/0/0 # firewall zone untrust add interface GigabitEthernet0/0/1 add interface tunnel1 add interface tunnel2 # ip-link check enable ip-link name n1 destination 1.1.3.1 interface GigabitEthernet 0/0/1 next-hop 2.2.2.1 # ip route-static 10.1.1.0 255.255.255.0 Tunnel 1 preference 10 track ip-link n1 ip route-static 10.1.1.0 255.255.255.0 Tunnel 2 preference 20 ip route-static 0.0.0.0 0.0.0.0 2.2.2.1 # security-policy rule name 1 source-zone trust destination-zone untrust source-address 10.2.1.0 255.255.255.0 destination-address 10.1.1.0 255.255.255.0 action permit rule name 2 source-zone untrust destination-zone trust source-address 10.1.1.0 255.255.255.0 destination-address 10.2.1.0 255.255.255.0 action permit rule name 3 source-zone local destination-zone untrust source-address 2.2.2.0 255.255.255.0 destination-address 1.1.0.0 255.255.0.0 action permit rule name 4 source-zone untrust destination-zone local source-address 1.1.0.0 255.255.0.0 destination-address 2.2.2.0 255.255.255.0 action permit # return