当前位置: 首页 > news >正文

基于RIP的MGRE综合实验

实验拓扑:

实验要求:

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. 给PC和路由器根据给出网段配置IP地址,R5的环回;
  2. 配置缺省路由;
  3. R1yuR5之间配置ppp,R5进入aaa作为主认证方进行配置,用户名wangdaye,密码wdy12345,R5进入接口开启PAP服务,R1也进入接口开启服务;
  4. R2与R5之间进行同样的操作,用户zhangdaye,密码zdy12345,接口开启CHAP服务;
  5. R3、R5进接口,开启HDLC协议;
  6. 搭建MGRE VPN虚拟隧道,配置Tunnel 0/0/0接口并配置IP;R1作为中心站点,R2、R3、作为分支站点,中心IP地址固定,分支站点写出接口,中心站点设置伪广播,分支到中心注册;设置NHRP的工作id:100;
  7. R1、R4配置点到点的GRE,Tunnel为0/0/1
  8. 配置RIP使全网可达
  9. R1开启伪广播,关闭RIP水平分割,使其他分支学习到分站之间的条目
  10. 创建acl放通内网流量,使内网能访问外网

实验步骤:

1.给PC和路由器配置IP地址

PC1:192.168.1.1 24

PC2:192.168.2.1 24

PC3:192.168.3.1 24

PC4:192.168.4.1 24

[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24

[R1-Serial4/0/0]ip add 15.1.1.1 24

[R2-GigabitEthernet0/0/0]ip add 192.168.2.254 24

[R2-Serial4/0/0]ip add 25.1.1.2 24

[R3-GigabitEthernet0/0/0]ip add 192.168.3.254 24

[R3-Serial4/0/0]ip add 35.1.1.3 24

[R4-GigabitEthernet0/0/0]ip add 45.1.1.4 24

[R4-GigabitEthernet0/0/1]ip add 192.168.4.254 24

[R5-GigabitEthernet0/0/0]ip add 45.1.1.5 24

[R5-Serial4/0/0]ip add 35.1.1.5 24

[R5-Serial4/0/1]ip add 15.1.1.5 24

[R5-Serial3/0/1]ip add 25.1.1.5 24

[R5]int l0

[R5-LoopBack0]ip add 5.5.5.5 24

2.在出口配置缺省路由,指向公网路由器R5,保证公网通

[R1]ip route-static 0.0.0.0 0 15.1.1.5

[R2]ip route-static 0.0.0.0 0 25.1.1.5

[R3]ip route-static 0.0.0.0 0 35.1.1.5

[R4]ip route-static 0.0.0.0 0 45.1.1.5

3、R1和R5间使用PPP的PAP认证,R5为主认证方

R5:

[R5]aaa

[R5-aaa]local-user wangdaye password cipher wdy12345

Info: Add a new user.

[R5-aaa]local-user wangdaye service-type ppp

[R5-aaa]q

[R5]int s 4/0/1  

[R5-Serial4/0/1]ppp authentication-mode pap

[R5-Serial4/0/1]q

R1:

[R1]int s 4/0/0  

[R1-Serial4/0/0]ppp pap local-user wangdaye password cipher wdy12345

[R1-Serial4/0/0]q

4.R2和R5间使用PPP的CHAP认证,R5为主认证方

R5:

[R5]aaa

[R5-aaa]local-user zhangdaye password cipher zdy12345

Info: Add a new user.

[R5-aaa]local-user zhangdaye service-type ppp

[R5-aaa]q

[R5]int s 3/0/1

[R5-Serial3/0/1]ppp authentication-mode chap

[R5-Serial3/0/1]q

R2:

[R2]int s 4/0/0

[R2-Serial4/0/0]ppp chap user zhangdaye

[R2-Serial4/0/0]ppp chap password cipher zdy12345

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

R3:

[R3]int s 4/0/0

[R3-Serial4/0/0]link-protocol hdlc

Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]

:y

R5:

[R5]int s 4/0/0

[R5-Serial4/0/0]link-protocol hdlc

Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]

:y

测试:

6.搭建MGRE VPN虚拟隧道;R1作为中心站点,R2、R3、R4作为分支站点;R2、R3到R1注册

