hcip的重发布实验(1)

题目

在这里插入图片描述

拓扑图

在这里插入图片描述

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 8 2023 21:28:29-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 14.1.1.1 24
[r1-GigabitEthernet0/0/1]
Aug 8 2023 21:28:42-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]

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/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
Aug 8 2023 21:29:14-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]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
Aug 8 2023 21:29:26-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]

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 23.1.1.2 24
Aug 8 2023 21:29:54-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.1 24
Aug 8 2023 21:30:05-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]

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.2 24
Aug 8 2023 21:30:36-08:00 Huawei %%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 14.1.1.2 24
[r4-GigabitEthernet0/0/1]
Aug 8 2023 21:30:46-08:00 Huawei %%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]

配置RIP和OSPF并且实现重分布

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 12.0.0.0
[r2-rip-1]network 2.0.0.0
[r2-rip-1]q
[r2]ospf 1 rou
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]net
[r2-ospf-1-area-0.0.0.1]network 23.1.1.0 0.0.0.255
[r2-ospf-1-area-0.0.0.1]q
[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]q

R3

[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 23.1.1.0 0.0.0.255
[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]network 3.3.3.3 0.0.0.0

R4

[r4]rip 1
[r4-rip-1]vers
[r4-rip-1]version 2
[r4-rip-1]net
[r4-rip-1]network 14.0.0.0
[r4-rip-1]q
[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 34.1.1.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]im
[Huawei-ospf-1]import-route rip 1
[Huawei-ospf-1]q
[Huawei]rip 1
[Huawei-rip-1]im
[Huawei-rip-1]import-route ospf 1
[Huawei-rip-1]

查看R4的路由表

将掩码都改为24
在这里插入图片描述

R2

[r2]int l0
[r2-LoopBack0]ospf network-type broadcast

R4

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

OSPF向RIP的重分布

在R2出口处,抓取4.4.4.0和34.1.1.0,然后加大其度量,使R1走最佳路径

R2

[r2]ip ip-
[r2]ip ip-prefix c permit 4.4.4.0 24
[r2]ip ip-prefix c permit 34.1.1.0 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]rip met
[r2-GigabitEthernet0/0/0]rip metricout ip-
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix c 3

在这里插入图片描述

在R4出口处,抓取23.1.1.0,然后加大其度量,使R3走最佳路径

R4

[r4]ip ip-
[r4]ip ip-prefix c per
[r4]ip ip-prefix c permit 23.1.1.0 24
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]rip met
[r4-GigabitEthernet0/0/1]rip metricout ip-
[r4-GigabitEthernet0/0/1]rip metricout ip-prefix c 3
[r4-GigabitEthernet0/0/1]

在这里插入图片描述

RIP向OSPF的重分布

在R2处抓取2.2.2.0 和 12.1.1.0 将其类型改为1类,优于2类,能优先选取该路径

R2

[r2]ip ip-
[r2]ip ip-prefix chs per
[r2]ip ip-prefix chs permit 2.2.2.0 24
[r2]ip ip-prefix chs permit 12.1.1.0 24
[r2]rou
[r2]route
[r2]route-policy hs per
[r2]route-policy hs 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 chs
[r2-route-policy]app
[r2-route-policy]apply cost-
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]route-policy hs permit node 20
Info: New Sequence of this List.
[r2-route-policy]q
[r2]ospf 1
[r2-ospf-1]im
[r2-ospf-1]import-route rip 1 rou
[r2-ospf-1]import-route rip 1 route-policy hs
[r2-ospf-1]

在R4处抓取14.1.1.0 将其类型改为1类,优于2类,能优先选取该路径

R4

[r4]ip ip-
[r4]ip ip-prefix chs per
[r4]ip ip-prefix chs permit 14.1.1.0 24
[r4]rou
[r4]route
[r4]route-policy hs per
[r4]route-policy hs permit node 10
Info: New Sequence of this List.
[r4-route-policy]if-
[r4-route-policy]if-match ip-
[r4-route-policy]if-match ip-prefix chs
[r4-route-policy]app
[r4-route-policy]apply cos
[r4-route-policy]apply cost
[r4-route-policy]apply cost-type type-1
[r4-route-policy]q
[r4]route-policy hs permit node 20
Info: New Sequence of this List.
[r4-route-policy]q
[r4]ospf 1
[r4-ospf-1]im
[r4-ospf-1]import-route rip 1 rou
[r4-ospf-1]import-route rip 1 route-policy hs
[r4-ospf-1]

