1.R2为ISP,其上只能配置IP地址
2.R1-R2之间为HDLC封装
3.R2-R3之间为PPp封装, pap认证, R2为主认证方
4.R2-R4之间为PPP封装, chap认证, R2为主认证方
5.R1、R2、R3构建MGRE环境,仅R1IP地址固定
6.内网使用RIP获取路由,所有Pc可以互相访问,并且可访问R2的环回。
网段划分及各路由器的静态路由到达部分网段
私网IP地址配置:
R1的g0/0/0(.1)和PC1(.2)192.168.1.0 24
R3的g0/0/0(.1)和PC2(.2)192.168.2.0 24
R4的g0/0/0(.1)和PC4(.2)192.168.3.0 24
Tunnel0/0/0隧道:
R1的Tunnel0/0/0: 192.168.4.1 24
R3的Tunnel0/0/0: 192.168.4.3 24
R4的Tunnel0/0/0: 192.168.4.4 24
公网IP地址配置:
R1(.1)---R2(.2) 12.1.1.0 24
R3(.1)---R2(.2) 23.1.1.0 24
R4(.1)---R2(.2) 24.1.1.0 24
R2环回l0表示访问公网 2.2.2.2
R1配置命令及路由表和接口摘要:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]int s4/0/0
[R1-Serial4/0/0]ip add 12.1.1.1 24
[R1-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R1-Serial4/0/0]q
[R1]ip route-static 0.0.0.0 0 12.1.1.2
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]int s4/0/0
[R1-Serial4/0/0]nat outbound 2000
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R1-Serial4/0/0]int T 0/0/0
[R1-Tunnel0/0/0]ip add 192.168.4.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 12.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R1-Tunnel0/0/0]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.4.0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R1-rip-1]int t0/0/0
[R1-Tunnel0/0/0]undo rip split-horizon
[R1-Tunnel0/0/0]q
[R1]q
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R1>display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/0 up up 0% 0% 0 0
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Serial4/0/0 up up 0% 0% 0 0
Serial4/0/1 down down 0% 0% 0 0
Tunnel0/0/0 up up -- -- 0 0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 12.1.1.2 Serial4/0/0
12.1.1.0/24 Direct 0 0 D 12.1.1.1 Serial4/0/0
12.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
12.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.2.0/24 RIP 100 1 D 192.168.4.3 Tunnel0/0/0
192.168.3.0/24 RIP 100 1 D 192.168.4.4 Tunnel0/0/0
192.168.4.0/24 Direct 0 0 D 192.168.4.1 Tunnel0/0/0
192.168.4.1/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
192.168.4.255/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R1>display current-configuration
[V200R003C00]
#
sysname R1
#
board add 0/4 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
#
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 Serial4/0/0
link-protocol hdlc
ip address 12.1.1.1 255.255.255.0
nat outbound 2000
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
ip address 192.168.4.1 255.255.255.0
undo rip split-horizon
tunnel-protocol gre p2mp
source 12.1.1.1
nhrp entry multicast dynamic
nhrp network-id 100
#
rip 1
version 2
network 192.168.1.0
network 192.168.4.0
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R1>
R2配置命令及路由表和接口摘要:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int lo0
[R2-LoopBack0]ip add 2.2.2.2 24
[R2-LoopBack0]int s3/0/0
[R2-Serial3/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[R2-Serial3/0/0]ip add 12.1.1.2 24
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R2-Serial3/0/0]int s3/0/1
[R2-Serial3/0/1]ip add 23.1.1.2 24
[R2-Serial3/0/1]aaa
[R2-aaa]local-user a password cipher 123456
Info: Add a new user.
[R2-aaa]local-user a service-type ppp
[R2-aaa]int s3/0/1
[R2-Serial3/0/1]ppp authentication-mode pap
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R2-Serial3/0/1]int s4/0/0
[R2-Serial4/0/0]ip add 24.1.1.2 24
[R2-Serial4/0/0]aaa
[R2-aaa]local-user b password cipher 654321
Info: Add a new user.
[R2-aaa]local-user b service-type ppp
[R2-aaa]int s4/0/0
[R2-Serial4/0/0]ppp authentication-mode chap
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R2-Serial4/0/0]int s3/0/0
[R2-Serial3/0/0]shutdown
[R2-Serial3/0/0]undo shutdown
[R2-Serial3/0/0]display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/0 down down 0% 0% 0 0
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
LoopBack0 up up(s) 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Serial3/0/0 up up 0% 0% 0 0
Serial3/0/1 up up 0% 0% 0 0
Serial4/0/0 up up 0% 0% 0 0
Serial4/0/1 down down 0% 0% 0 0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R2-Serial3/0/0]q
[R2]q
<R2>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R2>display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/0 down down 0% 0% 0 0
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
LoopBack0 up up(s) 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Serial3/0/0 up up 0% 0% 0 0
Serial3/0/1 up up 0% 0% 0 0
Serial4/0/0 up up 0% 0% 0 0
Serial4/0/1 down down 0% 0% 0 0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R2>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 18 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.0/24 Direct 0 0 D 2.2.2.2 LoopBack0
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
12.1.1.0/24 Direct 0 0 D 12.1.1.2 Serial3/0/0
12.1.1.2/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
12.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
23.1.1.0/24 Direct 0 0 D 23.1.1.2 Serial3/0/1
23.1.1.1/32 Direct 0 0 D 23.1.1.1 Serial3/0/1
23.1.1.2/32 Direct 0 0 D 127.0.0.1 Serial3/0/1
23.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/1
24.1.1.0/24 Direct 0 0 D 24.1.1.2 Serial4/0/0
24.1.1.1/32 Direct 0 0 D 24.1.1.1 Serial4/0/0
24.1.1.2/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
24.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R2>display current-configuration
[V200R003C00]
#
sysname R2
#
board add 0/3 2SA
board add 0/4 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
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 a password cipher %$%$Y{.W4(>7g:WK!L#Y,[8PA-ZV%$%$
local-user a service-type ppp
local-user b password cipher %$%$]H}I7_Zuv!&'MgBx&#I&A.gb%$%$
local-user b service-type ppp
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface Serial3/0/0
link-protocol hdlc
ip address 12.1.1.2 255.255.255.0
#
interface Serial3/0/1
link-protocol ppp
ppp authentication-mode pap
ip address 23.1.1.2 255.255.255.0
#
interface Serial4/0/0
link-protocol ppp
ppp authentication-mode chap
ip address 24.1.1.2 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R2>
R3配置命令及路由表和接口摘要:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[R3-GigabitEthernet0/0/0]int s4/0/0
[R3-Serial4/0/0]ip add 23.1.1.1 24
[R3-Serial4/0/0]ppp pap local-user a password cipher 123456
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R3-Serial4/0/0]q
[R3]ip route-static 0.0.0.0 0 23.1.1.2
[R3]acl 2000
[R3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[R3-acl-basic-2000]int s4/0/0
[R3-Serial4/0/0]nat outbound 2000
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R3-Serial4/0/0]int T0/0/0
[R3-Tunnel0/0/0]ip add 192.168.4.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source Serial 4/0/0
[R3-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R3-Tunnel0/0/0]rip 1
[R3-rip-1]ver 2
[R3-rip-1]network 192.168.2.0
[R3-rip-1]network 192.168.4.0
[R3-rip-1]q
[R3]q
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R3>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R3>display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/0 up up 0% 0% 0 0
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Serial4/0/0 up up 0% 0% 0 0
Serial4/0/1 down down 0% 0% 0 0
Tunnel0/0/0 up up -- -- 0 0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R3>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 23.1.1.2 Serial4/0/0
23.1.1.0/24 Direct 0 0 D 23.1.1.1 Serial4/0/0
23.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
23.1.1.2/32 Direct 0 0 D 23.1.1.2 Serial4/0/0
23.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 RIP 100 1 D 192.168.4.1 Tunnel0/0/0
192.168.2.0/24 Direct 0 0 D 192.168.2.1 GigabitEthernet
0/0/0
192.168.2.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.2.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.3.0/24 RIP 100 2 D 192.168.4.1 Tunnel0/0/0
192.168.4.0/24 Direct 0 0 D 192.168.4.3 Tunnel0/0/0
192.168.4.3/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
192.168.4.255/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R3>display current-configuration
[V200R003C00]
#
sysname R3
#
board add 0/4 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.2.0 0.0.0.255
#
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 Serial4/0/0
link-protocol ppp
ppp pap local-user a password cipher %$%$2"}l0><!%Xo1OxO1q^8R,.do%$%$
ip address 23.1.1.1 255.255.255.0
nat outbound 2000
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
ip address 192.168.4.3 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
nhrp entry 192.168.4.1 12.1.1.1 register
#
rip 1
version 2
network 192.168.2.0
network 192.168.4.0
#
ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R3>
R4配置命令及路由表和接口摘要:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[R4-GigabitEthernet0/0/0]int s4/0/0
[R4-Serial4/0/0]ip add 24.1.1.1 24
[R4-Serial4/0/0]ppp chap password cipher 654321
[R4-Serial4/0/0]q
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R4]ip route-static 0.0.0.0 0 24.1.1.2
[R4]acl 2000
[R4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[R4-acl-basic-2000]int s4/0/0
[R4-Serial4/0/0]nat outbound 2000
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R4-Serial4/0/0]int T0/0/0
[R4-Tunnel0/0/0]ip add 192.168.4.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source Serial 4/0/0
[R4-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
[R4-Tunnel0/0/0]nhrp network-id 100
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
[R4-Tunnel0/0/0]rip 1
[R4-rip-1]ver 2
[R4-rip-1]network 192.168.3.0
[R4-rip-1]network 192.168.4.0
[R4-rip-1]q
[R4]q
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R4>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R4>display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/0 up up 0% 0% 0 0
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Serial4/0/0 up up 0% 0% 0 0
Serial4/0/1 down down 0% 0% 0 0
Tunnel0/0/0 up up -- -- 0 0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R4>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 24.1.1.2 Serial4/0/0
24.1.1.0/24 Direct 0 0 D 24.1.1.1 Serial4/0/0
24.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
24.1.1.2/32 Direct 0 0 D 24.1.1.2 Serial4/0/0
24.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial4/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 RIP 100 1 D 192.168.4.1 Tunnel0/0/0
192.168.2.0/24 RIP 100 2 D 192.168.4.1 Tunnel0/0/0
192.168.3.0/24 Direct 0 0 D 192.168.3.1 GigabitEthernet
0/0/0
192.168.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.4.0/24 Direct 0 0 D 192.168.4.4 Tunnel0/0/0
192.168.4.4/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
192.168.4.255/32 Direct 0 0 D 127.0.0.1 Tunnel0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
=======================================================================================================================
=======================================================================================================================
=======================================================================================================================
<R4>display current-configuration
[V200R003C00]
#
sysname R4
#
board add 0/4 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.3.0 0.0.0.255
#
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 Serial4/0/0
link-protocol ppp
ppp chap password cipher %$%$,Zl2!WUl-L'SY(UZ,dJ$,"AB%$%$
ip address 24.1.1.1 255.255.255.0
nat outbound 2000
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 192.168.3.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
ip address 192.168.4.4 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
nhrp network-id 100
nhrp entry 192.168.4.1 12.1.1.1 register
#
rip 1
version 2
network 192.168.3.0
network 192.168.4.0
#
ip route-static 0.0.0.0 0.0.0.0 24.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<R4>
联通测试: