HDLC、PPP综合实验
实验需求:
1、R5为ISP,只能进行IP地址配置,其所有地址均配为公有IP地址
2、R1和R5间使用PPP的PAP认证,R5为主认证方;
R2和R5之间使用的PPP的chap认证,R5为主认证方;
R3和R5之间使用HDLC封装。
3、R1/R2/R3之间构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
4、整个私有网络基于RIP全网可达。
5、所有PC设置私有IP为源ip,可以访问R5环回。**
搭建拓扑如下:
- 按图配IP地址,配完IP地址后,要想互通,可以写一条缺省路由
[R1]ip route-static 0.0.0.0 0 15.0.0.2 - R1和R5间使用PPP的PAP认证,R5为主认证方;R2和R5之间使用的PPP的chap认证,R5为主认证方;R3和R5之间使用HDLC封装。
- 先在ISP上做主任证PPP认证配置:
[ISP-aaa]local-user r1 password cipher 123456
[ISP-aaa]local-user r1 service-type ppp
[ISP-Serial3/0/0]ppp authentication-mode pap
然后在R1上做被认证方配置
[R1-Serial4/0/0]ppp pap local-user r1 password cipher 123456
如果现在ping,不能说明认证成功。因为PPP创建的是一次性会话,之前会话已经创建好了,且创建的会话没有认证,所以现在得shutdown一下接口,再ping,如果通了,才能够证明PPP认证成功。
CHAP认证方:
[ISP-aaa]local-user r2 password cipher 123456
[ISP-aaa]local-user r2 service-type ppp
[ISP-Serial3/0/1]ppp authentication-mode chap
被认证方:
[R2-Serial4/0/0]ppp chap user r2
[R2-Serial4/0/0]ppp chap password cipher 123456
HDLC封装(两边都必须改封装类型):
[R3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[ISP-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y - R1/R2/R3之间构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
R1 中心点MGRE配置:
[R1]int t0/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.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 100
R2、R3:
[R2]int t0/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 s4/0/0
[R3-Tunnel0/0/0]nhrp network-id 100
R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
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 45.0.0.1
[R4-Tunnel0/0/0]destination 15.0.0.1 - 整个私有网络基于RIP全网可达
[R1]rip
[R1-rip-1]v 2
[R1-rip-1]net 192.168.1.0
[R1-rip-1]net 192.168.5.0
[R1-rip-1]net 192.168.6.0
所有路由器上 都进行rip 宣告 - 所有PC设置私有IP为源ip,可以访问R5环回 [R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1]interface Serial 4/0/0
[R1-Serial4/0/0]nat outbound 2000