H3C Technologies H3C SecPath F1000-E User Manual
Page 155

27
# Create an IPsec proposal named tran1.
[DeviceA] ipsec proposal tran1
# Specify the encapsulation mode as tunnel.
[DeviceA-ipsec-proposal-tran1] encapsulation-mode tunnel
# Specify the security protocol as ESP.
[DeviceA-ipsec-proposal-tran1] transform esp
# Specify the algorithms for the proposal.
[DeviceA-ipsec-proposal-tran1] esp encryption-algorithm des
[DeviceA-ipsec-proposal-tran1] esp authentication-algorithm sha1
[DeviceA-ipsec-proposal-tran1] quit
# Configure the IKE peer.
[DeviceA] ike peer peer
[DeviceA-ike-peer-peer] pre-share-key abcde
[DeviceA-ike-peer-peer] remote-address 2.2.3.1
[DeviceA-ike-peer-peer] quit
# Create an IPsec policy, specifying to use the IKE negotiation mode.
[DeviceA] ipsec policy map1 10 isakmp
# Apply the IPsec proposal.
[DeviceA-ipsec-policy-isakmp-map1-10] proposal tran1
# Apply the ACL.
[DeviceA-ipsec-policy-isakmp-map1-10] security acl 3101
# Apply the IKE peer.
[DeviceA-ipsec-policy-isakmp-map1-10] ike-peer peer
[DeviceA-ipsec-policy-isakmp-map1-10] quit
# Configure the IP address of the interface.
[DeviceA] interface gigabitethernet 0/2
[DeviceA-GigabitEthernet0/2] ip address 2.2.2.1 255.255.255.0
# Apply the IPsec policy group to the interface.
[DeviceA-GigabitEthernet0/2] ipsec policy map1
2.
Configure Device B
# Define an ACL to identify data flows from subnet 10.1.2.0/24 to subnet 10.1.1.0/24.
[DeviceB] acl number 3101
[DeviceB-acl-adv-3101] rule permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0
0.0.0.255
[DeviceB-acl-adv-3101] quit
# Configure a static route to Host A.
[DeviceB] ip route-static 10.1.1.0 255.255.255.0 2.2.3.2
# Create an IPsec proposal named tran1.
[DeviceB] ipsec proposal tran1
# Specify the encapsulation mode as tunnel.
[DeviceB-ipsec-proposal-tran1] encapsulation-mode tunnel
# Specify the security protocol as ESP.