R3303-HP HSR6800 Routers Security Configuration Guide

270
# Specify the encapsulation mode as tunnel.
[RouterB-ipsec-transform-set-tran1] encapsulation-mode tunnel
# Specify the security protocol as ESP.
[RouterB-ipsec-transform-set-tran1] transform esp
# Specify the algorithms for the IPsec transform set.
[RouterB-ipsec-transform-set-tran1] esp encryption-algorithm des
[RouterB-ipsec-transform-set-tran1] esp authentication-algorithm sha1
[RouterB-ipsec-transform-set-tran1] quit
# Create a manual IPsec policy.
[RouterB] ipsec policy use1 10 manual
# Apply the ACL.
[RouterB-ipsec-policy-manual-use1-10] security acl 3101
# Apply the IPsec transform set.
[RouterB-ipsec-policy-manual-use1-10] transform-set tran1
# Configure the remote IP address of the tunnel.
[RouterB-ipsec-policy-manual-use1-10] tunnel remote 2.2.2.1
# Configure the local IP address of the tunnel.
[RouterB-ipsec-policy-manual-use1-10] tunnel local 2.2.3.1
# Configure the SPIs.
[RouterB-ipsec-policy-manual-use1-10] sa spi outbound esp 54321
[RouterB-ipsec-policy-manual-use1-10] sa spi inbound esp 12345
# Configure the keys.
[RouterB-ipsec-policy-manual-use1-10] sa string-key outbound esp gfedcba
[RouterB-ipsec-policy-manual-use1-10] sa string-key inbound esp abcdefg
[RouterB-ipsec-policy-manual-use1-10] quit
# Configure the IP address of the serial interface.
[RouterB] interface serial 2/1/2
[RouterB-Serial2/1/2] ip address 2.2.3.1 255.255.255.0
# Apply the IPsec policy group to the interface.
[RouterB-Serial2/1/2] ipsec policy use1
3. Verify the configuration:
After the configuration, an IPsec tunnel between Router A and Router B should be established, and
the traffic between subnet 10.1.1.0/24 and subnet 10.1.2.0/24 should be IPsec protected.
Configuring an IKE-based IPsec tunnel for IPv4 packets
Network requirements
As shown in Figure 90, configure an IPsec tunnel between Router A and Router B to protect data flows
between subnet 10.1.1.0/24 and subnet 10.1.2.0/24. Configure the tunnel to use the security protocol
ESP, the encryption algorithm DES, and the authentication algorithm SHA1-HMAC-96.
Configuration procedure
1. Configure Router A:
# Define an ACL to identify data flows from subnet 10.1.1.0/24 to subnet 10.1.2.0/24.
<RouterA> system-view