hcip的重发布实验(2)

news2024/9/27 12:14:18

题目

在这里插入图片描述

拓扑图

在这里插入图片描述

IP地址和环回的配置

R1

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]int l0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
Aug  9 2023 10:38:48-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 13.1.1.1 24
Aug  9 2023 10:39:00-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]q
[r1]

R2

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

R3

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-LoopBack0]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 13.1.1.2 24
Aug  9 2023 10:40:10-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]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[r3-GigabitEthernet0/0/1]
Aug  9 2023 10:40:26-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]q
[r3]

R4

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4
[r4]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4-LoopBack0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.1 24
Aug  9 2023 10:40:54-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]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 24.1.1.2 24
[r4-GigabitEthernet0/0/1]
Aug  9 2023 10:41:08-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 45.1.1.1 24
[r4-GigabitEthernet0/0/2]
Aug  9 2023 10:41:24-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]q
[r4]

R5

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]int l0
[r5-LoopBack0]ip add 5.5.5.5 24
[r5-LoopBack0]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.2 24
Aug  9 2023 10:41:58-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]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 56.1.1.1 24
Aug  9 2023 10:42:08-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]q
[r5]

R6

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]int l0
[r6-LoopBack0]ip add 6.6.6.6 24
[r6-LoopBack0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 56.1.1.2 24
Aug  9 2023 10:42:41-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]: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 67.1.1.1 24
Aug  9 2023 10:42:51-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r6-GigabitEthernet0/0/1]q
[r6]

R7

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r7
[r7]int l0
[r7-LoopBack0]ip add 7.7.7.7 24
[r7-LoopBack0]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 67.1.1.2 24
Aug  9 2023 10:43:21-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r7-GigabitEthernet0/0/0]q
[r7]

宣告

R1

[r1]
[r1]rip 1
[r1-rip-1]vers	
[r1-rip-1]version 2
[r1-rip-1]net	
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 13.0.0.0
[r1-rip-1]

R2

[r2]rip 1
[r2-rip-1]vers	
[r2-rip-1]version 2
[r2-rip-1]net	
[r2-rip-1]network 2.0.0.0
[r2-rip-1]network 12.0.0.0
[r2-rip-1]q
[r2]ospf 1 rou	
[r2]ospf 1 router-id 2.2.2.2 
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net	
[r2-ospf-1-area-0.0.0.0]network 24.1.1.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]

R3

[r3]rip 1
[r3-rip-1]vers	
[r3-rip-1]version 2
[r3-rip-1]net	
[r3-rip-1]network 13.0.0.0
[r3-rip-1]q
[r3]ospf 1 rou	
[r3]ospf 1 router-id 3.3.3.3
[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 34.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]

R4

