7.4.5 RIP路由基本配置示例
2010-11-01 11:33
537 查看
7.4.5 RIP路由基本配置示例
http://book.51cto.com 2010-10-19 15:12 王达 华中科技大学出版社 我要评论(0)摘要:《路由器配置与管理完全手册-Cisco篇》第7章Cisco路由器静态/RIP和策略路由配置,本章主要介绍的就是Cisco路由器中的这两类比较简单的路由配置方法。并在本章最后介绍了Cisco路由器中基于策略的路由配置方法。本节为大家介绍RIP路由基本配置示例。
标签:路由器 Cisco 路由器配置与管理完全手册-Cisco篇
[align=right]限时报名参加“甲骨文全球大会・2010・北京”及“JavaOne和甲骨文开发者大会2010”[/align]
7.4.5 RIP路由基本配置示例
本示例拓扑结构如图7-7所示。各路由器接口分配的IP地址也在图中作了标注。现要求通过RIP动态路由协议实现各路由器的互通。
(点击查看大图)图7-7 RIP路由配置示例拓扑结构 |
(1)按照图中所标注的接口IP地址,配置各路由器的接口IP地址(略)。
(2)先来使用"show ip route"命令查看一下各路由器当前的路由表。结果证实各路由器当前仅有各自直接连接的路由。下面是Router A上当前的路由表项(注意输出信息中的粗体字部分)。
RouterA#show 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, 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 C 192.168.0.0/24 is directly connected,FastEthernet0/0 C 192.168.1.0/24 is directly connected,Serial1/1
(3)在Router A上ping Router C,结果显示不通,输出信息如下所示。
RouterA#ping 192.168.2.2 PING 192.168.2.2(192.168.2.2):56 data bytes …… ----192.168.2.2 ping statistcs---- 5 packets transmitted,0 packets received,100% packet loss
(4)在Router A上启用RIP路由协议。
RouterA#en RouterA(Config)#router rip RouterA(Config)#network 192.168.0.0 RouterA(Config)#network 192.168.1.0 RouterA(Config)#end
现在再来查看Router A上的路由表,结果显示仍是前面第2步中所显示的两条直连路由。因为其他路由器上没有启用RIP协议,所以它根本无法学习到来自其他路由器的路由。
(5)在Router B上启用RIP路由协议。
RouterB#en RouterB(Config)#router rip RouterB(Config)#network 192.168.1.0 RouterB(Config)#network 192.168.2.0 RouterB(Config)#end
现在来查看Router B上的路由表,此时可以看到它已学习到了Router A路由器上所连接的网络,有一个RIP路由。具体如下(注意输出信息中的粗体字部分):
RouterB#show 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, 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 R 192.168.0.0/24 [120/1] via 192.168.1.1, 00:00:25, Serial1/0 C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, FastEthernet0/0
【说明】RIP路由项说明如下(后面的RIP路由按照同样的方法来理解):
R:说明该路由条目是通过 RIP 路由协议学习来的;
192.168.0.0/24:这是路由条目的目的网络地址;
120:这是RIP路由协议的默认管理距离;
1: 这从路由器Router B到达目的网络192.168.0.0/24的度量值为 1跳,因为只经过一个路由器;
Via 192.168.1.1:这是该RIP路由的下一跳地址;
00:00:025:这是指明距离下一次更新还有 5(30-25)秒;
Serial1/0:指出接收该RIP路由条目的本地路由器接口为s1/0。
(6)在Router C上启用RIP协议。
RouterC#en RouterC(Config)#router rip RouterC(Config)#network 192.168.2.0 RouterC(Config)#network 192.168.3.0 RouterC(Config)#end
此时查看Router C上的路由表,可以看到它从Router A和Router B上学习到两条RIP路由。具体如下(注意输出信息中的粗体字部分):
RouterC#show 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, 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 R 192.168.0.0/24 [120/2] via 192.168.2.1, 00:00:25, FastEthernet0/0 R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:25, FastEthernet0/0 C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, FastEthernet0/0
(7)现在再次查看Router A和Router B上的路由表,可以得到如下结果(注意输出信息中的粗体字部分),显示它们相互从其他两个路由器上学习到了所有网段的路由。
RouterA#show 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, 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 C 192.168.0.0/24 is directly connected,FastEthernet0/0 C 192.168.1.0/24 is directly connected,Serial1/1 R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:25, Serial1/1 R 192.168.3.0/24 [120/2] via 192.168.1.2, 00:00:25, Serial1/1 RouterB#show 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, 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 R 192.168.0.0/24 [120/1] via 192.168.1.1, 00:00:25, Serial1/0 C 192.168.1.0/24 is directly connected, Serial1/0 C 192.168.2.0/24 is directly connected, FastEthernet0/0 R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:25, FastEthernet0/0
(8)最后同样进行ping操作,来验证路由器之间是否已连通。结果显示都是通的,证明RIP路由配置是正确的。在此就不具体举例了。
[align=right]【责任编辑:云霞 TEL:(010)68476606】[/align]
相关文章推荐
- 思科RIP动态路由基本配置
- RIP引入外部路由配置示例
- 基本的RIP配置(1)
- 【mybatis】入门 - 基本配置、简单示例
- ActiveMQ基本配置与示例演示
- 传统网络配置命令与ip高级路由命令学习示例
- 路由原理,静态路由的基本配置
- 第6章 路由的的基本配置
- 基本的RIP配置(2)
- CCNP路由-16 BGP 同步规则、水平分割原则及基本配置
- LVS基本介绍及NAT模型配置示例
- 基本的RIP配置(3)
- log4j基本用法及简单配置示例
- 实验五:RIP动态路由的配置
- Ansible基本配置以及使用示例
- AngularJS路由系列(1)--基本路由配置
- 第6章 路由的的基本配置
- 【视频】CCNA——路由协议(静态路由协议、RIP、EIGRP、OSPF)的基本配置
- CCNP路由-17 BGP基本配置及维护
- 基本的RIP配置(4)