RIPv2 的相关配置

简介:
RIPv2 的相关配置
 
image
Ru1 上的基本配置
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host ru1
ru1(config)#int s0/0
ru1(config-if)#ip add 192.168.1.1 255.255.255.0
ru1(config-if)#clock rate 64000
ru1(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to down
ru1(config-if)#exit
ru1(config)#int f0/0
ru1(config-if)#ip add 172.16.1.1 255.255.255.0
ru1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ru1(config-if)#exit
ru1(config)#
ru2上的基本配置
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: n
Press RETURN to get started!
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host ru2
ru2(config)#int s0/0
ru2(config-if)#ip add 192.168.1.2 255.255.255.0
ru2(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
ru2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upexit
ru2(config)#int s0/1
ru2(config-if)#ip add 192.168.2.1 255.255.255.0
ru2(config-if)#clock rate 64000
ru2(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/1, changed state to down
ru2(config-if)#exit
ru2(config)#int f0/0
ru2(config-if)#ip add 172.16.2.1 255.255.255.0
ru2(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ru2(config-if)#exit
ru2(config)#
ru3上的基本配置Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host ru3
ru3(config)#int s0/0
ru3(config-if)#ip add 192.168.2.2 255.255.255.0
ru3(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
ru3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upexit
ru3(config)#int f0/0
ru3(config-if)#ip add 172.16.3.1 255.255.255.0
ru3(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ru3(config-if)#exit
ru3(config)#
ru1上的rip具体配置ru1>en
ru1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ru1(config)#route rip
ru1(config-router)#version 2
ru1(config-router)#net 192.168.1.0
ru1(config-router)#net 172.16.1.0
ru1(config-router)#exit
ru1(config)#
这是ru2上的
ru2>
ru2>en
ru2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ru2(config)#route rip
ru2(config-router)#version 2
ru2(config-router)#net 192.168.1.0
ru2(config-router)#net 192.168.2.0
ru2(config-router)#net 172.16.2.0
ru2(config-router)#exit
ru2(config)#
以下是ru3上的配置
ru3(config)#route rip
ru3(config-router)#version 2
ru3(config-router)#net 192.168.2.0
ru3(config-router)#net 172.16.3.0
ru3(config-router)#exit
ru3(config)#
ru3上的查看信息
ru3#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R 172.16.0.0/16 [120/1] via 192.168.2.1, 00:00:07, Serial0/0
C 172.16.3.0/24 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:07, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/0
ru3#
ru3#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!.!.!
Success rate is 60 percent (3/5), round-trip min/avg/max = 6/6/8 ms
ru3#
注意这里的连通情况
一个通一个不通
注意代灰色背景的路由信息和后面的区别
clip_image002
PC1上的配置
clip_image004
上面是pc2的
clip_image006
Pc3的
clip_image008
Ping一下pc1 看看连通性
下面我们关闭自动汇总 看看与之前有什么区别
简单的说关闭自动汇总是为了解决不连续子网相互访问的问题
Ru3>
Ru3>en
Ru3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Ru 3(config)#router rip
ru3(config-router)#version 2
ru3(config-router)#no au
ru3(config-router)#no auto-summary
ru3(config-router)#exit
ru3(config)#
其他两台路由做同样的设置
ru3#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
R 172.16.0.0/16 [120/2] via 192.168.2.1, 00:00:00, Serial0/0
R 172.16.1.0/24 [120/2] via 192.168.2.1, 00:00:00, Serial0/0
R 172.16.2.0/24 [120/1] via 192.168.2.1, 00:00:00, Serial0/0
C 172.16.3.0/24 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:00, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/0
ru3#
在看一下连同情况
ru3#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/7/8 ms
ru3#
被动接口:
由于内网的接口即f0/0接口连接主机,所以我们并不需要向这些接口发送路由更新信息,所以我们可以把这些接口设置为被动接口
被动接口的意思就是只接受rip更新而不向外发送路由更新信息
设置为被动接口,可以达到节省资源的目的
路由配置模式下
ru3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ru3(config)#route rip
ru3(config-router)#version 2
ru3(config-router)#pass
ru3(config-router)#passive-interface f0/0
ru3(config-router)#exit
ru3(config)#
其他两台路由器上做同样的配置
我们用sh ip pro 查看一下变化情况
ru1#sh ip pro
#设置前
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0 2 2
FastEthernet0/0 2 2
#这里记录了哪些接口发送和接收信息
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
192.168.1.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:11
Distance: (default is 120)
ru1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ru1(config)#
#设置后
ru1#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 15 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
192.168.1.0
Passive Interface(s):
FastEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:14
Distance: (default is 120)
ru1#


本文转自 yuzeying1 51CTO博客,原文链接:http://blog.51cto.com/yuzeying/180265

相关文章
|
算法 程序员 Go
[软件工程导论(第六版)]第6章 详细设计(复习笔记)
[软件工程导论(第六版)]第6章 详细设计(复习笔记)
|
5月前
|
存储 弹性计算 人工智能
阿里云服务器计费模式:包年包月、按量付费、抢占式实例、节省计划、预留实例券区别及选择参考
阿里云服务器提供包年包月、按量付费、抢占式实例、节省计划和预留实例券五种计费模式,分别适用于长期稳定业务、短期或波动业务、无状态低成本任务、灵活资源调整及固定规格需求等场景。包年包月成本最低但灵活性差;按量付费灵活但成本较高;抢占式实例成本最低但可能中断;节省计划通过承诺消费换取折扣;预留实例券则绑定实例规格提供固定折扣。用户可根据业务需求、成本敏感度及资源控制要求,选择适合自己的计费模式或组合策略以优化成本。
|
3月前
|
人工智能 开发者 SEO
从 SOLO 独立开发者社区,我看到了越来越多开发者开始做自己的产品
SOLO独立开发者社区聚焦真实产品构建过程,涵盖AI工具、一人公司、Side Project等方向,助力中文开发者交流踩坑经验、沉淀实战案例、连接同行伙伴,共建专注长期成长的纯粹技术社区。
从 SOLO 独立开发者社区,我看到了越来越多开发者开始做自己的产品
|
3月前
|
安全 Linux 网络安全
云服务器上线后必须完成的安全设置清单
云服务器上线前,务必完成基础安全配置:关闭非必要服务、使用强密码或SSH密钥、修改默认远程端口、限制登录IP、禁用root直连、及时更新补丁、精细配置防火墙、监控关键日志、定期备份并验证恢复。安全无小事,基础防护是稳定运营的第一道防线。(239字)
453 0
云服务器上线后必须完成的安全设置清单
|
3月前
|
存储 人工智能 数据可视化
满足CNAS/CMA认证,实验室信息管理系统必备功能汇总
本资料为优检云LIMS系统合规功能指南,严格对标CNAS(ISO/IEC 17025)与CMA(RB/T 214)评审要求,涵盖审计追踪、分级权限、电子签名、数据防篡改等一票否决项,以及样品全周期、仪器直连、报告智能生成、资源要素管控、质量体系运行等核心模块,助力实验室高效通过资质认定与飞行检查。
|
5月前
|
人工智能 安全 API
OpenClaw(Clawdbot)喂饭级图文指南!阿里云/本地部署+API配置+集成1.5万Skills及避坑指南,打造全能AI助手
2026年,开源AI Agent领域迎来现象级产品——OpenClaw(原Clawdbot)。这款由奥地利独立开发者Peter于2025年11月推出的工具,仅用3个月就以史上最快速度登顶GitHub,Star数突破24万,超越React等经典开源项目,成为开发者与普通用户追捧的“数字世界分身”。其核心魅力在于“本地运行保障隐私+IM无缝接入+1.5万+Skills生态”,打破了传统AI助手“只对话不干活”的局限,真正实现从沟通到任务执行的闭环。
667 4
|
4月前
|
机器学习/深度学习 编解码 机器人
HY-Embodied-0.5: Embodied Foundation Models for Real-World Agents
本文提出的HY-Embodied-0.5模型家族,通过创新的MoT架构、亿级具身专项数据、迭代自进化训练与在线策略蒸馏方案,有效解决了通用VLM在具身智能场景的感知与推理短板,实现了边缘高效版与大型高性能版的协同设计,在多项基准测试与真实机器人任务中验证了技术有效性,为现实世界具身智能体提供了强大的基础模型支撑。
247 0
|
4月前
|
人工智能 安全 Linux
OpenClaw(Clawdbot) Linux部署全教程:本地搭建、ZeroNews接入及阿里云部署指南
OpenClaw(前身为Clawdbot)凭借“私有化运行+全权限实操”的创新定位,迅速成为AI领域的现象级开源项目。这款被称为“真正能做实事的AI”的工具,打破了传统聊天机器人的功能局限,可在本地设备或服务器上独立运行,通过WhatsApp、Telegram等常用聊天软件接收指令,完成文件读写、邮件管理、系统运维等实操任务,所有数据本地存储,隐私安全性拉满。
665 0
|
计算机视觉 索引
OpenCv实时设置摄像头参数/获得摄像头参数值的方法论
这篇文章提供了一个OpenCV的实例教程,展示了如何使用`createTrackbar()`函数实时设置和获取摄像头参数值,如饱和度、Gamma和亮度,并通过回调函数在程序中连续修改这些参数。
|
弹性计算 API 文件存储
DeepSeek集群版一键部署
本文介绍如何通过阿里云计算巢一键部署DeepSeek集群版,支持弹性扩缩容。DeepSeek-R1是2025年发布的开源大模型,性能与OpenAI-o1相当。集成Ollama和Open WebUI,用户可通过Web界面管理大模型。计算巢基于阿里云ACK和Knative架构,存储采用NAS,网关使用Kourier,默认拉取deepseek-r1:7B模型。计费涉及GPU规格、节点数量、磁盘容量和公网带宽。RAM账号需具备ECS、VPC等权限。部署流程简单,用户可快速启动并使用服务,支持公网和私网访问,提供API接口及进阶教程,如添加用户、下载其他模型和配置弹性扩缩容。
1250 1