[r4]ospf 1 rou	
[r4]ospf 1 router-id 4.4.4.4
[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 24.1.1.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255

R5

[r5]ospf 1 rou	
[r5]ospf 1 router-id 5.5.5.5
[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 45.1.1.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.255

R6

[r6]ospf 1 rou	
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]net	
[r6-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.255
[r6-ospf-1-area-0.0.0.0]network 67.1.1.0 0.0.0.255
[r6-ospf-1-area-0.0.0.0]net	
[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0

R7

[r7]ospf 1
[r7-ospf-1]q
[r7]ospf 1 rou	
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]net	
[r7-ospf-1-area-0.0.0.0]network 67.1.1.0 0.0.0.255
[r7-ospf-1-area-0.0.0.0]

重发布

先重发布R7的环回,再在R2和R3上重发布

R7

[r7-ospf-1]im	
[r7-ospf-1]import-route dir	
[r7-ospf-1]import-route direct 
[r7-ospf-1]

R2

[r2]ospf 1
[r2-ospf-1]im	
[r2-ospf-1]import-route rip 1
[r2-ospf-1]q
[r2]rip 1
[r2-rip-1]im	
[r2-rip-1]import-route ospf 1
[r2-rip-1]

R3

[r3]ospf 1
[r3-ospf-1]im	
[r3-ospf-1]import-route rip 1
[r3-ospf-1]
[r3-ospf-1]q
[r3]rip 1
[r3-rip-1]im	
[r3-rip-1]import-route ospf 1
[r3-rip-1]

查看R1和R4的路由表

R1

在这里插入图片描述
发现3环回的掩码不同,修改接口工作方式

[r3]int l0
[r3-LoopBack0]ospf net	
[r3-LoopBack0]ospf network-type br	
[r3-LoopBack0]ospf network-type broadcast 
[r3-LoopBack0]

更改过后掩码统一变为 24位
在这里插入图片描述

R4

在这里插入图片描述
检验,用R1去ping各个环回
发现只有R7的环回ping不通
在这里插入图片描述
经分析,发现因为R2和R3的双向重发布,使得 R1 ping R7的环回 时,产生了环路,所以到不了R7的环回

解决ping不通R7环回问题

R2

[r2]acl 2000
[r2-acl-basic-2000]rule permit source 7.7.7.0 0
[r2]route-policy a permit node 10
[r2-route-policy]if-match acl 2000
[r2-route-policy]apply preference 151
[r2-route-policy]q
[r2]rip 1
[r2-rip-1]preference route-policy a

R3

[r3]route-policy a permit node 10
[r3-route-policy]apply preference 151
[r2-route-policy]q
[r3]rip 1
[r3-rip-1]preference route-policy a

检验:

在这里插入图片描述

可以ping通了

最佳选路

R2

[r2]acl 2001
[r2-acl-basic-2001]rule per	
[r2-acl-basic-2001]rule permit sou	
[r2-acl-basic-2001]rule permit source 3.3.3.3 0
[r2-acl-basic-2001]rule permit source 34.1.1.0 0.0.0.255
[r2-acl-basic-2001]q
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]rip me	
[r2-GigabitEthernet0/0/1]rip metricout 2001 2
[r2-GigabitEthernet0/0/1]q
[r2]ip ip-	
[r2]ip ip-prefix c per	
[r2]ip ip-prefix c permit 12.1.1.0 24
[r2]ip ip-prefix c permit 2.2.2.0 24
[r2]rou	
[r2]route
[r2]route-policy o per	
[r2]route-policy o permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-	
[r2-route-policy]if-match ip-	
[r2-route-policy]if-match ip-prefix c
[r2-route-policy]app	
[r2-route-policy]apply cost-	
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]rou	
[r2]route
[r2]route-policy o permit node 20
Info: New Sequence of this List.
[r2-route-policy]ospf 1
[r2-ospf-1]im	
[r2-ospf-1]import-route rip rou	
[r2-ospf-1]import-route rip route-policy o
[r2-ospf-1]

R3

[r3]acl 2001
[r3-acl-basic-2001]rule per	
[r3-acl-basic-2001]rule permit sou	
[r3-acl-basic-2001]rule permit source 24.1.1.0 0.0.0.255
[r3-acl-basic-2001]int g0/0/0
[r3-GigabitEthernet0/0/0]rip me	
[r3-GigabitEthernet0/0/0]rip metricout 2001 2
[r3-GigabitEthernet0/0/0]q
[r3]ip ip-	
[r3]ip ip-prefix c per	
[r3]ip ip-prefix c permit 13.1.1.0 24
[r3]rou	
[r3]route
[r3]route-policy o per	
[r3]route-policy o permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-	
[r3-route-policy]if-match ip-	
[r3-route-policy]if-match ip-prefix c
[r3-route-policy]app	
[r3-route-policy]apply cost-	
[r3-route-policy]apply cost-type type-1
[r3-route-policy]apply cost-type type-2
[r3-route-policy]undo apply cost-type type-1
                                      ^
Error:Too many parameters found at '^' position.
[r3-route-policy]q
[r3]route-policy o permit node 20
Info: New Sequence of this List.
[r3-route-policy]q
[r3]ospf 1
[r3-ospf-1]im	
[r3-ospf-1]import-route rip 1 rou	
[r3-ospf-1]import-route rip 1 route-policy o
[r3-ospf-1]q
[r3]rou	
[r3]route
[r3]route-policy h per	
[r3]route-policy h permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-	
[r3-route-policy]if-match ip-	
[r3-route-policy]if-match ip-prefix c
[r3-route-policy]app	
[r3-route-policy]apply cost-type type-1
[r3-route-policy]q
[r3]route-policy h permit node 20
Info: New Sequence of this List.
[r3-route-policy]ospf 1
[r3-ospf-1]import-	
[r3-ospf-1]import-route rip 1 rou	
[r3-ospf-1]import-route rip 1 route-policy h
[r3-ospf-1]

