eNSP-路由引入与过滤简单配置

目录

实验要求

IP配置

配置动态路由协议

RIP

OSPF

查看建邻情况

双向重发布

路由过滤

 地址前缀列表

静默接口


实验要求

1、按照图示配置 IP 地址,R1,R3,R4 上使用 loopback 口模拟业务网段
2、R1 和R2 运行 RIPv2,R2,R3和R4运行 oSPF,各自协议内部互通
3、在 RIP 和 oSPF 间配置双向路由引入,要求除 R4 上的业务网段以外,其他业务网段路由都引入到对方协议内部
4、使用路由过滤,使 R4 无法学习到 R1的业务网段路由,要求使用 prefix-list 进行匹配
5、0SPF 区域中不能出现 RIP 协议报文

IP配置

R1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[R1-GigabitEthernet0/0/0]
Apr 22 2024 19:33:49-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 l0
[R1-LoopBack0]ip add 192.168.0.1 32
[R1-LoopBack0]int l1
[R1-LoopBack1]ip add 192.168.1.1 32
[R1-LoopBack1]q
[R1]dis ip int b 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              100.1.1.1/24         up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.0.1/32       up         up(s)     
LoopBack1                         192.168.1.1/32       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R1]

R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[R2-GigabitEthernet0/0/0]
Apr 22 2024 19:35:32-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 100.2.2.2 24
Apr 22 2024 19:35:50-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]q
[R2]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              100.1.1.2/24         up         up        
GigabitEthernet0/0/1              100.2.2.2/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[R2]

R3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
[R3-GigabitEthernet0/0/0]
Apr 22 2024 19:36:59-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 g 0/0/1
[R3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
Apr 22 2024 19:37:21-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]int l0
[R3-LoopBack0]ip add 192.168.2.1 32
[R3-LoopBack0]int l1
[R3-LoopBack1]ip add 192.168.3.1 32
[R3-LoopBack1]q
[R3]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              100.2.2.3/24         up         up        
GigabitEthernet0/0/1              100.3.3.3/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.2.1/32       up         up(s)     
LoopBack1                         192.168.3.1/32       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R3]

R4:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]int  g0/0/0
[R4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
[R4-GigabitEthernet0/0/0]
Apr 22 2024 19:39: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 l0
[R4-LoopBack0]ip add 192.168.4.1 32
[R4-LoopBack0]int l1
[R4-LoopBack1]ip add 192.168.5.1 32
[R4-LoopBack1]q
[R4]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              100.3.3.4/24         up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.4.1/32       up         up(s)     
LoopBack1                         192.168.5.1/32       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R4]

配置动态路由协议

RIP

R1:

[R1]rip 1
[R1-rip-1]v 2	
[R1-rip-1]undo summary 
[R1-rip-1]net 100.0.0.0
[R1-rip-1]net 192.168.0.0
[R1-rip-1]net 192.168.1.0

R2:

[R2]rip 1
[R2-rip-1]v 2
[R2-rip-1]undo summary 
[R2-rip-1]net 100.0.0.0

OSPF

