301
# Configure a static route to the branch LAN.
[RouterA] ip route-static 192.168.0.0 255.255.255.0 serial 2/1/1
2.
Configure Router B.
# Specify a name for the local security gateway.
<RouterB> system-view
[RouterB] ike local-name routerb
# Configure an ACL.
[RouterB] acl number 3101
[RouterB-acl-adv-3101] rule 0 permit ip source 192.168.0.0 0.0.0.255 destination
172.16.0.0 0.0.0.255
[RouterB-acl-adv-3101] quit
# Configure an IKE proposal.
[RouterB] ike proposal 1
[RouterB-ike-proposal-1] authentication-algorithm sha
[RouterB-ike-proposal-1] authentication-method pre-share
[RouterB-ike-proposal-1] encryption-algorithm 3des-cbc
[RouterB-ike-proposal-1] dh group2
# Configure an IKE peer.
[RouterB] ike peer peer
[RouterB-ike-peer-peer] exchange-mode aggressive
[RouterB-ike-peer-peer] pre-shared-key abc
[RouterB-ike-peer-peer] id-type name
[RouterB-ike-peer-peer] remote-name routera
[RouterB-ike-peer-peer] remote-address 100.1.1.1
[RouterB-ike-peer-peer] nat traversal
[RouterB-ike-peer-peer] quit
# Create an IPsec proposal named
prop
.
[RouterB] ipsec proposal prop
[RouterB-ipsec-proposal-prop] encapsulation-mode tunnel
[RouterB-ipsec-proposal-prop] transform esp
[RouterB-ipsec-proposal-prop] esp encryption-algorithm 3des
[RouterB-ipsec-proposal-prop] esp authentication-algorithm sha1
[RouterB-ipsec-proposal-prop] quit
# Create an IPsec policy that uses IKE.
[RouterB] ipsec policy policy 10 isakmp
# Configure the IPsec policy to reference the IKE peer.
[RouterB-ipsec-policy-isakmp-policy-10] ike-peer peer
# Configure the IPsec policy to reference ACL 3101.
[RouterB-ipsec-policy-isakmp-policy-10] security acl 3101
# Configure the IPsec policy to reference IPsec proposal
prop
.
[RouterB-ipsec-policy-isakmp-policy-10] proposal prop
[RouterB-ipsec-policy-isakmp-policy-10] quit
# Create a dialer rule.
[RouterB] dialer-rule 1 ip permit