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

相关文章

Java 与 LibreOffice 集成开发指南(环境搭建及代码示例)

《Java与LibreOffice集成开发指南(环境搭建及代码示例)》本文介绍Java与LibreOffice的集成方法,涵盖环境配置、API调用、文档转换、UNO桥接及REST接口等技术,提供... 目录1. 引言2. 环境搭建2.1 安装 LibreOffice2.2 配置 Java 开发环境2.3 配

SpringBoot多环境配置数据读取方式

《SpringBoot多环境配置数据读取方式》SpringBoot通过环境隔离机制,支持properties/yaml/yml多格式配置,结合@Value、Environment和@Configura... 目录一、多环境配置的核心思路二、3种配置文件格式详解2.1 properties格式(传统格式)1.

Go语言编译环境设置教程

《Go语言编译环境设置教程》Go语言支持高并发(goroutine)、自动垃圾回收,编译为跨平台二进制文件,云原生兼容且社区活跃,开发便捷,内置测试与vet工具辅助检测错误,依赖模块化管理,提升开发效... 目录Go语言优势下载 Go  配置编译环境配置 GOPROXYIDE 设置(VS Code)一些基本

Windows环境下解决Matplotlib中文字体显示问题的详细教程

《Windows环境下解决Matplotlib中文字体显示问题的详细教程》本文详细介绍了在Windows下解决Matplotlib中文显示问题的方法,包括安装字体、更新缓存、配置文件设置及编码調整,并... 目录引言问题分析解决方案详解1. 检查系统已安装字体2. 手动添加中文字体(以SimHei为例)步骤

Java JDK1.8 安装和环境配置教程详解

《JavaJDK1.8安装和环境配置教程详解》文章简要介绍了JDK1.8的安装流程,包括官网下载对应系统版本、安装时选择非系统盘路径、配置JAVA_HOME、CLASSPATH和Path环境变量,... 目录1.下载JDK2.安装JDK3.配置环境变量4.检验JDK官网下载地址:Java Downloads

SQLite3 在嵌入式C环境中存储音频/视频文件的最优方案

《SQLite3在嵌入式C环境中存储音频/视频文件的最优方案》本文探讨了SQLite3在嵌入式C环境中存储音视频文件的优化方案,推荐采用文件路径存储结合元数据管理,兼顾效率与资源限制,小文件可使用B... 目录SQLite3 在嵌入式C环境中存储音频/视频文件的专业方案一、存储策略选择1. 直接存储 vs

python常见环境管理工具超全解析

《python常见环境管理工具超全解析》在Python开发中,管理多个项目及其依赖项通常是一个挑战,下面:本文主要介绍python常见环境管理工具的相关资料,文中通过代码介绍的非常详细,需要的朋友... 目录1. conda2. pip3. uvuv 工具自动创建和管理环境的特点4. setup.py5.

Python中使用uv创建环境及原理举例详解

《Python中使用uv创建环境及原理举例详解》uv是Astral团队开发的高性能Python工具,整合包管理、虚拟环境、Python版本控制等功能,:本文主要介绍Python中使用uv创建环境及... 目录一、uv工具简介核心特点:二、安装uv1. 通过pip安装2. 通过脚本安装验证安装:配置镜像源(可

python获取cmd环境变量值的实现代码

《python获取cmd环境变量值的实现代码》:本文主要介绍在Python中获取命令行(cmd)环境变量的值,可以使用标准库中的os模块,需要的朋友可以参考下... 前言全局说明在执行py过程中,总要使用到系统环境变量一、说明1.1 环境:Windows 11 家庭版 24H2 26100.4061

pytest+allure环境搭建+自动化实践过程

《pytest+allure环境搭建+自动化实践过程》:本文主要介绍pytest+allure环境搭建+自动化实践过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录一、pytest下载安装1.1、安装pytest1.2、检测是否安装成功二、allure下载安装2.