hcip的mgre和ospf实验

题目

在这里插入图片描述

拓扑图

在这里插入图片描述

一、配置环回和IP地址

R1

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 64.1.1.1 24
Aug 4 2023 18:56:07-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 14.1.1.1 24
Aug 4 2023 18:56:27-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]int lo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 24

R2

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 24.1.1.1 24
Aug 4 2023 18:56:56-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]int lo
[r2]int LoopBack 0
[r2-LoopBack0]ip add 2.2.2.2 24

R3

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
Aug 4 2023 18:57:15-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]q
[r3]int lo
[r3]int LoopBack 0
[r3-LoopBack0]ip add 3.3.3.3 24

R4

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 44.1.1.1 24
Aug 4 2023 18:57:38-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]q
[r4]int lo
[r4]int LoopBack 0
[r4-LoopBack0]ip add 4.4.4.4 24

R5

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 54.1.1.1 24
Aug 4 2023 18:58:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]q
[r5]int lo
[r5]int LoopBack 0
[r5-LoopBack0]ip add 5.5.5.5 24

R6

< Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]int g2/0/0
[r6-GigabitEthernet2/0/0]ip add 34.1.1.2 24
Aug 4 2023 18:58:28-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet2/0/0 has entered the UP state.
[r6-GigabitEthernet2/0/0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 14.1.1.2 24
Aug 4 2023 18:58:45-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 64.1.1.2 24
[r6-GigabitEthernet0/0/1]
Aug 4 2023 18:59:23-08:00 r6 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r6-GigabitEthernet0/0/1]int g0/0/2
[r6-GigabitEthernet0/0/2]ip add 24.1.1.2 24
[r6-GigabitEthernet0/0/2]
Aug 4 2023 18:59:35-08:00 r6 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r6-GigabitEthernet0/0/2]int g4/0/0
[r6-GigabitEthernet4/0/0]ip add 54.1.1.2 24
[r6-GigabitEthernet4/0/0]
Aug 4 2023 18:59:56-08:00 r6 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[r6-GigabitEthernet4/0/0]int g3/0/0
[r6-GigabitEthernet3/0/0]ip add 44.1.1.2 24
[r6-GigabitEthernet3/0/0]
Aug 4 2023 19:00:10-08:00 r6 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
on the interface GigabitEthernet3/0/0 has entered the UP state.
[r6]int lo
[r6]int LoopBack 0
[r6-LoopBack0]ip add 6.6.6.6 24

二、配置缺省

R1

[r1]ip rou
[r1]ip route
[r1]ip route-static 0.0.0.0 0 14.1.1.2
[r1]ip route-static 0.0.0.0 0 64.1.1.2

R2

[r2]ip rou
[r2]ip route
[r2]ip route-static 0.0.0.0 0 24.1.1.2

R3

[r3]ip rou
[r3]ip route
[r3]ip route-static 0.0.0.0 0 34.1.1.2

R4

[r4]ip rou
[r4]ip route
[r4]ip route-static 0.0.0.0 0 44.1.1.2

R5

[r5]ip rou
[r5]ip route
[r5]ip route-static 0.0.0.0 0 54.1.1.2

星型拓扑结构

R1

[r1]int tu
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24
[r1-Tunnel0/0/0]tun
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]sou
[r1-Tunnel0/0/0]source 14.1.1.1
Aug 4 2023 19:54:53-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]nhrp en
[r1-Tunnel0/0/0]nhrp entry mu
[r1-Tunnel0/0/0]nhrp entry multicast dy
[r1-Tunnel0/0/0]nhrp entry multicast dynamic

R2

[r2]int tun
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.4.2 24
[r2-Tunnel0/0/0]tun
[r2-Tunnel0/0/0]tunnel-protocol gre
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]sour
[r2-Tunnel0/0/0]source g0/0/0
Aug 4 2023 19:56:36-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]
[r2-Tunnel0/0/0]nh
[r2-Tunnel0/0/0]nhrp en
[r2-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r2-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r2-Tunnel0/0/0]