在这里插入图片描述
查看R3选路
在这里插入图片描述
查看R1选路
在这里插入图片描述
实验完成
注:最重要的是思路清晰,识别最佳路径,然后根据加度量或改类型等等,让其选择最佳路径。

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

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

相关文章

mysql的高级查询语句

目录 一、本文前言 二、高效查询方式 1&#xff09;指定指字段进行查看 2&#xff09;对字段进行去重查看 3&#xff09;where条件查询 4&#xff09;and 和 or 进行逻辑关系的增加 5&#xff09;查询取值列表中的数据 6&#xff09;between的引用 7&#xff09;like…

Windows实现开机自启软件

1.复制软件的快捷方式 2.winr 打开 运行 。输入 shell::startup &#xff0c;回车。 3.粘贴快捷方式

C/C++面试总结

一、关键字static、const、extern、volatile作用 1、const 1.修饰常量 用const修饰的变量是不可变的&#xff0c;修饰后的变量只能使用&#xff0c;不能修改。 2.修饰指针 如果const位于*的左侧&#xff0c;eg&#xff1a;const int* a&#xff0c;则const就是用来修饰指针…

C++三个线程依次打印abc

代码 #include<iostream> #include<thread> #include<mutex> #include<condition_variable> using namespace std; mutex mtx; condition_variable cv; int flag0; void A(){unique_lock<mutex>lk(mtx);int count0;while(count<10){while(fl…

系统集成项目成本管理

在项目中&#xff0c;成本是指项目活动或其组成部分的货币价值或价格&#xff0c;包括为实施、完成或创造该活动或其组成部分所需资源的货币价值。具体的成本一般包括直接工时、其他百接费用、间接工时、其他间接费用以及采购价格。 项目全过程所耗用的各种成本的总和为项目成本…

Linux安装配置nginx+php搭建以及在docker中配置

Linux安装配置nginxphp搭建以及在docker中配置 文章目录 Linux安装配置nginxphp搭建以及在docker中配置1.nginx源码包编译环境和安装相应的依赖1.1 安装编译环境1.2 安装pcre库、zlib库和openssl库 2.安装nginx2.1 在[nginx官网](https://nginx.org/en/download.html)上获取源码…

如何使用Word转PDF转换器在线工具?在线Word转PDF使用方法

Word转PDF转换器在线&#xff0c;是一种方便快捷的工具&#xff0c;可帮助您在不需要下载任何软件的情况下完成此任务。无论您是需要在工作中共享文档&#xff0c;还是将文件以PDF格式保存以确保格式不变&#xff0c;都可以依靠这款在线工具轻松完成转换。那么如何使用Word转PD…

深度学习实战46-基于CNN的遥感卫星地图智能分类,模型训练与预测

大家好,我是微学AI,今天给大家介绍一下深度学习实战46-基于CNN的遥感卫星地图智能分类,模型训练与预测。随着遥感技术和卫星图像获取能力的快速发展,卫星图像分类任务成为了计算机视觉研究中一个重要的挑战。为了促进这一领域的研究进展,EuroSAT数据集应运而生。本文将详细…

K8S系列文章之 离线安装自动化工具Ansible

参考 文档 离线安装 Ansible - DevOps - dbaselife 一、Ansible简介 Ansible是一款开源的IT配置管理工具&#xff0c;常被IT界的小伙伴们用于自动化的场景&#xff0c;多用在服务部署、配置管理方面。配置文件采用最常见的yaml格式&#xff0c;学习起来也是比较容易&#xff…

刚刚更新win11,记事本消失怎么处理?你需要注意些什么?

记录window11的bug hello&#xff0c;我是小索奇 昨天索奇从window10更新到了window11&#xff0c;由于版本不兼容卸载了虚拟机&#xff0c;这是第一个令脑壳大的&#xff0c;算了&#xff0c;还是更新吧&#xff0c;了解了解win11的生态&#xff0c;后期重新装虚拟机 第一个可…

【PCIE】AER和DPC解释

AER&#xff08;Advanced Error Reporting&#xff09;和 DPC&#xff08;Downstream Port Containment&#xff09;是PCIe&#xff08;Peripheral Component Interconnect Express&#xff09;总线规范中定义的两种不同的错误处理机制&#xff0c;它们在PCIe架构中有一定的关联…

new function是什么?(小写function)

参考链接&#xff1a;https://juejin.cn/post/7006232342398238733