首先给所有私有网段设计ip。
先到r5
sys
int serial 0/0/0
link
ip add 15.1.1.2 24
q
aaa
local-user me password cipher 123456 (定义用户)
local-user me service-type ppp(用途)
q
int serial 0/0/0
ppp authentication-mode pap(发起pap认证请求)
来到r1上
sys
int serial 0/0/0
ip add 15.1.1.1 24
ppp pap local-user me password cipher 123456(进行身份认证)
来到r5上
int serial 0/0/1
ppp authentication-mode chap
ip add 25.1.1.2 24
来到r2上
int serial 0/0/1
ip add 25.1.1.1 24
在r5上
shutdown
undo shutdown
r2上
ppp pap local-user me password cipher 123456
来到r5上
int serial 0/0/0
link-protocol hdlc
ip add 35.1.1.2 24
来到r3上
ip add 35.1.1.1 24
link-protocol hdlc
来到r5上
int g0/0/0
ip add 45.1.1.2 24
来到r4上
int g0/0/0
ip add 45.1.1.1 24
来到r5上
int lo0
ip add 5.5.5.5
分别在4个路由器上配上
int g0/0/2
ip add 192.168.1.1 24
int g0/0/2
ip add 192.168.2.1 24
int g0/0/2
ip add 192.168.3.1 24
int g0/0/2
ip add 192.168.4.1 24
分别在4个路由器上配置静态路由
ip route-static 0.0.0.0 0 15.1.1.2
ip route-static 0.0.0.0 0 25.1.1.2
ip route-static 0.0.0.0 0 35.1.1.2
ip route-static 0.0.0.0 0 45.1.1.2
来到r1上
int tunnel 0/0/0
ip add 10.1.1.1 24
tunnel-protocol gre
source 15.1.1.1
destination 45.1.1.1
来到r4上
int tunnel 0/0/0
ip add 10.1.1.2 24
tunnel-protocol gre
source 45.1.1.1
destination 15.1.1.1
来到r1上
int tunnel 0/0/1
ip add 10.1.2.1 24
tunnel-protocol gre p2mp
source 15.1.1.1
nhrp entry multicast dynamic
nhrp network-id 100
来到r2上
int tunnel 0/0/0
ip add 10.1.2.2 24
tunnel-protocol gre p2mp
source serial 4/0/0
nhrp entry 10.1.2.1 15.1.1.1 register
nhrp network-id 100
来到r3上
int tunnel 0/0/0
ip add 10.1.2.3 24
tunnel-protocol gre p2mp
source serial 4/0/0
nhrp entry 10.1.2.1 15.1.1.1 register
nhrp network-id 100
在r1上
rip 1
ver 2
un summary
network 192.168.1.0
network 10.0.0.0
来到r2上
rip 1
ver 2
un summary
network 192.168.2.0
network 10.0.0.0
来到r3上
rip 1
ver 2
un summary
network 192.168.3.0
network 10.0.0.0
来到r4上
rip 1
ver 2
un summary
network 192.168.4.0
network 10.0.0.0
来到r1上
int tunnel 0/0/1
undo rip split-horizon
来到r1上
acl 2000
rule permit source 192.168.1.0 0.0.0.255
int s4/0/0
nat outbound 2000
r2上
acl 2000
rule permit source 192.168.2.0 0.0.0.255
int s4/0/0
nat outbound 2000
r3上
acl 2000
rule permit source 192.168.3.0 0.0.0.255
int s4/0/0
nat outbound 2000
r4上
acl 2000
rule permit source 192.168.4.0 0.0.0.255
int s4/0/0
nat outbound 2000