实验四:RIPv2的配置和路由汇总
实验目的
1、 2、 3、 4、 5、
在路由器上启动RIPv2路由进程 启动参与路由协议的接口,并通告网络 auto-summary的开启和关闭
使用ip default-network命令 向网络中注入一条默认路由 查看和调试RIPv2路由协议相关信息
实验要求
本实验要达到如下要求: 1、 2、 3、 4、
给出具体的实现步骤
给出当RIPv2失效的情况下,浮动路由的配置情况
在路由器D通过ip default-network命令,向网络中注入一条默认路由 给出某个路由器上路由表的内容
打印时间:2013-4-13 下午 03:37 第1页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
实验拓扑
实验设备(环境、软件)
路由器4台 交叉线4条
实验设计到的基本概念和理论
RIPv2的特性、管理距离、浮动静态路由 1.RIPv2的特性:
RIPv2是无类的距离矢量路由协议 路由更新中包含下一跳地址 使用组播地址发送更新 可选择使用检验功能
使用抑制计时器和其他计时器来帮助防止路由环路 使用带毒性反转的水平分割来防止路由环路 在拓扑结构发生变化时使用触发更新加速收敛 最大跳数限制为15跳,16跳意味着网络不可达 允许在网络中使用CIDR和VLSM
打印时间:2013-4-13 下午 03:37
第2页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
RIPv2允许接收路由器在确定路由的子网掩码时,不再依赖于入站接口的子网掩码 或有类掩码
配置了RIPv2的路由器将会忽略RIPv1更新。 2.管理距离:
管理距离的作用:在路由进程决定使用哪条路由来转发数据包之前,它必须先决定 哪条路由放到路由表中。路由器经常会学到多于一条的对于目标网络的路由来源, 路由进程将要决定使用哪条路由来源。管理距离就用作此目的。
管理距离是从0到255的整数值。值越低表示路由来源的优先级别越高。管理距离值为0表示优先级别最高。只有直接相连的网络的管理距离为0,而且这个值不能更改。
可以修改静态路由和动态路由协议的管理距离。 3.浮动静态路由
路由表的管理距离越低,优先级越高。浮动路由,举个简单的例子,比如将动态路由的管理距离优先级修改为高,手动添加的静态路由优先级修改为低。当动态路由出现问题时,原有的路由会失效,路由器会自动选择静态路由,保证网络不中断,实现冗余备份!
浮动静态路由是一种特殊的静态路由,通过配置一个比主路由的管理距离更大的静态路由,保证网络中主路由失效的情况下,提供备份路由。但在主路由存在的情况下它不会出现在路由表中。浮动静态路由主要用于拔号备份.
实验过程和主要步骤
1. 给各个路由器的端口分配ip地址如下所示
路由器名称 Router0 Router1 端口 FastEthernet0/0 FastEthernet0/0 FastEthernet1/0 Router2 FastEthernet0/0 FastEthernet1/0 Router3
IP地址 172.16.1.1 172.16.1.2 192.168.1.1 172.168.2.1 192.168.1.2 172.168.2.2 子网掩码 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 第3页 共13页
FastEthernet0/0 打印时间:2013-4-13 下午 03:37
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
2. 配置各个路由器的端口地址
1. 配置Router0的端口地址
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface f0/0
Router(config-if)#ip address 172.16.1.1 255.255.255.0 Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up 2. 配置Router1的端口地址
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface f0/0
Router(config-if)#ip address 172.16.1.2 255.255.255.0 Router(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
Router(config-if)#exit Router(config)#interface f1/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up 3. 配置Router2的端口地址
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface f0/0
打印时间:2013-4-13 下午 03:37
第4页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
Router(config-if)#ip address 172.168.2.1 255.255.255.0 Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#interface f1/0
Router(config-if)#ip address 192.168.1.2 255.255.255.0 Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
4. 配置Router3的端口地址
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface f0/0
Router(config-if)#ip address 172.168.2.2 255.255.255.0 Router(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
3. 给路由器配置动态路由协议RIPv2协议
1. Router0上的配置
Router(config)#router rip Router(config-router)#version 2
Router(config-router)#network 172.16.1.0 2. Router1上的配置
Router(config)#router rip Router(config-router)#version 2
Router(config-router)#network 172.16.1.0 Router(config-router)#network 192.168.1.0
打印时间:2013-4-13 下午 03:37
第5页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
3. Router2上的配置
Router(config)#router rip Router(config-router)#version 2
Router(config-router)#network 192.168.1.0 Router(config-router)#network 172.168.2.0 4. Router3上的配置
Router(config)#router rip Router(config-router)#version 2
Router(config-router)#network 172.168.2.0
4. 使用ip default-network命令 向网络中注入一条默认路由
在路由Router3上配置一条默认路由 Router#config t
Router(config)#ip default-network 172.16.0.0 5. 给路由器之间配置浮动静态路由
1. 配置Router0
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.2 125 Router(config)#ip route 172.168.2.0 255.255.255.0 172.16.1.2 125 2. 配置Router1
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 172.168.2.0 255.255.255.0 192.168.1.2 1253. 配置Router2
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.1 125
打印时间:2013-4-13 下午 03:37
第6页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
4. 配置Router3
Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 172.16.1.0 255.255.255.0 172.168.2.1 125 Router(config)#ip route 192.168.1.0 255.255.255.0 172.168.2.1 125
6. 检测路由器的连通性
连通性良好。 例如:
在路由Router0上 Router#ping 172.168.2.2 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.168.2.2, timeout is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/12/18 ms 7. 动态路由协议正常工作时,检测路由器中的路由表状况
1. Router0的路由表
Router#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, 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/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0 172.168.0.0/16 is variably subnetted, 2 subnets, 2 masks
R 172.168.0.0/16 [120/2] via 172.16.1.2, 00:00:04, FastEthernet0/0
打印时间:2013-4-13 下午 03:37
第7页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
S 172.168.2.0/24 [125/0] via 172.16.1.2
R 192.168.1.0/24 [120/1] via 172.16.1.2, 00:00:04, FastEthernet0/0 2. Router1的路由表
Router#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, 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/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0 172.168.0.0/16 is variably subnetted, 2 subnets, 2 masks
R 172.168.0.0/16 [120/1] via 192.168.1.2, 00:00:27, FastEthernet1/0 S 172.168.2.0/24 [125/0] via 192.168.1.2
C 192.168.1.0/24 is directly connected, FastEthernet1/0 3. Router2的路由表
Router#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, 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.1.1, 00:00:14, FastEthernet1/0
打印时间:2013-4-13 下午 03:37
第8页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
S 172.16.1.0/24 [125/0] via 192.168.1.1 172.168.0.0/24 is subnetted, 1 subnets
C 172.168.2.0 is directly connected, FastEthernet0/0 C 192.168.1.0/24 is directly connected, FastEthernet1/0 4. Router3的路由表
Router#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, 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 172.16.1.0 to network 172.16.0.0 * 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks S* 172.16.0.0/16 [1/0] via 172.16.1.0 S 172.16.1.0/24 [125/0] via 172.168.2.1 172.168.0.0/24 is subnetted, 1 subnets
C 172.168.2.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 172.168.2.1, 00:00:23, FastEthernet0/0
8. 在动态路由协议失效时,浮动静态路由的工作情况
浮动静态路由代替动态路由协议所构建的路由而工作。工作正常。 例如:
在路由Router3上 Router#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 = 10/12/15 ms
打印时间:2013-4-13 下午 03:37
第9页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
9. 动态路由协议失效时,检测路由器中的路由表状况
1. Router0上的路由表
Router#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, 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/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0 172.168.0.0/24 is subnetted, 1 subnets S 172.168.2.0 [125/0] via 172.16.1.2 S 192.168.1.0/24 [125/0] via 172.16.1.2 2. Router1上的路由表
Router#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, 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/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0 172.168.0.0/24 is subnetted, 1 subnets S 172.168.2.0 [125/0] via 192.168.1.2
打印时间:2013-4-13 下午 03:37
第10页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
C 192.168.1.0/24 is directly connected, FastEthernet1/0 3. Router2上的路由表
Router#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, 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/24 is subnetted, 1 subnets S 172.16.1.0 [125/0] via 192.168.1.1 172.168.0.0/24 is subnetted, 1 subnets
C 172.168.2.0 is directly connected, FastEthernet0/0 C 192.168.1.0/24 is directly connected, FastEthernet1/0 4. Router3上的路由表
Router#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, 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 172.16.1.0 to network 172.16.0.0 * 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks S* 172.16.0.0/16 [1/0] via 172.16.1.0 S 172.16.1.0/24 [125/0] via 172.168.2.1 172.168.0.0/24 is subnetted, 1 subnets
打印时间:2013-4-13 下午 03:37
第11页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
C 172.168.2.0 is directly connected, FastEthernet0/0 S 192.168.1.0/24 [125/0] via 172.168.2.1
10. 查看和调试RIPv2路由协议相关信息
Router#show ip protocols Routing Protocol is \"rip\"
Sending updates every 30 seconds, next due in 22 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 FastEthernet0/0 2 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 172.16.0.0
Passive Interface(s): Routing Information Sources:
Gateway Distance Last Update 172.16.1.2 120 00:00:06 Distance: (default is 120)
11. 在一切都正常的情况下,Router3的路由表如下所示:
Router#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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR
打印时间:2013-4-13 下午 03:37
第12页 共13页
正式文档<文档分类号> < 宋体小五居右:文档正式标题 >
P - periodic downloaded static route
Gateway of last resort is 172.16.1.0 to network 172.16.0.0 * 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks S* 172.16.0.0/16 [1/0] via 172.16.1.0 S 172.16.1.0/24 [125/0] via 172.168.2.1 172.168.0.0/24 is subnetted, 1 subnets
C 172.168.2.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 172.168.2.1, 00:00:04, FastEthernet0/0
心得体会
通过这次试验我懂得了如何在路由器上启动RIPv2路由进程,知道了RIPv2的特性及其与RIPv1的区别与联系;知道了怎样在路由中使用ip default-network命令向网络中注入一条默认路由;查看RIPv2路由协议的相关信息;学会了配置浮动路由,了解了浮动静态路由在路由中的作用,及其使用条件;学习了管理距离的作用,及其与浮动路由配置时的联系,及其使用的限制条件等等。
在此期间,遇得到过一些问题,比如说不太了解动态路由协议的启动,不了解浮动路由的概念等等,通过自己看课本或者上网查找有关资料,自己慢慢懂得了很多知识,通过实验使得我更加熟练地掌握了这些知识,同时对一些概念也更清楚了。
打印时间:2013-4-13 下午 03:37 第13页 共13页
因篇幅问题不能全部显示,请点此查看更多更全内容