检验:

R1的环回也能ping通其他的环回
在这里插入图片描述
查看R1的路径
在这里插入图片描述

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

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

相关文章

文件上传漏洞(webshell)和文件包含漏洞

一、防护 1、防护 1、判断文件后缀&#xff0c;为图片的话才让上传成功。 2、解析文件内容&#xff08;文件幻数&#xff09;判断文件头和文件尾部是否一致 幻数 常见的 3、隐藏按钮&#xff08;带上code唯一值&#xff09; 4、二次渲染&#xff08;类似拿着你的图片&#xff…

最大子数组和【力扣53】

一、解题思路 Max[i]表示&#xff1a;以nums[i]为开头的所有连续子数组和的最大值。 由此可以推出Max[i-1]和Max[i]的关系&#xff1a; 若Max[i]>0&#xff1a;Max[i-1]nums[i-1]Max[i]&#xff1b; 否则&#xff1a;Max[i-1]nums[i-1]&#xff1b; 则ansMAX&#xff0…

Mr. Cappuccino的第59杯咖啡——简单手写SpringIOC框架

简单手写SpringIOC框架 环境搭建基于XML方式项目结构项目代码运行结果 基于注解方式项目结构项目代码运行结果 简单手写SpringIOC框架核心原理基于XML方式原理项目结构项目代码运行结果 基于注解方式原理项目结构项目代码运行结果 环境搭建 基于XML方式 项目结构 项目代码 p…

何时使用MongoDB而不是MySql

什么是 MySQL 和 MongoDB MySQL 和 MongoDB 是两个可用于存储和管理数据的数据库管理系统。MySQL 是一个关系数据库系统&#xff0c;以结构化表格格式存储数据。相比之下&#xff0c;MongoDB 以更灵活的格式将数据存储为 JSON 文档。两者都提供性能和可扩展性&#xff0c;但它…

CGI, FastCGI, WSGI, uWSGI, uwsgi分别是什么?

CGI 1、通用网关接口&#xff08;Common Gateway Interface/CGI&#xff09;,CGI描述了服务器&#xff08;nginx,apache&#xff09;和请求处理程序&#xff08;django,flask,springboot web框架&#xff09;之间传输数据的一种标准. 2.所有bs架构软件都是遵循CGI协议的 3.一…

day10 快速排序 方法重载 和 方法递推

方法重载 斐波拉契数列问题 使用重载思想解决 public static int method(int n){if (n 2 ){return 1 ;}return (n-1)*2method(n-1);}public static int f(int n){if (n 1){return 1;}if (n 2){return 2;}return f(n-1)f(n-2);} 快速排序 思维很简单&#xff0c;类似二…

selenium获取b站视频标题

一、下载selenium 1. 下载对应版本的浏览器驱动 2. 安装selenium 3.把浏览器驱动放到使用的python内核的script目录中 二、测试效果模拟登录b站 from selenium import webdriver from selenium.webdriver.common.by import By import timebrowser webdriver.Chrome() # 打…

使用MyBatis操作数据库

hi,大家好,今天为大家带来MyBatis操作数据库的知识 文章目录 &#x1f437;1.根据MyBatis操作数据库&#x1f9ca;1.1查询操作&#x1f347;1.1.1无参查询&#x1f347;1.1.2有参查询 &#x1f9ca;1.2删除操作&#x1f9ca;1.3修改操作&#x1f9ca;1.4增加操作&#x1f9ca;…

quill 富文本编辑器 @提及

使用插件quill-mention&#xff0c;实现在quill 富文本编辑器使用或#提及用户。 1. 安装 npm install quill-mention --save2. 官方给的示例quill-mention import "quill-mention";const atValues [{ id: 1, value: "Fredrik Sundqvist" },{ id: 2, va…

产线信息化、智能化|汽车座椅产线中的RFID技术方案

引言 在今天的快速发展的制造业中&#xff0c;信息化和智能化已经成为不可或缺的部分。信息化和智能化能够极大地提高生产效率、减少浪费&#xff0c;降低成本&#xff0c;提升产品的质量。汽车座椅产线信息化和智能化是汽车座椅产线升级的重要方向&#xff0c;RFID技术方案在…

