实验要求:
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的环回。
步骤:
1.标明ISP,规划网段
2.分配ip地址,写好缺省路由指向ISP
R1:[R1]ip route-static 0.0.0.0 0 15.0.0.2
R2:[R2]ip route-static 0.0.0.0 0 25.0.0.2
R3:[R3]ip route-static 0.0.0.0 0 35.0.0.2
R4:[R4]ip route-static 0.0.0.0 0 45.0.0.1
R5:[R5]ip route-static 0.0.0.0 0 45.0.0.2
RAP认证:
R1和R5间使用PPP的PAP认证 认证方: [R5]aaa [R5-aaa] local-user admin password cipher 123456 [R5-aaa] local-user admin service-type ppp 在接口做PAP认证 [R5-Serial3/0/0]ppp authentication-mode pap [R1-Serial4/0/0]ppp pap local-user admin password cipher 123456
chap认证:
R2和R5之间使用PPP的chap认证 认证方: [R5-Serial3/0/1]ppp authentication-mode chap [R2-Serial4/0/0]ppp chap user admin [R2-Serial4/0/0]ppp chap password cipher 123456
HDLC:
R3和R5之间使用HDLC封装 [R3-Serial4/0/0] link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N] :y [R5-Serial4/0/0] link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N] :y
MGRE:
R1/R2/R3构建一个MGRE环境,R1为中心站点
配置:
创建隧道接口给与IP地址
[R1-Tunnel0/0/0]ip ad
[R1-Tunnel0/0/0]ip address 192.168.5.1 24[R1-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]ip ad
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
定义封装方式
[R1-Tunnel0/0/0]tunnel-protocol gre p2
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp[R2-Tunnel0/0/0]tunnel-protocol gre p2
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
定义封装的源IP
[R1-Tunnel0/0/0]source 15.0.0.1[R2-Tunnel0/0/0]source s4/0/0 出接口的方式定义
创建nhrp域
[R1-Tunnel0/0/0]nhrp network-id 100
加入中心创建的nhrp域
[R2-Tunnel0/0/0]nhrp network-id 100
找中心上报映射信息
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R2]display nhrp peer all 查看隧道接口和物理接口映射关系
配置路由(RIP协议):
启动RIP协议
[R1]rip
[R1-rip-1]
[R1-rip-1]version 2
宣告路由
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.5.0