In Figure 1, two IPv4 networks are connected to the IPv6 public network through FW_A and FW_B respectively. Traffic transmitted between the two IPv4 networks needs to be protected.
The two IPv4 networks communicate with each other over the IPv6 public network. An IPSec IPv4 over IPv6 tunnel can be established between FW_A and FW_B to enable users of the two IPv4 networks to communicate over the IPSec tunnel.
The configuration roadmap is as follows:
Ping PC2 from PC1 to trigger IKE negotiation.
IKE negotiation succeeds. After an IPSec tunnel is established, PC1 can ping PC2 successfully, and data transmitted between PC1 and PC2 is encrypted.
Run the display ike sa command on the FW, finding that an IKE SA and an IPSec SA have been established successfully. The following uses the display of FW_B as an example.
<FW_B> display ike sa
IKE SA information :
Conn-ID Peer VPN Flag(s) Phase RemoteType RemoteID
-----------------------------------------------------------------------------
16777239 1::1:1:500 RD|ST|A v2:2 IP 1::1:1
16777232 1::1:1:500 RD|ST|A v2:1 IP 1::1:1
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 configuration file
# sysname FW_A # ipv6 # 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 # 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 pre-shared-key %^%#~VJ8=%0CN8A<c.;h~`m0yrf5NFYhDG=.]4T_D(_&%^%# ike-proposal 10 remote-address 2::1:1 # ipsec policy map1 10 isakmp security acl 3000 ike-peer b proposal tran1 # interface GigabitEthernet0/0/3 undo shutdown ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 undo shutdown ipv6 enable ip address 1.1.3.1 255.255.255.0 ipv6 address 1::1:1/120 ipsec policy map1 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # ip route-static 10.1.2.0 255.255.255.0 GigabitEthernet0/0/1 # ipv6 route-static 2::1:0 120 1::1:2 # security-policy rule name policy1 source-zone trust destination-zone untrust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.2.0 mask 255.255.255.0 action permit rule name policy2 source-zone untrust destination-zone trust source-address 10.1.2.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name policy3 source-zone local destination-zone untrust source-address 1.1.3.0 mask 255.255.255.0 source-address 1::1:1 120 destination-address 1.1.5.0 mask 255.255.255.0 destination-address 2::1:1 120 action permit rule name policy4 source-zone untrust destination-zone local source-address 1.1.5.0 mask 255.255.255.0 source-address 2::1:1 120 destination-address 1.1.3.0 mask 255.255.255.0 destination-address 1::1:1 120 action permit # return
FW_B configuration file
# sysname FW_B # ipv6 # 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 # 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 a pre-shared-key %^%#~VJ8=%0CN8A<c.;h~`m0yrf5NFYhDG=.]4T_D(_&%^%# ike-proposal 10 remote-address 1::1:1 # ipsec policy map1 10 isakmp security acl 3000 ike-peer a proposal tran1 # interface GigabitEthernet0/0/3 undo shutdown ip address 10.1.2.1 255.255.255.0 # interface GigabitEthernet0/0/1 undo shutdown ipv6 enable ip address 1.1.5.1 255.255.255.0 ipv6 address 2::1:1/120 ipsec policy map1 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # ip route-static 10.1.1.0 255.255.255.0 GigabitEthernet0/0/1 # ipv6 route-static 1::1:0 120 2::1:2 # security-policy rule name policy1 source-zone trust destination-zone untrust source-address 10.1.2.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name policy2 source-zone untrust destination-zone trust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.2.0 mask 255.255.255.0 action permit rule name policy3 source-zone local destination-zone untrust source-address 1.1.5.0 mask 255.255.255.0 source-address 2::1:1 120 destination-address 1.1.3.0 mask 255.255.255.0 destination-address 1::1:1 120 action permit rule name policy4 source-zone untrust destination-zone local source-address 1.1.3.0 mask 255.255.255.0 source-address 1::1:1 120 destination-address 1.1.5.0 mask 255.255.255.0 destination-address 2::1:1 120 action permit # return