RIP环境下的MGRE 综合实验

2024-03-31 07:12
文章标签 综合 环境 实验 mgre rip

本文主要是介绍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环回,达到全网通

一,根据要求配置IP地址

1、接口配ip

R1:
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]int serial 4/0/0
[R1-Serial4/0/0]ip add 15.0.0.1 24

R2:
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[R2-GigabitEthernet0/0/0]int serial 4/0/0
[R2-Serial4/0/0]ip add 25.0.0.1 24

R3:
[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[R3-GigabitEthernet0/0/0]int serial 4/0/0
[R3-Serial4/0/0]ip add 35.0.0.1 24

R4:
[R4]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[R4-GigabitEthernet0/0/1]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.0.0.1 24

R5:
[R5]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.0.0.2  24
[R5-GigabitEthernet0/0/0]int serial 4/0/0
[R5-Serial4/0/0]ip add 35.0.0.2 24
[R5-Serial4/0/0]int serial 4/0/1
[R5-Serial4/0/1]ip add 15.0.0.2 24
[R5-Serial4/0/1]int serial 3/0/1
[R5-Serial3/0/1]ip add 25.0.0.2 24

[R5]int l0
[R5-LoopBack0]ip add 5.5.5.5 24

2、R1,R2,R3,R4配缺省路由

[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

二、配置NAT进行地址转换

R1:
[R1]acl 2000
[R1-acl-basic-2000]rule 1 permit source any
[R1-acl-basic-2000]q
[R1]int s 4/0/0
[R1-Serial4/0/0]nat outbound 2000

R2:
[R2]acl 2000
[R2-acl-basic-2000]rule 1 permit source any
[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 1 permit source any
[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 1 permit source any 
[R4-acl-basic-2000]q
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]nat outbound 2000

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

主认证方R5:
[R5]aaa
[R5-aaa]loca    
[R5-aaa]local-user xiaomi password cipher 123456
Info: Add a new user.
[R5-aaa]local-user xiaomi service-type ppp
[R5-aaa]q
[R5]int s 3/0/0
[R5-Serial3/0/0]ppp authentication-mode pap

被认证方R1:
[R1]int s 4/0/0
[R1-Serial4/0/0]ppp pap local-user huawei password cipher huawei

2、R2与R5之间使用ppp的chap认证

主认证方R5:
[R5]aaa  
[R5-aaa]local-user xiaomi password cipher 123456
Info: Add a new user. 
[R5-aaa]local-user xiaomi service-type ppp
[R5-aaa]q
[R5]int s 3/0/1
[R5-Serial3/0/1]ppp authentication-mode chap

被认证方R2:
[R2]int s 4/0/0
[R2-Serial4/0/0]ppp chap user xiaomi
[R2-Serial4/0/0]ppp chap password cipher 123456

3、  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

三、R1/R2/R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE

1、MGRE的环境搭建

R1:
[R1]int t 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.0.0.1
Mar 30 2024 14:39:20-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 0/0/0
[R2-Tunnel0/0/0]ip add 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source s 4/0/0
Mar 30 2024 14:46:07-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 entry 10.1.1.1 15.0.0.1 register 

R3:
[R3]int t 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s 4/0/0
Mar 30 2024 14:48:29-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 entry 10.1.1.1 15.0.0.1 register

2、GRE环境搭建

R1:
[R1]int t 0/0/1
[R1-Tunnel0/0/1]ip add 20.1.1.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
Mar 30 2024 14:55:34-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]interface Tunnel 0/0/1
[R4-Tunnel0/0/1]ip address 20.1.1.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
Mar 30 2024 14:59:22-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 

四、整个私有网络基于RIP全网可达

R1:
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0
[R1-rip-1]network 20.0.0.0
[R1-rip-1]q
[R1]int t 0/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic 
[R1-Tunnel0/0/0]undo rip split-horizon 

R2:
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 10.0.0.0

R3:[R3]rip
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 10.0.0.0

R4:
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 20.0.0.0

五、所有pc设置私有IP为源IP,可以访问R5环回

PC1:

PC2:

PC3:

PC4:

六、ping看是否全网可达

这篇关于RIP环境下的MGRE 综合实验的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/863730

相关文章

Redis在windows环境下如何启动

《Redis在windows环境下如何启动》:本文主要介绍Redis在windows环境下如何启动的实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Redis在Windows环境下启动1.在redis的安装目录下2.输入·redis-server.exe

Pytest多环境切换的常见方法介绍

《Pytest多环境切换的常见方法介绍》Pytest作为自动化测试的主力框架,如何实现本地、测试、预发、生产环境的灵活切换,本文总结了通过pytest框架实现自由环境切换的几种方法,大家可以根据需要进... 目录1.pytest-base-url2.hooks函数3.yml和fixture结论你是否也遇到过

浅谈配置MMCV环境,解决报错,版本不匹配问题

《浅谈配置MMCV环境,解决报错,版本不匹配问题》:本文主要介绍浅谈配置MMCV环境,解决报错,版本不匹配问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录配置MMCV环境,解决报错,版本不匹配错误示例正确示例总结配置MMCV环境,解决报错,版本不匹配在col

Centos环境下Tomcat虚拟主机配置详细教程

《Centos环境下Tomcat虚拟主机配置详细教程》这篇文章主要讲的是在CentOS系统上,如何一步步配置Tomcat的虚拟主机,内容很简单,从目录准备到配置文件修改,再到重启和测试,手把手带你搞定... 目录1. 准备虚拟主机的目录和内容创建目录添加测试文件2. 修改 Tomcat 的 server.X

VSCode配置Anaconda Python环境的实现

《VSCode配置AnacondaPython环境的实现》VisualStudioCode中可以使用Anaconda环境进行Python开发,本文主要介绍了VSCode配置AnacondaPytho... 目录前言一、安装 Visual Studio Code 和 Anaconda二、创建或激活 conda

pytorch+torchvision+python版本对应及环境安装

《pytorch+torchvision+python版本对应及环境安装》本文主要介绍了pytorch+torchvision+python版本对应及环境安装,安装过程中需要注意Numpy版本的降级,... 目录一、版本对应二、安装命令(pip)1. 版本2. 安装全过程3. 命令相关解释参考文章一、版本对

国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)

《国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)》本文给大家利用deepseek模型搭建私有知识问答库的详细步骤和遇到的问题及解决办法,感兴趣的朋友一起看看吧... 目录1. 第1步大家在安装完ollama后,需要到系统环境变量中添加两个变量2. 第3步 “在cmd中

Windows环境下安装达梦数据库的完整步骤

《Windows环境下安装达梦数据库的完整步骤》达梦数据库的安装大致分为Windows和Linux版本,本文将以dm8企业版Windows_64位环境为例,为大家介绍一下达梦数据库的具体安装步骤吧... 目录环境介绍1 下载解压安装包2 根据安装手册安装2.1 选择语言 时区2.2 安装向导2.3 接受协议

SpringBoot基于沙箱环境实现支付宝支付教程

《SpringBoot基于沙箱环境实现支付宝支付教程》本文介绍了如何使用支付宝沙箱环境进行开发测试,包括沙箱环境的介绍、准备步骤、在SpringBoot项目中结合支付宝沙箱进行支付接口的实现与测试... 目录一、支付宝沙箱环境介绍二、沙箱环境准备2.1 注册入驻支付宝开放平台2.2 配置沙箱环境2.3 沙箱

linux环境openssl、openssh升级流程

《linux环境openssl、openssh升级流程》该文章详细介绍了在Ubuntu22.04系统上升级OpenSSL和OpenSSH的方法,首先,升级OpenSSL的步骤包括下载最新版本、安装编译... 目录一.升级openssl1.官网下载最新版openssl2.安装编译环境3.下载后解压安装4.备份