配置如下
[AR1]disp cur
[V200R003C00]
#
sysname AR1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone Indian Standard Time minus 05:13:20
clock daylight-saving-time Day Light Saving Time repeating 12:32 9-1 12:32 11-23 00:00 2005 2005
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 3000
rule 5 permit ip source 1.1.1.1 0 destination 2.2.2.1 0
#
ipsec proposal 1
encapsulation-mode transport
#
ike peer ar3 v1
pre-shared-key simple huawei
remote-address 2.2.2.1
#
ipsec policy test 1 isakmp
security acl 3000
ike-peer ar3
proposal 1
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 1.1.1.1 255.255.255.0
ipsec policy test
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
ip address 3.3.3.1 255.255.255.252
tunnel-protocol gre
source 1.1.1.1
destination 2.2.2.1
gre key 888888
#
ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
ip route-static 192.168.2.0 255.255.255.0 Tunnel0/0/0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[AR1]
<AR2>disp cur
[V200R003C00]
#
sysname AR2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone Indian Standard Time minus 05:13:20
clock daylight-saving-time Day Light Saving Time repeating 12:32 9-1 12:32 11-23 00:00 2005 2005
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 1.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 2.2.2.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<AR2>
<AR3>disp cur
[V200R003C00]
#
sysname AR3
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone Indian Standard Time minus 05:13:20
clock daylight-saving-time Day Light Saving Time repeating 12:32 9-1 12:32 11-23 00:00 2005 2005
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 3000
rule 5 permit ip source 2.2.2.1 0 destination 1.1.1.1 0
#
ipsec proposal 1
encapsulation-mode transport
#
ike peer ar1 v1
pre-shared-key simple huawei
remote-address 1.1.1.1
#
ipsec policy test 1 isakmp
security acl 3000
ike-peer ar1
proposal 1
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 2.2.2.1 255.255.255.0
ipsec policy test
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
ip address 3.3.3.2 255.255.255.252
tunnel-protocol gre
source 2.2.2.1
destination 1.1.1.1
gre key 888888
#
ip route-static 0.0.0.0 0.0.0.0 2.2.2.2
ip route-static 192.168.1.0 255.255.255.0 Tunnel0/0/0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<AR3>
<AR3>disp ike sa
Conn-ID Peer ××× Flag(s) Phase
---------------------------------------------------------------
2 1.1.1.1 0 RD|ST 2
1 1.1.1.1 0 RD|ST 1
Flag Description:
RD--READY ST--STAYALIVE RL--REPLACED FD--FADING TO--TIMEOUT
HRT--HEARTBEAT LKG--LAST KNOWN GOOD SEQ NO. BCK--BACKED UP
<AR3>disp ipse
<AR3>disp ipsec sa
===============================
Interface: GigabitEthernet0/0/0
Path MTU: 1500
===============================
-----------------------------
IPSec policy name: "test"
Sequence number : 1
Acl Group : 3000
Acl rule : 5
Mode : ISAKMP
-----------------------------
Connection ID : 2
Encapsulation mode: Transport
Tunnel local : 2.2.2.1
Tunnel remote : 1.1.1.1
Flow source : 2.2.2.1/255.255.255.255 0/0
Flow destination : 1.1.1.1/255.255.255.255 0/0
Qos pre-classify : Disable
[Outbound ESP SAs]
SPI: 2923779963 (0xae45577b)
Proposal: ESP-ENCRYPT-DES-64 ESP-AUTH-MD5
SA remaining key duration (bytes/sec): 1887324160/3166
Max sent sequence-number: 5
UDP encapsulation used for NAT traversal: N
[Inbound ESP SAs]
SPI: 3339336228 (0xc70a3a24)
Proposal: ESP-ENCRYPT-DES-64 ESP-AUTH-MD5
SA remaining key duration (bytes/sec): 1887436300/3166
Max received sequence-number: 5
Anti-replay window size: 32
UDP encapsulation used for NAT traversal: N
<AR3>
转载于:https://blog.51cto.com/baigp/1301523