一、实验拓扑

二、实验要求
1、R5为ISP,只能进行IP地址配置,其所有地址均配为公有IP地址;
2、R1和R5间使用PPP的PAP认证,R5为主认证方;
R2与R5之间使用ppp的CHAP认证,R5为主认证方;
R3与R5之间使用HDLC封装;
3、R1、B2、R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE;
4、 整个私有网络基本RIP全网可达;
5 、所有PC设置私有IP为源IP,可以访问R5环回。
三、实验步骤及结果
1.首先配置路由器和PC的IP地址(仅展示R5各个接口的地址以及PC1地址,网关地址均以254结尾)


2.在R1、R2、R3、R4路由器上配置静态路由,以达到公网通
R1ip route-static 0.0.0.0 0 15.1.1.5
R2ip route-static 0.0.0.0 0 25.1.1.5
R3ip route-static 0.0.0.0 0 35.1.1.5
R4ip route-static 0.0.0.0 0 45.1.1.5
测试公网各个接口是否能ping通



3.R1和R5间使用PPP的PAP认证,R5为主认证方(实验要求2第一条)
在主认证方下创建被验证方用于登录的用户名和密码
R5-aaa]local-user wangdaye password cipher wdy12345 privilege level 15
设置服务类型
R5-aaalocal-user wangdaye service-type ppp
设置客户端登录验证的方式
R5-Serial4/0/1ppp authentication-mode pap
进入被验证方,告诉用户名,密码以及验证方式
R1-Serial4/0/0ppp pap local-user wangdaye password cipher wdy12345
验证(在UNDO SHUTDOWN之后出现PPP的两个up,则配置成功)
R1-Serial4/0/0shutdown
R1-Serial4/0/0undo shutdown

4.R2与R5之间使用ppp的CHAP认证,R5为主认证方(实验要求2第二条)
继续使用上一条配置的用户名和密码,只需设置认证方式
R5-Serial3/0/1ppp authentication-mode chap
告知R2
R2-Serial4/0/0ppp chap user wangdaye
R2-Serial4/0/0ppp chap password cipher wdy12345
验证(shutdown和undo shutdown)

5.R3与R5之间使用HDLC封装;


6.构建R1.R4间点到点的GRE
R1int Tunnel 0/0/0(随便哪个接口都行)
R1-Tunnel0/0/0ip ad 10.1.1.1 24
R1-Tunnel0/0/0tunnel-protocol gre
R1-Tunnel0/0/0source 15.1.1.1
R1-Tunnel0/0/0destination 45.1.1.4
R4int Tunnel 0/0/0
R4-Tunnel0/0/0ip ad 10.1.1.4 24
R4-Tunnel0/0/0source 45.1.1.4
R4-Tunnel0/0/0destination 15.1.1.1
7.构建MGRE
R1int Tunnel 0/0/1
R1-Tunnel0/0/1tunnel-protocol gre p2mp
R1-Tunnel0/0/1source 15.1.1.1
R1-Tunnel0/0/1nhrp network-id 100
R2int Tunnel 0/0/1
R2-Tunnel0/0/1ip ad 10.1.2.2 24
R2-Tunnel0/0/1tunnel-protocol gre p2mp
R2-Tunnel0/0/1nhrp network-id 100
R2-Tunnel0/0/1nhrp entry 10.1.2.1 15.1.1.1 register
R3int Tunnel 0/0/1
R3-Tunnel0/0/1ip ad 10.1.2.3 24
R3-Tunnel0/0/1tunnel-protocol gre p2mp
R3-Tunnel0/0/1nhrp network-id 100
R3-Tunnel0/0/1nhrp entry 10.1.2.1 15.1.1.1 register



7.配置rip




关闭接口水平分割机制,开启中心隧道口的广播功能



检查




测试(仅展示一个,其余都能ping通)

8.配置要求五,配置nat,达到全网通(R1-R4的配置一样,只用换一下source网段)
(
测试(仅展示部分)



至此,所有要求均已完成。