思科RIP过滤修改AD、Mertric值

简介:

实验名称:思科过滤修改AD、Mertric值
实验需求:路由器R4过滤掉R1、R2的loopback的10.10.1.1 10.10.2.2地址,修改R3路由表中一个前缀地址AD值,修改R3到R4路由表前缀中一个地址的Mertric值
实验思路:在每个路由器设置IP,设置RIP,在R3设置过滤、修改命令
实验拓扑:

实验命令:

R1>en
R1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#no shu
R1(config-if)#ip add 192.168
Dec 15 18:03:25.875: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
Dec 15 18:03:26.875: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#exi
R1(config)#int l 0
R1(config-if)#ip add 10.10.1.1 255.255.255.0
R1(config-if)#exi
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no au
R1(config-router)#net 192.168.12.0 
R1(config-router)#net 10.10.1.0

R2>en
R2#configure t 
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/1
R2(config-if)#no shu
R2(config-if)#ip add 
Dec 15 18:04:17.975: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
Dec 15 18:04:18.975: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config-if)#ip add 192.168.12.2 255.255.255.0 
R2(config-if)#exi
R2(config)#int l 0
R2(config-if)#ip add 10.10.2.2 255.255.255.0
R2(config-if)#exi
R2(config)#int f0/0
R2(config-if)#no shu
R2(config-if)#ip add 192.168.23.2 255.255.255.0
R2(config-if)#exi
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no au
R2(config-router)#net 192.168.12.0
R2(config-router)#net 192.168.23.0
R2(config-router)#net 10.10.2.0 
R2(config-router)#redistribute static 
R2(config-router)#

R3>
R3>en
R3#configure t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int f0/1
R3(config-if)#no shu
R3(config-if)#ip add 192.168.23.3 255.255.255.0
R3(config-if)#exi
R3(config)#int f0/0
R3(config-if)#no shu
R3(config-if)#ip add 192.168.34.3 255.255.255.0
R3(config-if)#exi
R3(config)#int l 0
R3(config-if)#ip add 10.10.3.3 255.255.255.0
R3(config-if)#exi
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no au
R3(config-router)#net 192.168.23.0
R3(config-router)#net 192.168.34.0
R3(config-router)#net 10.10.3.0 
R3(config-router)#exi
R3(config)#ip access-list standard a 
R3(config-std-nacl)#10 deny 10.10.0.0 0.0.3.0 
R3(config-std-nacl)#20 per
R3(config-std-nacl)#20 permit any
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#distribute-list a out fastEthernet 0/0 
R3(config-router)#exi
R3(config)#ip access-list standard b 
R3(config-std-nacl)#10 permit 192.168.12.0 0.0.0.0 
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#distance 250 192.168.23.2 0.0.0.0 b 
R3(config-router)#exi
R3(config)#ip access-list standard c
R3(config-std-nacl)#10 permit 192.168.12.0 0.0.0.0 
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#offset-list c out 4 fastEthernet 0/0
R3(config-router)#exi
R3(config)#exi
R3#clear ip route 
R3#clear ip route 

R3#clear ip route 
R3#clear ip route 

R3#clear ip route 
R3#clear ip route 

R3#clear ip route 
R3#clear ip route 

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

R 192.168.12.0/24 [250/1] via 192.168.23.2, 00:00:01, FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/2] via 192.168.23.2, 00:00:01, FastEthernet0/1
R 10.10.2.0 [120/1] via 192.168.23.2, 00:00:01, FastEthernet0/1
C 10.10.3.0 is directly connected, Loopback0
R 10.10.4.0 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/0
C 192.168.23.0/24 is directly connected, FastEthernet0/1
C 192.168.34.0/24 is directly connected, FastEthernet0/0
R3#show ip route rip
R 192.168.12.0/24 [250/1] via 192.168.23.2, 00:00:13, FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/2] via 192.168.23.2, 00:00:13, FastEthernet0/1
R 10.10.2.0 [120/1] via 192.168.23.2, 00:00:13, FastEthernet0/1
R 10.10.4.0 [120/1] via 192.168.34.4, 00:00:04, FastEthernet0/0
R3#

R4>
R4>en
R4#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int f0/1
R4(config-if)#no shu
R4(config-if)#ip add 192.16
Dec 15 18:07:57.251: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
Dec 15 18:07:58.251: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R4(config-if)#ip add 192.168.34.4 255.255.255.0
R4(config-if)#exi
R4(config)#int l 0 
R4(config-if)#ip add 10.10.4.4 255.255.255.0
R4(config-if)#exi
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no au
R4(config-router)#net 192.168.34.0
R4(config-router)#net 10.10.4.0 
R4(config-router)#exi
R4(config)#exi
R4#clear ip route 
R4#clear ip route 

R4#clear ip route 
R4#clear ip route 

R4#clear ip route 
R4#clear ip route 

R4#clear ip route 
R4#clear ip route 

R4#clear ip route 
R4#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, 
- candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:09, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.4.0 is directly connected, Loopback0
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:09, FastEthernet0/1
C 192.168.34.0/24 is directly connected, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:00, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:00, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:04, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:04, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:13, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:13, FastEthernet0/1
R4#



本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/13505118/2051160,如需转载请自行联系原作者

相关文章
开源项目推荐:3D重建开源库Colmap/OpenMVG/OpenMVS/Fade2D/2.5D
开源项目推荐:3D重建开源库Colmap/OpenMVG/OpenMVS/Fade2D/2.5D
762 0
|
人工智能 JSON API
|
XML Java iOS开发
谈一谈 IPA 上传到 App Store Connect 的几种方法
谈一谈 IPA 上传到 App Store Connect 的几种方法
|
安全 Java Linux
ElasticSearch第四讲:ES详解:ElasticSearch和Kibana安装
ElasticSearch第四讲:ES详解:ElasticSearch和Kibana安装
495 0
|
网络协议 网络虚拟化 虚拟化
|
数据采集 Python
环境调试——EA-LSS
对比 E-H:同样增加速度增强之后,放大图像的调整范围,DAL 会比 BEVFusion 略微提升。作者说速度增强挑战了点云线索的回归任务预测,这迫使模型利用图像线索。(没懂,插个眼)
362 1
|
编解码 监控 Linux
采集音频和摄像头视频并实时H264编码及AAC编码
采集音频和摄像头视频并实时H264编码及AAC编码
278 0
|
Web App开发 前端开发 JavaScript
如何快速与呼叫中心系统CTI/API/SDK接口集成
由于呼叫中心系统涉及通信、CTI、终端设备、中继线路等技术与概念,从事信息管理系统、ERP、CRM、工单系统等的研发人员一般不是非常熟悉这部分技术,当需要提供具备呼叫中心能力的解决方案时,往往要用较多的时间来研究这些相对复杂的技术,对接过程比较长,开发调试有一定的阻力,基于此,我们提出一种更加简便高效的集成方法,可以零代码集成呼叫中心平台,实现项目快速上线。
如何快速与呼叫中心系统CTI/API/SDK接口集成
|
机器学习/深度学习 存储 人工智能
基于NumPy构建LSTM模块并进行实例应用(附代码)
基于NumPy构建LSTM模块并进行实例应用(附代码)
468 0
|
存储
如何解决网页中的pdf文件无法下载?pdf打印显示空白怎么办?
如何解决网页中的pdf文件无法下载?pdf打印显示空白怎么办?
1334 0