R3

[r3]int tun
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.3 24
[r3-Tunnel0/0/0]tun
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]s
[r3-Tunnel0/0/0]sou
[r3-Tunnel0/0/0]source g0/0/0
Aug 4 2023 19:58:08-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]
[r3-Tunnel0/0/0]nh
[r3-Tunnel0/0/0]nhrp en
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 re
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[r3-Tunnel0/0/0]

MGRE全连拓扑

R1

[r1]int tun
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.5.1 24
[r1-Tunnel0/0/1]tun
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]sou
[r1-Tunnel0/0/1]source 64.1.1.1
Aug 4 2023 21:49:24-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the DOWN state.
[r1-Tunnel0/0/1]
[r1-Tunnel0/0/1]
Aug 4 2023 21:49:24-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/1]nh
[r1-Tunnel0/0/1]nhrp en
[r1-Tunnel0/0/1]nhrp entry mu
[r1-Tunnel0/0/1]nhrp entry multicast dy
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nh
[r1-Tunnel0/0/1]nhrp en
[r1-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 re
[r1-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.5.3 54.1.1.1 register
[r1-Tunnel0/0/1]

R4

[r4]int tun
[r4]int Tunnel 0/0/1
[r4-Tunnel0/0/1]nh
[r4-Tunnel0/0/1]nhrp en
[r4-Tunnel0/0/1]ip add 192.168.5.2 24
[r4-Tunnel0/0/1]tun
[r4-Tunnel0/0/1]tunnel-protocol gre p2mp
[r4-Tunnel0/0/1]sou
[r4-Tunnel0/0/1]source 44.1.1.1
Aug 4 2023 21:53:12-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r4-Tunnel0/0/1]nhrp entry multicast dynamic
[r4-Tunnel0/0/1]nh
[r4-Tunnel0/0/1]nhrp en
[r4-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 re
[r4-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 register
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.
[r4-Tunnel0/0/1]nhrp entry 192.168.5.3 54.1.1.1 register
[r4-Tunnel0/0/1]

R5

[r5]
[r5]int tun
[r5]int Tunnel 0/0/1
[r5-Tunnel0/0/1]ip add 192.168.5.3 24
[r5-Tunnel0/0/1]tun
[r5-Tunnel0/0/1]tunnel-protocol gre p2mp
[r5-Tunnel0/0/1]sou
[r5-Tunnel0/0/1]source 54.1.1.1
Aug 4 2023 21:54:27-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/1]nhrp entry multicast dynamic
[r5-Tunnel0/0/1]nh
[r5-Tunnel0/0/1]nhrp en
[r5-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 re
[r5-Tunnel0/0/1]nhrp entry 192.168.5.1 64.1.1.1 register
[r5-Tunnel0/0/1]nhrp entry 192.168.5.2 44.1.1.1 register
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.
[r5-Tunnel0/0/1]

ospf配置

R1

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.5.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.4.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

R2

[r2]ospf 1 rou
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]ar
[r2-ospf-1]area 0
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]q
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ospf network-type broadcast
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0

R3

[r3]ospf 1 rou
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]ar
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.5.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.4.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]q
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ospf network-type broadcast
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ospf dr-priority 0

R4

[r4]ospf 1 rou
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]ar
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 192.168.5.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]q
[r4-ospf-1]q
[r4]int Tunnel 0/0/1
[r4-Tunnel0/0/1]ospf network-type broadcast

R5

[r5]ospf 1 rou
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]ar
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]net
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 192.168.5.3 0.0.0.0
[r5-ospf-1-area-0.0.0.0]q
[r5-ospf-1]q
[r5]int Tunnel 0/0/1
[r5-Tunnel0/0/1]ospf network-type broadcast

检验,用R1去ping R2,R3,R4,R5的环回,能ping通则成功
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
ping R6的环回也成功
在这里插入图片描述

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

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

相关文章

LinkedList和ArrayList有什么区别?

