要求
R5为ISP,只能进行IP地址配置;其所有地址均配为公有IP地址
R1和R5间使用PPP的PAP认证,R5为主认证方;R2于R5之间使用PPP的chap认证,R5为主认证方;R3于R5之间使用HDLc封装。
R1/R2/R3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
整个私有网络基于RIP全网可达;
所有PC设置私有IP为源IP,可以访问R5环回。
一、子网划分
子网划分:
192.168.1.0/24 -- R1内网网段
192.168.2.0/24 -- R2内网网段
192.168.3.0/24 -- R3内网网段
192.168.4.0/24 -- R4内网网段
192.168.5.0/24 -- MGRE/GRE中R1,R2,R3网段
192.168.6.0/24 -- GRE中R1,R4网段
15.0.0.0/24 -- R1~R5链路
25.0.0.0/24 -- R2~R5链路
35.0.0.0/24 -- R3~R5链路
45.0.0.0/24 -- R4~R5链路
5.5.5.5/24 -- R5环回
二、配置
R1
sys
sys r1
acl 2000
rule permit source 192.168.1.0 0.0.0.255
int g0/0/0
ip add 192.168.1.1 24
int s4/0/0
nat outbound 2000
ip add 15.0.0.1 24
int t0/0/0
ip add 192.168.5.1 24
int t0/0/1
ip add 192.168.6.1 24
int s4/0/0
ppp pap local-user admin_pap password cipher 123456
int t0/0/0
tunnel-protocol gre p2mp
source 15.0.0.1
nhrp network-id 100
int t0/0/0
nhrp entry multicast dynamic
undo rip split-horizon
int t0/0/1
tunnel-protocol gre
source 15.0.0.1
destination 45.0.0.1
rip 1
v 2
net 192.168.1.0
net 192.168.5.0
net 192.168.6.0
ip route-s 0.0.0.0 0 15.0.0.2
ip route-s 192.168.4.0 24 192.168.5.4
R2
sys
sys r2
acl 2000
rule permit source 192.168.2.0 0.0.0.255
int g0/0/0
ip add 192.168.2.1 24
int s4/0/0
ip add 25.0.0.1 24
nat outbound 2000
int t0/0/0
ip add 192.168.5.2 24
int s4/0/0
ppp chap user admin_chap
ppp chap password cipher 123456
int t0/0/0
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
rip 1
v 2
net 192.168.2.0
net 192.168.5.0
ip route-s 0.0.0.0 0 25.0.0.2
R3
sys
sys r3
acl 2000
rule permit source 192.168.3.0 0.0.0.255
int g0/0/0
ip add 192.168.3.1 24
int s4/0/0
ip add 35.0.0.1 24
nat outbound 2000
int t0/0/0
ip add 192.168.5.3 24
int t0/0/0
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
rip 1
v 2
net 192.168.3.0
net 192.168.5.0
ip route-s 0.0.0.0 0 35.0.0.2
int s4/0/0
link-protocol hdlc
R4
sys
sys r4
acl 2000
rule permit source 192.168.4.0 0.0.0.255
int g0/0/1
ip add 192.168.4.1 24
nat outbound 2000
int g0/0/0
ip add 45.0.0.1 24
int t0/0/0
ip add 192.168.6.2 24
int t0/0/0
tunnel-protocol gre
source 45.0.0.1
destination 15.0.0.1
rip 1
v 2
net 192.168.4.0
net 192.168.5.0
net 192.168.6.0
ip route-s 0.0.0.0 0 45.0.0.2
ip route-s 192.168.1.0 24 192.168.5.1
R5
sys
sys ISP
int s3/0/0
ip add 15.0.0.2 24
int s3/0/1
ip add 25.0.0.2 24
int s4/0/0
ip add 35.0.0.2 24
int g0/0/0
ip add 45.0.0.2 24
int lo0
ip add 5.5.5.5 24
aaa
local-user admin_pap password cipher 123456
local-user admin_pap service-type ppp
int s3/0/0
ppp authentication-mode pap
aaa
local-user admin_chap password cipher 123456
local-user admin_chap service-type ppp
int s3/0/1
ppp authentication-mode chap
int s3/0/1
link-protocol hdlc