题目要求。
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环回
一.打开ensp软件绘制拓扑图,标记图中的ip地址。
二。配置路由表。
r1:
r2:
r3:
r4:
ISP:
第三步:
在ISP路由器配置ppp协议。
1.pap认证:
[ISP]aaa
[ISP-aaa]local-user prq password cip
[ISP-aaa]local-user prq password cipher 567890
Info: Add a new user.
[ISP-aaa]local-user prq service-type ppp
[ISP]interface Serial 3/0/0
[ISP-Serial3/0/0]ppp authentication-mode pap
[ISP-Serial3/0/0]q
配置完成后,接着断开pap认证端口,再次打开此接口 重新建立连接。
此时r1接口的连接状态:
是断开的,我们添加pap认证协议,再次重连此接口:
再次观察r1端口情况:
此时是打开的。
2.接下来进行chap认证。
选择加密模式,重新建立端口互联。
此时r2的端口情况:
添加chap指令
查看结果:
相通的。
r3与r5之间使用HDLC协议。
r3:
r5:
第四步:R1/R2/R3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
1.添加公网缺省路由:
[r1]ip route-static 0.0.0.0 0 15.0.0.2
[r2]ip route-static 0.0.0.0 0 25.0.0.2
[r3]ip route-static 0.0.0.0 0 35.0.0.2
[r4]ip route-static 0.0.0.0 0 45.0.0.2
公网互通:
2.在r1中心上添加mgre协议。
[r1]interface 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.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
在R2上面添加mgre协议 向中心注册:
[r2]interface 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.0.0.1 register
r3上面添加mgre协议 向中心注册:
[r3]interface 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.0.0.1 register
在中心查看注册表:
注册成功。
3.R1、R4间为点到点的GRE。
r1gre配置:
[r1]interface Tunnel 0/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.0.0.1
[r1-Tunnel0/0/1]destination 45.0.0.1
r4gre配置:
[r4]interface Tunnel 0/0/1
[r4-Tunnel0/0/1]ip add
[r4-Tunnel0/0/1]ip address 192.168.6.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 45.0.0.1
[r4-Tunnel0/0/1]destination 15.0.0.1
结果:
第六步:整个私有网络基于RIP全网可达
r1:
r2:
r3:
r4:
在中心开启伪广播关掉水平分割。
r1:rip路由表
r4:rip路由表
第七步:所有PC设置私有IP为源IP,可以访问R5环回
添加NRT协议:
[r1]acl
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]interface s
[r1]interface Serial 4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]
r2:
[r2]acl
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]q
[r2]int
[r2]interface s
[r2]interface Serial 4/0/0
[r2-Serial4/0/0]na
[r2-Serial4/0/0]nat ou
[r2-Serial4/0/0]nat outbound 2000
r3:
[r3]acl
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]interface Serial 4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]
r4:
[r4]acl
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]nat outbound 2000
[r4-GigabitEthernet0/0/1]