ArrayList和LinkedList的大致区别&#xff1a; ArrayList是实现了基于动态数组的数据结构&#xff0c;LinkedList基于链表的数据结构。 对于随机访问get和set&#xff0c;ArrayList觉得优于LinkedList&#xff0c;因为LinkedList要移动指针。 对于新增和删除操作add和remov…

vue页面布局

布局 用element-plus自带的布局&#xff1b; 左边菜单 用他的Menu 菜单、自带收缩和展开&#xff1b;数据可以接口获取或者写死&#xff1b; 使用的如下操作、把主题和默认打开的index存到缓存中 头部&#xff1b; 简单的先分成左右&#xff1b;再简单的分成左右 1、左…

高通滤波器,低通滤波器

1.高通滤波器是根据像素与邻近像素的亮度差值来提升该像素的亮度。 import cv2 import numpy as np from scipy import ndimagekernel_3_3 np.array([[-1,-1,-1],[-1,8,-1],[-1,-1,-1]]) print(kernel_3_3) kernel_5_5 np.array([[-1,-1,-1,-1,-1],[-1,1,2,1,-1],[-1,2,4,2,-…

FDM3D打印系列——超可动可变形机体打印

大家好&#xff0c;我是阿赵。继续来分享一下3D打印的成果。   这次打印的对象不得了&#xff0c;是超时空要塞系列的可变形VF战机。打印完这个模型&#xff0c;绝对是学习到了很多的东西&#xff0c;下面给大家分享一下。 一、成果展示&#xff1a; 不要怀疑&#xff0c;不…

Elasticsearch 商业启示

上月的“红帽事件”&#xff0c;说明开源软件的“客服模式”行不通&#xff0c;那么&#xff0c;开源软件如何赚钱呢&#xff1f;既不能卖软件&#xff0c;又不能卖支持服务&#xff0c;该怎么办呢&#xff1f;我现在的看法是&#xff0c;只剩下一种模式是可行的&#xff0c;开…

Java 监听Mysql binlog

使用 mysql-binlog-connector-java 1. mysql-binlog-connector-java 官网 2. Java代码中&#xff0c;如何监控Mysql的binlog&#xff1f; 前置条件 1. mysql服务器表结构 CREATE TABLE student (id int NOT NULL AUTO_INCREMENT,name varchar(255) CHARACTER SET utf8mb4 C…

HCIA-datacom数通题库和录播视频资料

HCIA-Datacom&#xff0c;是华为数通认证的初级考试&#xff0c;培训与认证具备数通基础通用知识和技能水平的工程师&#xff0c;只是入门了解数通的一些基础通用知识&#xff0c;适用于小白了解和学习数通知识点起点。 个人建议还是有必要考的&#xff0c;如果在企业考试考试…

Java自定义校验注解实现List、set集合字段唯一性校验

文章目录 一&#xff1a; 使用场景二&#xff1a; 定义FieldUniqueValid注解2.1 FieldUniqueValid2.2 注解说明2.3 Constraint 注解介绍2.4 FieldUniqueValid注解使用 三&#xff1a;自定义FieldUniqueValidator校验类3.1 实现ConstraintValidator3.2 重写initialize方法3.3 重…

mfc140.dll缺失怎么修复?教你下载安装mfc140.dll文件

mfc140.dll缺失要解决其实还是挺简单的&#xff0c;而且有非常的多的方法&#xff0c;只要你了解这个文件&#xff0c;那么你就能快速的修复mfc140.dll文件&#xff0c;其实所谓的修复就是mfc140.dll文件的下载安装&#xff0c;好了&#xff0c;废话不多少&#xff0c;一起来看…

Selenium入门详细教程+实例演示

目录 1.Selenium概述 1.1什么是Selenium 1.2Selenium的优势 1.3Selenium WebDriver原理 2.Selenium环境搭建 3.Selenium 简单示例 4.八大元素定位 4.1定位方式 4.2定位方式的用法 5.Selenium API 5.1WebDriver 常用 API 5.2WebElement 常用 API 5.3代码示例 6.元素等待机…

linux-MySQL的数据目录

总结&#xff1a; window中的my.ini linux 中 /etc/my.cnfwindow中的D:\soft\mysql-5.7.35-winx64\data linux 中 /var/lib/mysql 1.查找与mysql有关的目录 find / -name mysql [rootVM-4-6-centos etc]# find / -name mysql /opt/mysql /etc/selinux/targeted/tmp/modul…

【MySQL】使用C/C++连接MySQL数据库

【MySQL】使用C/C连接MySQL数据库 验证使用select特殊点 本文目的&#xff1a;使用MySQL提供的CAPI完成对数据库的操作 验证 #include <iostream> #include <mysql/mysql.h>int main() {std::cout<<"mysql cilent version: "<<mysql_get_cl…

Java8 文件工具类 FileUtils(持续更新中)

1. Java8 文件处理 使用 Java8 的 java.nio.file 方法&#xff0c;来进行文件处理。 1.1. 读文件 所有内容一次读出来&#xff0c;结果为字符串。 1.1.1. 代码 /*** 读取文件** param path 文件路径* return 文件内容&#xff08;字符串&#xff09;*/public static String…

基础篇:多线程所需知识:RAII接口模式对生产者和消费者封装以及多batch实现

我们先来弄一个最基础的infer类&#xff1a; class Infer{ public: bool load_model(const string &file){context_ file;return true;} void forward(){if(context_.empty()){printf("加载模型异常\n");return;}printf("使用%s进行推理\n " , contex…

【LNMP】LNMP

LNMP&#xff1a;是目前成熟的企业网站的应用模式之一&#xff0c;指的是一套协同工作的系统和相关软件&#xff1b;能够提供静态页面服务&#xff0c;也可以提供动态web服务 L Linux系统&#xff0c;操作系统N Nginx网站服务&#xff0c;前端&#xff0c;提供前端的静态…

Redis入门

0目录 1.Redis入门 2.Redis定义&#xff1b;特点及数据类型 3.Value为List类型 4.Value值类型为Set 5.Value值类型为Hash 6.Value值类型为Zset 1.Redis入门 Redis入门 解压包&#xff0c;运行redis-server.exe 安装可视化软件测试链接 命名测试链接 点击确定 2.Redis…

docker的使用

docker安装 https://docs.docker.com/engine/install/debian/ 设置国内镜像 创建或修改 /etc/docker/daemon.json 文件&#xff0c;修改为如下形式 {"registry-mirrors": ["https://registry.hub.docker.com","http://hub-mirror.c.163.com"…

【linux--->数据链路层协议】

文章目录 [TOC](文章目录) 一、数据链路层协议概念二、以太网帧格式1.字段分析 三、局域网通信原理四、ARP协议1.结构2.作用3.ARP通信过程4.ARP协议相关命令 五、局域网内中间人原理六、DNS系统(域名系统)1.域名概念2.DNS系统组成3.DNS协议3.浏览器输入域名后的通信过程4.dig工…

用html+javascript打造公文一键排版系统11:改进单一附件说明排版

一、用htmljavascript打造公文一键排版系统10中的一个bug 在 用htmljavascript打造公文一键排版系统10&#xff1a;单一附件说明排版 中&#xff0c;我们对附件说明的排版函数是&#xff1a; function setAtttDescFmt(p) {var t p;var a ;if (-1 ! t.indexOf(:))//是半角冒…

Leetcode-每日一题【剑指 Offer 10- I. 斐波那契数列】

题目 写一个函数&#xff0c;输入 n &#xff0c;求斐波那契&#xff08;Fibonacci&#xff09;数列的第 n 项&#xff08;即 F(N)&#xff09;。斐波那契数列的定义如下&#xff1a; F(0) 0, F(1) 1 F(N) F(N - 1) F(N - 2), 其中 N > 1. 斐波那契数列由 0 和 1 开…