实验要求
R5为ISP,只能进行IP地址配置;其所有接口配置为公有IP地址
R1与R5间使用PPPPAP认证,R5为主认证方;
R2与R5间使用PPPCHAP认证,R5为主认证方;
R3与R5间使用HDLC封装
R1/2/3构建一个MGRE环境,R1为中心站点;
R1/4间为点到点GRE
整个私有网络基于RIP全网可达
有PC基于私有地址为源ip时,可以正常访问R5环回
1 配置路由IP地址
2 R1与R5间使用PPPPAP认证,R5为主认证方;
r5
[r5]aaa
[r5-aaa]local-user lm pass
[r5-aaa]local-user lm password cipher 123456
[r5-aaa]local-user lm service-type ppp
[r5-aaa]q
[r5]int s3/0/0
[r5-Serial3/0/0]ppp authentication-mode pap
r1
[r1]int s4/0/0
[r1-Serial4/0/0]ppp pap local-user lm password cipher 123456
3 R2与R5间使用PPP的CHAP认证,R5为主认证方;
r5
[r5]aaa
[r5-aaa]local-user lm password cipher 123456
[r5-aaa]local-user lm service-type ppp
[r5-aaa]q
[r5]int s3/0/1
[r5-Serial3/0/1]ppp authentication-mode chap
r2
[r2]int s4/0/0
[r2-Serial4/0/0]ppp chap user lm
[r2-Serial4/0/0]ppp chap password cipher 123456
4 R3与R5间使用HDLC封装
r5
[r5]int s4/0/0
[r5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
r3
[r3]int s4/0/0
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
给路由器写缺省
r1
ip route-static 0.0.0.0 0.0.0.0 15.1.1.2
其他路由器同理。
5、R1/2/3构建一个MGRE环境,R1为中心站点;
r1
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.1.1.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon
r2
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial 4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.1.1.1 register
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 192.168.4.0
[r2-rip-1]network 192.168.5.0
r3
[r3]int t
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.1.1.1 register
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
6、R1/4间为点到点GRE;
r1
[r1]int t0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 15.1.1.1
[r1-Tunnel0/0/1]destination 14.1.1.1
r4
[r4]int t0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 14.1.1.1
[r4-Tunnel0/0/0]destination 15.1.1.1
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 192.168.2.0
[r4-rip-1]network 192.168.6.0
7 在每一个边界路由上配置NAT,使得局域网可以访问互联网
r1
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
其他路由器同理,达到全网可达。