hcip实验4:gre mgre ppp综合实验

实验拓扑:

实验目的:

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配置:

#R1配置
<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[R1-GigabitEthernet0/0/0]int se4/0/0
[R1-Serial4/0/0]ip add 15.1.1.1 24#R2配置
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add	
[R2-GigabitEthernet0/0/0]ip address 192.168.2.254 24
[R2-GigabitEthernet0/0/0]int se4/0/0
[R2-Serial4/0/0]ip add 25.1.1.2 24#R3配置
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.254 24
[R3-GigabitEthernet0/0/0]int se4/0/0
[R3-Serial4/0/0]ip add 35.1.1.3 24#R4配置
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.4.254 24
[R4-GigabitEthernet0/0/1]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.1.1.4 24#R5配置
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 45.1.1.5 24
[ISP-GigabitEthernet0/0/0]int se4/0/1
[ISP-Serial4/0/1]ip add 15.1.1.5 24
[ISP-Serial4/0/1]int se3/0/1
[ISP-Serial3/0/1]ip add 25.1.1.5 24
[ISP-Serial3/0/1]int se4/0/0
[ISP-Serial4/0/0]ip add 35.1.1.5 24
[ISP-Serial4/0/0]q	
[ISP]int LoopBack 0
[ISP-LoopBack0]ip add 5.5.5.5 24#配置静态缺省路由使公网通
[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

测试公网通:

ppp验证配置:

R1与R5之间使用pap配置(R5为主认证方):

#R1配置
[R1]int se4/0/0
[R1-Serial4/0/0]ppp pap local-user wangdaye password cipher wdy123
[R1-Serial4/0/0]q#R5配置
[ISP]aaa	
[ISP-aaa]local-user wangdaye password cipher wdy123
Info: Add a new user.	
[ISP-aaa]local-user wangdaye service-type ppp
[ISP-aaa]q
[ISP]int se4/0/1
[ISP-Serial4/0/1]ppp authentication-mode pap

R1与R5之间使用chap配置(R5为主认证方):

#R2配置
[R2]int se4/0/0
[R2-Serial4/0/0]ppp chap user zhangdaye
[R2-Serial4/0/0]ppp chap password cipher zdy123#R5配置
[ISP]aaa
[ISP-aaa]local-user zhangdaye password cipher zdy123
Info: Add a new user.	
[ISP-aaa]local-user zhangdaye service-type ppp
[ISP-aaa]int se3/0/1
[ISP-Serial3/0/1]ppp authentication-mode chap

R3与R5之间使用HDLC封装:

#R5
[ISP]int se4/0/0
[ISP-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y#R3
[R3]int se4/0/0	
[R3-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配置
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.2.1 24
[R1-Tunnel0/0/0]tu	
[R1-Tunnel0/0/0]tunnel-protocol g	
[R1-Tunnel0/0/0]tunnel-protocol gre p2	
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/0]sou	
[R1-Tunnel0/0/0]source 15.1.1.1
Mar 31 2024 11:26:15-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]
[R1-Tunnel0/0/0]nh	
[R1-Tunnel0/0/0]nhrp ne	
[R1-Tunnel0/0/0]nhrp network-id 100#R2配置
[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	
[R2-Tunnel0/0/0]nhrp network-id 100#R3配置
[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
[R3-Tunnel0/0/0]nhrp network-id 100nhrp伪广播:
[R1-Tunnel0/0/0]nhrp entry multicast dynamic #注册从分支到中心站点
[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register 
[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register 

nhrp伪广播:

[R1-Tunnel0/0/0]nhrp entry multicast dynamic 

R1、R4间为点到点的GRE:

#R1配置
[R1]int t0/0/1
[R1-Tunnel0/0/1]ip add 10.1.1.1 24	
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]destination 45.1.1.4
[R1-Tunnel0/0/1]q#R4配置
[R4]int t0/0/1
[R4-Tunnel0/0/1]ip add 10.1.1.4 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 45.1.1.4
[R4-Tunnel0/0/1]destination 15.1.1.1

RIP v2配置

#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.0.0.0#R2配置
[R2]rip 1
[R2-rip-1]undo summary 
[R2-rip-1]v 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 10.0.0.0#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#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#关闭rip水平切割
[R1]undo rip split-horizon 
[R2]undo rip split-horizon 
[R3]undo rip split-horizon 

所有PC设置私有IP为源IP,可以访问R5环回,达到全网通

#配置easy IP
#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 se4/0/0
[R1-Serial4/0/0]nat outbound 2000#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]nat o	
[R2]int se4/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 se4/0/0
[R3-Serial4/0/0]nat outbound 2000#R4配置
[R4]acl 2000
[R4-acl-basic-2000]ru	
[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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/789079.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

MQ消息队列详解以及MQ重复消费问题

MQ消息队列详解以及MQ重复消费问题 1、解耦2、异步调用3、流量削峰4、MQ重复消费问题&#xff0c;以及怎么解决&#xff1f;4.1、重复消费产生4.2、解决方法&#xff1a; https://blog.csdn.net/qq_44240587/article/details/104630567 核心的就是&#xff1a;解耦、异步、削锋…

当面试官问你插入排序算法,你敢说自己会吗?

算法学习的重要性 在程序员的世界里&#xff0c;算法就如同一座桥梁&#xff0c;连接着问题与解决方案&#xff0c;是实现优秀程序的关键。 掌握算法&#xff0c;就能够在面对各种问题时&#xff0c;找到最合适的解决方法&#xff0c;以最少的时间和空间&#xff0c;实现最优的…

解析基础设施即代码:重新定义云管理

由于现代架构、应用程序接口和相互关联的服务之间的互联性越来越强&#xff0c;云基础设施的复杂性也与日俱增。随着需要管理的云资源数量不断增加&#xff0c;企业开始采用基础设施即代码&#xff08;IaC&#xff09;来解决云应用的复杂性和相互依赖性问题。 IaC 提供各种工具…

《深入探索 Netty 框架:构建高效稳定的网络应用》

大家好&#xff0c;今天我将为大家深入介绍 Netty 框架&#xff0c;并分享一些基于 Java 实现的代码示例。 Netty 是一个非常强大的网络框架&#xff0c;它提供了一种高效、可靠的方式来构建网络应用程序。它具有以下优点&#xff1a; 高性能&#xff1a;通过优化的 IO 处理和线…

波长可调激光器中的增益芯片和SOA

----翻译自SATO Kenji&#xff0c;ZHANG Xiaobo于2019年发表的文章 摘要&#xff1a; 本文讨论了用于波长可调激光器&#xff08;TL&#xff09;的半导体光放大器&#xff08;SOA&#xff09;和增益芯片的设计规则。即与常规SOA或激光器相似&#xff0c;也有一些不同之处。位…

酷开科技不断深耕智能电视领域,用酷开系统带给消费者更多可能性

在这个网络快速发展的时代&#xff0c;电视行业也发生了巨大变革。与以往单纯的“看”电视不同&#xff0c;人们不再满足于现有的状态&#xff0c;消费者对电视娱乐的追求更加丰富&#xff0c;这也就带给智能电视产业无限的发展可能。酷开科技瞄准这一产业趋势&#xff0c;不断…

家庭影院触摸屏中应用的电容式触摸芯片

家庭影院的主要组成部分包括显示设备、音响设备、信号源和接线设备等。其中&#xff0c;显示设备通常采用高清电视或投影仪&#xff0c;音响设备包括功放、音箱、低音炮等&#xff0c;信号源可以是蓝光光盘、游戏机、有线电视、网络电视等多种媒体设备。 家庭影院的影像信号通…

[C#]winform使用OpenCvSharp实现透视变换功能支持自定义选位置和删除位置

【透视变换基本原理】 OpenCvSharp 是一个.NET环境下对OpenCV原生库的封装&#xff0c;它提供了大量的计算机视觉和图像处理的功能。要使用OpenCvSharp实现透视变换&#xff08;Perspective Transformation&#xff09;&#xff0c;你首先需要理解透视变换的原理和它在图像处理…

vulhub打靶记录——healthcare

文章目录 主机发现端口扫描FTP—21search ProPFTd EXPFTP 匿名用户登录 web服务—80目录扫描search openemr exp登录openEMR 后台 提权总结 主机发现 使用nmap扫描局域网内存活的主机&#xff0c;命令如下&#xff1a; netdiscover -i eth0 -r 192.168.151.0/24192.168.151.1…

适配器模式:桥接不兼容的接口

在软件开发中&#xff0c;我们经常会遇到需要将现有的类与新的系统或客户端集成的情况&#xff0c;但这些类可能因为接口不兼容而无法直接使用。适配器模式&#xff08;Adapter Pattern&#xff09;是一种结构型设计模式&#xff0c;它允许不兼容的接口之间能够相互协作&#x…

css预编译sass,css也可以变得优雅

1. 嵌套选择器 #content {article {h1 { color: #333 }p { margin-bottom: 1.4em }}aside { background-color: #EEE } }编译后 #content article h1 { color: #333 } #content article p { margin-bottom: 1.4em } #content aside { background-color: #EEE }2. 变量声明和使…

力扣贪心算法--第一天

前言 今天是贪心算法的第一天&#xff0c;算法之路重新开始&#xff01; 内容 之前没了解过贪心算法。 什么是贪心 贪心的本质是选择每一阶段的局部最优&#xff0c;从而达到全局最优。难点就是如何通过局部最优&#xff0c;推出整体最优。 一、455.分发饼干 假设你是一…

题目:学习static定义静态变量的用法

题目&#xff1a;学习static定义静态变量的用法    There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence. The blog content is all parallel goods. Those who are worried about being cheate…

JS中的运算符

1.&& 逻辑与 &&会从左到右执行表达式&#xff0c;直到某个表达式的运行结果返回false,如果全部为true,则返回最后一个中表达式的执行结果 console.log(1 && 2) // 2 console.log(1&&10&&15) // 15 console.log(1&&0&&am…

Android的图片加载框架

Android的图片加载框架 为什么要使用图片加载框架&#xff1f;图片加载框架1. Universal Image Loader [https://github.com/nostra13/Android-Universal-Image-Loader](https://github.com/nostra13/Android-Universal-Image-Loader)2. Glide [https://muyangmin.github.io/gl…

每日一题 --- 用栈实现队列[力扣][Go]

用栈实现队列 题目&#xff1a;用栈实现队列 请你仅使用两个栈实现先入先出队列。队列应当支持一般队列支持的所有操作&#xff08;push、pop、peek、empty&#xff09;&#xff1a; 实现 MyQueue 类&#xff1a; void push(int x) 将元素 x 推到队列的末尾int pop() 从队列…

MySQL的多层SP中Cursor的m_max_cursor_index相关BUG分析

源码分析丨MySQL的多层SP中Cursor相关BUG 一、问题发现 在一次开发中在sp中使用多层cursor的时候想知道每层的m_max_cursor_index值分别是多少&#xff0c;以用来做后续开发。于是做了以下的试验&#xff0c;但是发现第一个level2那层的m_max_cursor_index的值有点问题。 注&…

威胁建模与网络安全测试方法

文章目录 1.软件安全的开发背景1.1软件发展与安全问题系统软件问题应用软件问题第三方代码安全新技术安全1.2 软件安全问题产生的原因1.3 漏洞修复的成本运行阶段发布阶段测试阶段研发阶段2.常见的软件安全开发方法2.1 开发方法2.2 什么是SDL2.3 微软SDL发展历史2.4 微软SDL安全…

CentOS 7上安装Docker和Docker-Compose的步骤

在本文中&#xff0c;我们将详细介绍如何在CentOS 7上安装Docker Community Edition (CE) 和 Docker Compose。Docker是一个开放源码的应用容器引擎&#xff0c;允许开发者打包他们的应用及其依赖包到一个可移植的容器中&#xff0c;然后发布到任何流行的Linux机器上&#xff0…

基于SpringBoot和Vue的房产销售系统的设计与实现

今天要和大家聊的是一款基于SpringBoot和Vue的房产销售系统的设计与实现 &#xff01;&#xff01;&#xff01; 有需要的小伙伴可以通过文章末尾名片咨询我哦&#xff01;&#xff01;&#xff01; &#x1f495;&#x1f495;作者&#xff1a;李同学 &#x1f495;&#x1f…