R1(中心站点):

[R1]int t 

[R1]int Tunnel 0/0/0

[R1-Tunnel0/0/0]ip add 10.1.2.1 24

[R1-Tunnel0/0/0]tunnel-protocol gre p2mp

[R1-Tunnel0/0/0]source 15.1.1.1

Mar 29 2024 18:53:31-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.

[R1-Tunnel0/0/0]nhrp network-id 100

R2:

[R2]int t 

[R2]int Tunnel 0/0/0

[R2-Tunnel0/0/0]ip add 10.1.2.2 24

[R2-Tunnel0/0/0]tunnel-protocol gre p2mp

[R2-Tunnel0/0/0]source Serial 4/0/0

Mar 29 2024 18:56:35-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.

[R2-Tunnel0/0/0]nhrp network-id 100

[R2-Tunnel0/0/0]nh  

[R2-Tunnel0/0/0]nhrp en 

[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 re 

[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register

R3:

[R3]int t 

[R3]int Tunnel 0/0/0

[R3-Tunnel0/0/0]ip add 10.1.2.3 24

[R3-Tunnel0/0/0]tunnel-protocol gre p2mp

[R3-Tunnel0/0/0]source Serial 4/0/0

Mar 29 2024 18:58:56-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.

[R3-Tunnel0/0/0]nhrp network-id 100

[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register

7、R1、R4配置点到点的GRE,Tunnel为0/0/1

R1:

[R1]int Tunnel 0/0/1

[R1-Tunnel0/0/1]ip add 10.1.1.1 24

[R1-Tunnel0/0/1]tu  

[R1-Tunnel0/0/1]tunnel-protocol g 

[R1-Tunnel0/0/1]tunnel-protocol gre

[R1-Tunnel0/0/1]s

[R1-Tunnel0/0/1]so  

[R1-Tunnel0/0/1]source 15.1.1.1

[R1-Tunnel0/0/1]dest

[R1-Tunnel0/0/1]destination 45.1.1.4

Mar 30 2024 17:41:43-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.

R4:

[R4]int Tunnel 0/0/1

[R4-Tunnel0/0/1]ip add 10.1.1.4 24

[R4-Tunnel0/0/1]tu  

[R4-Tunnel0/0/1]tunnel-protocol g 

[R4-Tunnel0/0/1]tunnel-protocol gre

[R4-Tunnel0/0/1]so  

[R4-Tunnel0/0/1]source 45.1.1.4

[R4-Tunnel0/0/1]dest

[R4-Tunnel0/0/1]destination 15.1.1.1

Mar 30 2024 17:45:58-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.

8.配置RIP使全网可达

R1:

[R1]rip 1

[R1-rip-1]v 2

[R1-rip-1]undo summary

[R1-rip-1]network 192.168.1.0

[R1-rip-1]network 10.1.2.0

Error: The network address is invalid, and the specified address must be major-net address without any subnets.

[R1-rip-1]network 10.0.0.0

R2:

[R2]rip 1

[R2-rip-1]v 2

[R2-rip-1]undo summary

[R2-rip-1]network 192.168.2.0

[R2-rip-1]network 10.0.0.0

[R2-rip-1]q

R3:

[R3]rip 1

[R3-rip-1]v 2

[R3-rip-1]undo summary

[R3-rip-1]network 192.168.3.0

[R3-rip-1]network 10.0.0.0

[R3-rip-1]q

R4:

[R4]rip 1

[R4-rip-1]v 2

[R4-rip-1]undo summary  

[R4-rip-1]network 192.168.4.0

[R4-rip-1]network 10.0.0.0

[R4-rip-1]q

9.R1开启伪广播,关闭RIP水平分割,使其他分支学习到分站之间的条目

R1:

[R1]int Tunnel 0/0/0

[R1-Tunnel0/0/0]nhrp entry multicast dynamic  //开启伪广播

[R1-Tunnel0/0/0]undo rip split-horizon

R2:

[R2]int Tunnel 0/0/0

[R2-Tunnel0/0/0]undo rip s 

[R2-Tunnel0/0/0]undo rip split-horizon

R3:

[R3]int t 

[R3]int Tunnel 0/0/0

[R3-Tunnel0/0/0]undo rip s 

[R3-Tunnel0/0/0]undo rip split-horizon

[R3-Tunnel0/0/0]q

检查rip表:

R1:

R2:

R3:

R4:

10.使用NAT技术创建acl放通内网流量,使内网能访问外网

R1:
[R1]acl 2000

[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[R1-acl-basic-2000]q

[R1]int s 4/0/0

[R1-Serial4/0/0]nat outbound 2000

[R1-Serial4/0/0]

R2:

[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 s 4/0/0

[R2-Serial4/0/0]nat outbound 2000

R3:

[R3]acl 2000

[R3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255

[R3-acl-basic-2000]q

[R3]int s 4/0/0

[R3-Serial4/0/0]nat outbound 2000

R4:

[R4]acl 2000

[R4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255

[R4-acl-basic-2000]q

[R4]int g0/0/0

[R4-GigabitEthernet0/0/0]nat outbound 2000

11.ping测试

相关文章:

  • 启信宝商业大数据助力全国经济普查
  • MySQL用户操作
  • Mysql or与in的区别
  • ORACLE 存中文
  • 顺序表专题
  • java将文件转成流文件返回给前端
  • leetCode刷题 22. 括号生成
  • 云计算应用管理(ENGINEER)
  • 【网站项目】青少年体质健康数据管理与分析系统
  • 使用node爬取视频网站里《龙珠》m3u8视频
  • 使用 golang 以及 Gin 框架,将上传的图片在不保存至本地的情况下添加水印,并上传至阿里云 OSS
  • LeetCode-2952. 需要添加的硬币的最小数量【贪心 数组 排序】
  • 【JDK常用的API】包装类
  • VOC(客户之声)赋能智能家居:打造个性化、交互式的未来生活体验
  • 【DA-CLIP】生成图像描述generate_captions.py代码理解+实践
  • 9月CHINA-PUB-OPENDAY技术沙龙——IPHONE
  • 【跃迁之路】【519天】程序员高效学习方法论探索系列(实验阶段276-2018.07.09)...
  • Fastjson的基本使用方法大全
  • JAVA之继承和多态
  • js中forEach回调同异步问题
  • MobX
  • vue总结
  • 开放才能进步!Angular和Wijmo一起走过的日子
  • 如何抓住下一波零售风口?看RPA玩转零售自动化
  • 深入体验bash on windows,在windows上搭建原生的linux开发环境,酷!
  • 通信类
  • 一个JAVA程序员成长之路分享
  • C# - 为值类型重定义相等性
  • 树莓派用上kodexplorer也能玩成私有网盘
  • ​​​​​​​​​​​​​​Γ函数
  • #Java第九次作业--输入输出流和文件操作
  • #vue3 实现前端下载excel文件模板功能
  • (16)Reactor的测试——响应式Spring的道法术器
  • (C语言)逆序输出字符串
  • (C语言)输入一个序列,判断是否为奇偶交叉数
  • (附源码)springboot工单管理系统 毕业设计 964158
  • (力扣)1314.矩阵区域和
  • (力扣)循环队列的实现与详解(C语言)
  • (六)软件测试分工
  • (论文阅读30/100)Convolutional Pose Machines
  • (转)IIS6 ASP 0251超过响应缓冲区限制错误的解决方法
  • .NET Core6.0 MVC+layui+SqlSugar 简单增删改查
  • .Net Core与存储过程(一)
  • .Net FrameWork总结
  • .net mvc actionresult 返回字符串_.NET架构师知识普及
  • .net 流——流的类型体系简单介绍
  • .Net(C#)自定义WinForm控件之小结篇
  • .NET开发不可不知、不可不用的辅助类(三)(报表导出---终结版)
  • .NET开源全面方便的第三方登录组件集合 - MrHuo.OAuth
  • .NET企业级应用架构设计系列之开场白
  • .net与java建立WebService再互相调用
  • /var/lib/dpkg/lock 锁定问题
  • ??在JSP中,java和JavaScript如何交互?
  • @column注解_MyBatis注解开发 -MyBatis(15)
  • @EnableWebMvc介绍和使用详细demo