R1配置:(pap认证)
sysname R1
ip route-static 0.0.0.0 0.0.0.0 15.0.0.2
int g 0/0/0
ip address 192.168.1.1 24
int s 4/0/0 :
link-protocol ppp
ppp pap local-user huawei password cipher 123456
ip address 15.0.0.1 255.255.255.0
int t 0/0/0:
interface Tunnel0/0/0
ip address 192.168.5.1 255.255.255.0
tunnel-protocol gre p2mp
source 15.0.0.1
nhrp entry multicast dynamic
nhrp network-id 100
undo rip split-horizon
interface Tunnel0/0/1:
ip address 192.168.6.1 255.255.255.0
undo rip split-horizon
tunnel-protocol gre
source 15.0.0.1
destination 45.0.0.1
rip
version 2
network 192.168.1.0
network 15.0.0.0
network 192.168.5.0
R2配置:(chap认证)
sysname R2
ip route-static 0.0.0.0 0.0.0.0 25.0.0.2
int g 0/0/0
ip address 192.168.2.1 24
int s 4/0/0
link-protocol ppp
ppp chap user huawei
ppp chap password cipher 123456
ip address 25.0.0.1 255.0.0.0
interface Tunnel0/0/0
ip address 192.168.5.2 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
rip
version 2
network 25.0.0.0
network 192.168.2.0
network 192.168.5.0
R3配置:(HDLC封装)
sysname R3
ip route-static 0.0.0.0 0.0.0.0 35.0.0.2
int g 0/0/0
ip address 192.168.3.1 24
iint s 4/0/0
link-protocol hdlc
ip address 35.0.0.1 255.0.0.0
interface Tunnel0/0/0
ip address 192.168.5.3 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
R4配置
sysname R4
ip route-static 0.0.0.0 0.0.0.0 45.0.0.2
interface GigabitEthernet0/0/0
ip address 192.168.4.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 45.0.0.1 255.0.0.0
interface Tunnel0/0/0
ip address 192.168.6.2 255.255.255.0
tunnel-protocol gre
source 45.0.0.1
destination 15.0.0.1
rip
version 2
network 192.168.4.0
network 45.0.0.0
R5配置
sysname ISP
interface Serial3/0/0
link-protocol ppp
ppp authentication-mode pap
ip address 15.0.0.2 255.0.0.0
interface Serial3/0/1
link-protocol ppp
ppp authentication-mode chap
ip address 25.0.0.2 255.0.0.0
interface Serial4/0/0
link-protocol hdlc
ip address 35.0.0.2 255.0.0.0
interface GigabitEthernet0/0/0
ip address 45.0.0.2 255.0.0.0
aaa
local-user huawei password cipher123456
local-user huawei service-type ppp
int lookback 0
ip address 5.5.5.5
检验路由表
R1
R2
R3
R4
检验