beautypg.com

Configuring secpath b – H3C Technologies H3C SecPath F1000-E User Manual

Page 212

background image

200

# Configure the keys.

[SecPathA-ipsec-policy-manual-map1-10] sa string-key outbound esp abcdefg

[SecPathA-ipsec-policy-manual-map1-10] sa string-key inbound esp gfedcba

[SecPathA-ipsec-policy-manual-map1-10] quit

# Configure the IP address of the GigabitEthernet interface.

[SecPathA] interface GigabitEthernet 0/2

[SecPathA-GigabitEthernet0/2] ip address 2.2.2.1 255.255.255.0

# Apply the IPsec policy group to the interface.

[SecPathA-GigabitEthernet0/2] ipsec policy map1

Configuring SecPath B

# Define an ACL to identify data flows from subnet 10.1.2.0/24 to subnet 10.1.1.0/24.

system-view

[SecPathB] acl number 3101

[SecPathB-acl-adv-3101] rule permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0

0.0.0.255

[SecPathB-acl-adv-3101] quit

# Configure a static route to Host A.

[SecPathB] ip route-static 10.1.1.0 255.255.255.0 GigabitEthernet 0/2

# Create an IPsec proposal named tran1.

[SecPathB] ipsec proposal tran1

# Specify the encapsulation mode as tunnel.

[SecPathB-ipsec-proposal-tran1] encapsulation-mode tunnel

# Specify the security protocol as ESP.

[SecPathB-ipsec-proposal-tran1] transform esp

# Specify the algorithms for the proposal.

[SecPathB-ipsec-proposal-tran1] esp encryption-algorithm des

[SecPathB-ipsec-proposal-tran1] esp authentication-algorithm sha1

[SecPathB-ipsec-proposal-tran1] quit

# Create a manual IPsec policy.

[SecPathB] ipsec policy use1 10 manual

# Apply the ACL.

[SecPathB-ipsec-policy-manual-use1-10] security acl 3101

# Apply the IPsec proposal.

[SecPathB-ipsec-policy-manual-use1-10] proposal tran1

# Configure the remote IP address of the tunnel.

[SecPathB-ipsec-policy-manual-use1-10] tunnel remote 2.2.2.1

# Configure the local IP address of the tunnel.

[SecPathB-ipsec-policy-manual-use1-10] tunnel local 2.2.3.1

# Configure the SPIs.

[SecPathB-ipsec-policy-manual-use1-10] sa spi outbound esp 54321

[SecPathB-ipsec-policy-manual-use1-10] sa spi inbound esp 12345

# Configure the keys.

[SecPathB-ipsec-policy-manual-use1-10] sa string-key outbound esp gfedcba