R2:

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]a 0
[R2-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255

R3:

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.1.255
[R3-ospf-1-area-0.0.0.0]q
[R3-ospf-1]a 1
[R3-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255

R4:

[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]a 1
[R4-ospf-1-area-0.0.0.1]net 100.3.3.0 0.0.0.255 
[R4-ospf-1-area-0.0.0.1]net 192.168.4.0 0.0.1.255

查看建邻情况

R2:

R3:

R4:

双向重发布

R2:

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

查看路由表:

R1:

R2:

OSPF:

RIP:

R3:

R4:

路由过滤

因为需要R4上的业务网段不引入RIP协议网段中,所以在R2上配置路由过滤:

[R2]acl 2000	
[R2-acl-basic-2000]rule permit source 192.168.4.0 0.0.1.255
[R2-acl-basic-2000]q	
[R2]route-policy a deny node 1
Info: New Sequence of this List.
[R2-route-policy]if-match acl 2000	
[R2-route-policy]q
[R2]route-policy a permit node 2
Info: New Sequence of this List.
[R2-route-policy]q
[R2]rip 1
[R2-rip-1]import-route ospf route-policy a

查看RIP区域路由表:

 R1:

 地址前缀列表

R4无法学习到R1的业务网段路由,使用地址前缀列表完成:

R2:

[R2]ip ip-prefix q index 1 deny 192.168.0.0 23 less-equal 32
[R2]ip ip-prefix q index 2 permit 0.0.0.0 0 less-equal 32
[R2]route-policy w permit node 1
Info: New Sequence of this List.	
[R2-route-policy]if-match ip-prefix q
[R2-route-policy]q
[R2]ospf 1
[R2-ospf-1]import-route rip route-policy w

查看R4路由表:

静默接口

因为RIP协议按主类宣告的特点,area 0区域也被宣告进了RIP的管辖区域,故要实现要求5,可以采用静默接口的方法:

[R2]rip 1
[R2-rip-1]silent-interface g0/0/1

至此配置完成。

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

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

相关文章

SpringCloud系列(9)--将服务消费者Consumer注册进Eureka Server

前言&#xff1a;上一章节我们介绍了如何将服务提供者注册进Eureka服务里&#xff0c;本章节则介绍如何将服务消费者Consumer注册进Eureka服务里 Eureka架构原理图 1、修改consumer-order80子模块的pom.xml文件&#xff0c;引入Eureka Clinet的依赖&#xff0c;然后reolad一下&…

学习笔记Day21:转录组差异分析

转录组差异分析 差异分析难点在于将数据处理成需要的格式 表达矩阵 数值型矩阵-count 行名是symbol 低表达量的基因需要过滤 分组信息 因子&#xff0c;对照组在level第一位 与表达矩阵的列一一对应 项目名称 字符串&#xff08;不要有特殊字符&#xff09; TCGA-XX…

LeetCode_1304.和为零的 N 个不同整数

✨✨所属专栏&#xff1a;LeetCode刷题专栏✨✨ ✨✨作者主页&#xff1a;嶔某✨✨ 题目&#xff1a; 题解&#xff1a; 题目说让我们返回一个由n个各不相同的整数组成的数组&#xff0c;相加为0。 这里的比较好的办法就是类似于 1 2 3 0 -3 -2 -1这样对称的数组。既满足要求…

低代码新时代:6款免费开发平台助你畅行编码之路

本篇文章为您介绍的六款免费又好用的低代码开发平台有&#xff1a;Zoho creator、Baserow、OS.bee、nuBuilder、JHipster、Appian。 一、Zoho creator Zoho Creator是一款国际化的低代码开发平台&#xff0c;有超17年低代码经验。近些年&#xff0c;Zoho Creator以其成本低、国…

第25天:安全开发-PHP应用文件管理包含写入删除下载上传遍历安全

第二十五天 一、PHP文件管理-下载&删除功能实现 1.文件上传&#xff1a; 无过滤机制黑名单过滤机制白名单过滤机制文件类型过滤机制 2.文件删除&#xff1a; unlink() 文件删除函数调用命令删除&#xff1a;system shell_exec exec等 3. 文件下载&#xff1a; 修改HT…

python3--lxml pytoml.core.TomlError expected_equals报错解决

文章目录 一、问题二. 解决方法&#xff1a;三. 参考&#xff1a;四. 总结 一、问题 在ubuntu的armbian上的python3中安装lxml时报错了 安装命令是 pip3 install lxml报错简略信息如下图 File "/usr/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/par…

Linux debian gdb dump

1.开发背景 记录 debian 下应用程序崩溃调试方法 2.开发需求 程序越界可以定位到越界的位置附近 3.开发环境 debian 操作系统&#xff0c;如果不支持需要查看是否存在对应的可执行文件 4.实现步骤 4.1 设置 dump 输出大小 ulimit -c unlimited # 设置输出大小 生成core 文…

稀碎从零算法笔记Day56-LeetCode:组合总和 Ⅳ

题型&#xff1a;DP、数组 链接&#xff1a;377. 组合总和 Ⅳ - 力扣&#xff08;LeetCode&#xff09; 来源&#xff1a;LeetCode 题目描述 给你一个由 不同 整数组成的数组 nums &#xff0c;和一个目标整数 target 。请你从 nums 中找出并返回总和为 target 的元素组合的…

Qt中的Qmainwindow和Qwidget区别

Qmainwindow是有菜单栏的&#xff0c;如图 Qwidget是没有菜单栏的&#xff0c;如图

《网络安全-frida初探-付费应用简单逆向》

文章目录 一、目标应用二、分析流程声明文章仅供学习参考,严禁非法使用,如非法使用,而导致的一切后果,由使用者自负 一、目标应用 aHR0cHMlM0EvL3d3dy53YW5kb3VqaWEuY29tL2FwcHMvODI4NjIxMy9oaXN0b3J5X3Y5 二、分析流程 反编译apk查看相关信息 功能使用的通过该处判断的需…

C# 窗体应用程序 Chart控件显示实时曲线

IDE: VS2019 项目模板&#xff1a;C# windows 窗体应用(.NET Framework) 【参考】 B站上教程C#Chart控件画折线图的使用&#xff0c;关于Chart控件的属性&#xff0c;介绍得非常详细。B站上教程C#上位机Chart控件实时曲线终极讲解&#xff0c;对鼠标滚轮事件等&#xff0c;多…

今日arXiv最热NLP大模型论文:浙江大学:蒸一蒸,多Agent变成单一模型,效果更好

“团结就是力量”&#xff0c;面对复杂多变的现实环境&#xff0c;multi-agent应运而生。相较于单打独斗的single-agent&#xff0c;multi-agent集结了多个功能各异的LLM&#xff0c;共同攻克难关。然而&#xff0c;这种协同作战的方式也带来了沉重的推理负担&#xff0c;限制了…