大多数单片机程序采用全局变量的形式是为什么呢?

内存占用的可预测性&#xff1a;在单片机程序中&#xff0c;可预测的内存占用是很重要的因素。静态分配可以在编译过程中确定所需的内存&#xff0c;并且分配过程在程序启动之前就已完成。这使得静态分配成为单片机程序的理想选择。栈空间的限制和风险&#xff1a;栈分配具有一…

嘉楠勘智k230开发板上手记录(四)--HHB神经网络模型部署工具

按照K230_AI实战_HHB神经网络模型部署工具.md&#xff0c;HHB文档&#xff0c;RISC-V 编译器和模拟器安装来 一、环境 1. 拉取docker 镜像然后创建docker容器并进入容器 docker pull hhb4tools/hhb:2.4.5 docker run -itd --namehhb2_4 -p 22 "hhb4tools/hhb:2.4.5"…

主调函数与被调函数之间的数据传递

在调用函数时&#xff0c;大多数情况下&#xff0c;主调函数都需要将有关数据传递给被调函数。这就是有参函数。在定义函数时指定的用来接收从主调函数传递过来的值的变量称为形参变量&#xff0c;简称形参&#xff0c;在主调函数的调用函数表达式中&#xff0c;函数名后面圆括…

Zabbix自动注册服务器及部署代理服务器

文章目录 一.zabbix自动注册1.什么是自动注册2.环境准备3.zabbix客户端配置4.在 Web 页面配置自动注册5.验证自动注册 二.部署 zabbix 代理服务器1.分布式监控的作用&#xff1a;2.环境部署3.代理服务器配置4.客户端配置5.web页面配置5.1 删除原来配置5.2 添加代理5.3 创建主机…

在x86下运行的Ubuntu系统上部署QEMU用于模拟RISC-V硬件系统

1.配置工作环境 sudo apt install gcc bison flex libncurses-dev ninja-build \pkg-config build-essential zlib1g-dev pkg-config libglib2.0-dev \binutils-dev libboost-all-dev autoconf libtool libssl-dev \libpixman-1-dev python-capstone virtualenv software-prop…

冶金作业VR虚拟仿真厂家

对于高风险行业来说&#xff0c;开展安全教育培训是企业的重点工作&#xff0c;传统培训逐渐跟不上时代变化和工人需求&#xff0c;冶金安全VR模拟仿真培训系统作为一种新型的教育和培训工具&#xff0c;借助VR虚拟现实技术为冶金行业的工人提供一个安全、高效的培训环境。 冶金…

看看这个硬盘备份方法,简单又好用!

为什么需要备份硬盘数据&#xff1f; 使用计算机的过程中&#xff0c;我们可能偶尔会遭遇各类挑战&#xff0c;如系统崩溃&#xff0c;病毒侵袭&#xff0c;硬盘坏扇区等等。这些问题都有可能引发数据丢失&#xff0c;甚至更严重的情况&#xff0c;使得计算机无法正常开机。…

总结 进程调度的基本过程

一.进程管理 一个运行起来的程序就是进程&#xff0c;点开一个软件的.exe可执行文件&#xff0c;这个程序就跑起来就产生了一个进程。我们可以打开任务管理器 - 首页进程&#xff0c;可以看到3个正在使用的应用&#xff0c;还有71个后台进程。 对于多进程,需要进行管理。进程管…

个推数据驱动运营增长城市巡回沙龙首发北京站

如今很多互联网企业正在加速数智化升级&#xff0c;希望通过运用数据以实现降本提效和运营增长。为帮助更多伙伴在工作中“用好”数据&#xff0c;提升运营效率与效果&#xff1b;同时和更多对用户运营感兴趣的伙伴&#xff0c;共创、共享数智运营实践成果&#xff0c;个推重磅…

学习系统编程终章【多线程剩余知识】

引言&#xff1a; 北京时间&#xff1a;2023/8/3/19:21&#xff0c;刚刚将文章更新&#xff0c;是近期以来为数不多的一次早更&#xff0c;不然每次更文都要卡在12点左右&#xff0c;这是我们实现日更的一个好开端&#xff0c;再接再厉实现日更不是梦。最近失眠一直困扰着我&a…