1、网络拓扑图
2、需要注意的关键技术
nat转换中需要排除ipsec网络
R1端:
acl number 3000
rule 5 deny ip source 192.168.1.0 0.0.0.255 destination 172.16.1.0 0.0.0.255
rule 10 permit IP source 192.168.1.0 0.0.0.255 destination any
int g0/0/0
nat outbound 3000
R3端:
acl number 3000
rule 5 deny ip source 172.16.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
rule 10 permit ip source 172.16.1.0 0.0.0.255 destination any
int g0/0/0
nat outbound 3000
3、详细配置
R1:
[Hub]display current-configuration
[V200R003C00]
#
sysname Hub
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
acl number 3000
rule 5 deny ip source 192.168.1.0 0.0.0.255 destination 172.16.1.0 0.0.0.255
rule 10 permit ip source 192.168.1.0 0.0.0.255
acl number 3001
rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 172.16.1.0 0.0.0.255
#
ipsec proposal huawei
esp authentication-algorithm sha1
#
ipsec policy easthome 1 manual
security acl 3001
proposal huawei
tunnel local 20.1.1.1
tunnel remote 30.1.1.2
sa spi inbound esp 54321
sa string-key inbound esp cipher %$%$TW"<=SLc>7'I)t:iHtJ.,.2n%$%$
sa spi outbound esp 12345
sa string-key outbound esp cipher %$%$TW"<=SLc>7'I)t:iHtJ.,.2n%$%$
#
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 20.1.1.1 255.255.255.0
ipsec policy easthome
nat outbound 3000
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
#
user-interface con 0
authentication-mode password
idle-timeout 0 0
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Hub]
R2:
<internet>display current-configuration
[V200R003C00]
#
sysname internet
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
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 30.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 20.1.1.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
<internet>
R3:
[Spoke]display current-configuration
[V200R003C00]
#
sysname Spoke
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
acl number 3000
rule 5 deny ip source 172.16.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
rule 10 permit ip source 172.16.1.0 0.0.0.255
acl number 3001
rule 5 permit ip source 172.16.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
#
ipsec proposal huawei
esp authentication-algorithm sha1
#
ipsec policy easthome 1 manual
security acl 3001
proposal huawei
tunnel local 30.1.1.2
tunnel remote 20.1.1.1
sa spi inbound esp 12345
sa string-key inbound esp cipher %$%$TW"<=SLc>7'I)t:iHtJ.,.2n%$%$
sa spi outbound esp 54321
sa string-key outbound esp cipher %$%$TW"<=SLc>7'I)t:iHtJ.,.2n%$%$
#
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 172.16.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 30.1.1.2 255.255.255.0
ipsec policy easthome
nat outbound 3000
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 30.1.1.1
#
user-interface con 0
authentication-mode password
idle-timeout 0 0
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Spoke]