rip环境下的MGRE实验

本文详细描述了在一个ISP环境中,通过配置PPP、PAP和CHAP认证、HDLC封装以及MGRE和GRE隧道,实现R1至R5之间的网络连接,并配置RIP协议确保私有网络全网可达的过程。
摘要由CSDN通过智能技术生成

实验要求:
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

GRE:
R1为中心站点;R1、R4间为点到点的GRE.
R1与R2
创建隧道接口给与IP地址
[R1-Tunnel0/0/0]ip ad
[R1-Tunnel0/0/0]ip address 192.168.5.1 24
定义封装方式
[R1-Tunnel0/0/0]tunnel-protocol gre
定义封装的源IP
[R1-Tunnel0/0/0]source 15.0.0.1
定义封装的目标IP
R2:
[R1-Tunnel0/0/0]destination 45.0.0.1
[R1-Tunnel0/0/0]ip ad
[R1-Tunnel0/0/0]ip address 192.168.5.4 24
[R1-Tunnel0/0/0]tunnel-protocol gre
[R1-Tunnel0/0/0]source 45.0.0.1
[R1-Tunnel0/0/0]destination 15.0.0.1

 

  • 26
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值