beautypg.com

Ike configuration examples, Network requirements, Configuration procedure – H3C Technologies H3C S6300 Series Switches User Manual

Page 274

background image

259

IKE configuration examples

Main mode IKE with pre-shared key authentication
configuration example

Network requirements

As shown in

Figure 82

, configure an IPsec tunnel that uses IKE negotiation between Switch A and Switch

B to secure the communication.
Configure Switch A and Switch B to use the default IKE proposal for the IKE negotiation to set up the IPsec
SA. Configure the two switches to use the pre-shared key authentication method.

Figure 82 Network diagram

Configuration procedure

Make sure Switch A and Switch B can reach each other.

1.

Configure Switch A:
# Assign an IP address to VLAN-interface 1.

system-view

[SwitchA] interface vlan-interface 1

[SwitchA-vlan-interface1] ip address 1.1.1.1 255.255.255.0

[SwitchA-vlan-interface1] quit

# Configure ACL 3101 to identify traffic from Switch A to Switch B.

[SwitchA] acl number 3101

[SwitchA-acl-adv-3101] rule 0 permit ip source 1.1.1.1 0 destination 2.2.2.2 0

[SwitchA-acl-adv-3101] quit

# Create IPsec transform set tran1.

[SwitchA] ipsec transform-set tran1

# Set the packet encapsulation mode to tunnel.

[SwitchA-ipsec-transform-set-tran1] encapsulation-mode tunnel

# Use the ESP protocol for the IPsec transform set.

[SwitchA-ipsec-transform-set-tran1] protocol esp

# Specify the encryption and authentication algorithms.

[SwitchA-ipsec-transform-set-tran1] esp encryption-algorithm aes-cbc-192

[SwitchA-ipsec-transform-set-tran1] esp authentication-algorithm sha1

[SwitchA-ipsec-transform-set-tran1] quit

# Create IKE keychain keychain1.

[SwitchA] ike keychain keychain1

# Specify 12345zxcvb!@#$%ZXCVB as the plaintext pre-shared key.

[SwitchA-ike-keychain-keychain1] pre-shared-key address 2.2.2.2 255.255.255.0 key

simple 12345zxcvb!@#$%ZXCVB