您好,欢迎来到江浙沪招生考试网 !

设为首页|加入收藏|联系我们|网站地图|

江浙沪招生考试网

您现在的位置: test4exam >> 计算机考试 >> CISCO认证 >> 正文

RIP实验详细解释

日期:2009/9/16 7:45:27 来源:本站原创 访问量:

实验配置:实验1:被动接口(passive-interface)
RIP
中是不发送更新的 但是接收更新 EIGRP 中消息不在发送到指定的接口这样的话也就不在形成邻接关系了,也就是在接口上啥都不发! ospf 在被动接口上发送hello DBD分组 但是不发送LSU!
采用R2 R3 R5 回环接口也使用了!
启用RIP进程 所有接口都加入
R2的路由表
C 192.168.55.0/24 is directly connected, Loopback0
R 10.0.0.0/8 [120/2] via 192.168.1.3, 00:00:07, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 192.168.1.3, 00:00:07, FastEthernet0/0
r2#
R3 debug ip rip
*Mar   1 00:15:55.559: RIP: sending v1 update to 255.255.255.255 via Ethernet0/0 (192.168.1.3)
*Mar   1 00:15:55.563: RIP: build update entries
*Mar   1 00:15:55.563: network 10.0.0.0 metric 2
*Mar   1 00:15:55.563: network 192.168.3.0 metric 1

在接口E0/0广播
现在R3
r3(config)#router rip
r3(config-router)#passive-interface e0/0
debug
Mar   1 00:17:42.163: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.168.3.1)
*Mar   1 00:17:42.167: RIP: build update entries
*Mar   1 00:17:42.167: network 192.168.1.0 metric 1
*Mar   1 00:17:42.171: network 192.168.55.0 metric 2
*Mar   1 00:17:47.411: RIP: received v1 update from 192.168.1.2 on Ethernet0/0
*Mar   1 00:17:47.415:    192.168.55.0 in 1 hops
不再e0/0上广播了但是仍然接收到更新报文
TNND的等了三分钟
C 192.168.55.0/24 is directly connected, Loopback0
R 10.0.0.0/8 is possibly down, routing via 192.168.1.3, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.3.0/24 is possibly down, routing via 192.168.1.3, FastEthernet0/0
路由条目过了抑制时间 然后再过60S的刷新时间就删除掉了!


实验2:单播更新(unicast update)
正好接着上面的 关闭R5 启动R1 其他的不变!
虽然接口PASSIVE了 我们仍然可用指定
邻居 进行单播的更新 节省带宽!
实验目的:R2和R1 .R2和R3之间交换RIP通告信息   R1 R3间不交换RIP信息!
R1的配置: r1(config)#router rip
r1(config-router)#network 192.168.66.0
r1(config-router)#network 192.168.1.0
r1(config-router)#passive-interface e0/0
r1(config-router)#passive-interface fa0/0
r1(config-router)#neighbor 192.168.1.2   #指定邻居 单独更新

R3的配置
r3(config)#router rip
r3(config-router)#network 192.168.1.0
r3(config-router)#network 192.168.8.0 #又定义了一个回环接口
r3(config-router)#passive-interface e0/0
r3(config-router)#neighbor 192.168.1.2

再看 r3#debug ip rip events
*Mar   1 00:35:28.559: RIP: sending v1 update to 192.168.1.2 via Ethernet0/0 (192.168.1.3)
*Mar   1 00:35:28.563: RIP: Update contains 1 routes
*Mar   1 00:41:38.871: RIP: sending v1 update to 255.255.255.255 via Loopback0 (192.168.88.1)
*Mar   1 00:41:38.871: RIP: Update contains 2 rout
*Mar   1 00:41:33.467: RIP: received v1 update from 192.168.1.2 on Ethernet0/0
*Mar   1 00:41:33.471: RIP: Update contains 1 routes
接口E0/0上阻止了广播 只是单播到192.168.1.2
那么R1 R3的路由表会咋样呢!
r3#show ip route

C 192.168.88.0/24 is directly connected, Loopback0
R 192.168.55.0/24 [120/1] via 192.168.1.2, 00:00:19, Ethernet0/0
C 192.168.1.0/24 is directly connected, Ethernet0/0
r1#show ip route

R 192.168.55.0/24 [120/1] via 192.168.1.2, 00:00:14, FastEthernet0/0
C 192.168.66.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
在共享的以太网上 水平分割的原因 R2从R1 R3学到的路由不会在从E0/0口发送出去的!



实验三:不连续的子网(discontinuity subnet)
关闭R1.R2.SW 启动R4 R5  关闭R4 R5的s1/0口
现有 R3 R4 R5
启动RIP进程 所有接口都加入
因为RIPV1是有类别路由选择 不带子网掩码 默认在主
网络边界汇总
R4 R5都通告给R3 那么R3就会自以为的到达10.0.0.0/8有2条路可走!进行均衡负载了!
很显然这样到达10.0.0.0只会有50%的机会到达正确的子网
解决方法
在R4 R3 and R3 R5之间配置辅助IP地址(secondary ip address).关于子网10.0.0.0
见rip基础里的一句话:如果目的地址是一个和路由器直接相连的主网络的成员 那么该网络的路由器接口上配置的子网掩码将被用来确定目的地址的子网因此在那个主网络中必须自始至终的统一使用这个子网掩码

R3:

C 192.168.88.0/24 is directly connected, Loopback0
R 10.0.0.0/8 [120/1] via 192.168.3.2, 00:00:13, Serial1/0
            [120/1] via 192.168.2.2, 00:00:25, Serial1/1
C 192.168.1.0/24 is directly connected, Ethernet0/0
C 192.168.2.0/24 is directly connected, Serial1/1
C 192.168.3.0/24 is directly connected, Serial1/0
R4:
r4#show ip route

R 192.168.88.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial1/1
    10.0.0.0/24 is subnetted, 1 subnets
C    10.1.3.0 is directly connected, Loopback0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial1/1
C 192.168.2.0/24 is directly connected, Serial1/1
R 192.168.3.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial1/1
r4#

解决办法:
r3(config)#int s1/1
r3(config-if)#ip add 10.2.1.1 255.255.255.0 secondary
r3(config-if)#int s1/0                  
r3(config-if)#ip add 10.2.2.1 255.255.255.0 secondary

r4(config)#int s1/1
r4(config-if)#ip add 10.2.1.2   255.255.255.0 secondary

r5(config)#int s1/1
r5(config-if)#ip add 10.2.2.2 255.255.255.0 secondary

习惯性的总是忘记加secondary 导致IP地址被覆盖了重复了N次

看看R3的路由表
r3# show ip route

C 192.168.88.0/24 is directly connected, Loopback0
    10.0.0.0/24 is subnetted, 5 subnets
R    10.1.3.0 [120/1] via 10.2.1.2, 00:00:11, Serial1/1
C    10.2.1.0 is directly connected, Serial1/1
C    10.2.2.0 is directly connected, Serial1/0
R    10.0.0.0 [120/1] via 192.168.3.2, 00:00:02, Serial1/0
                [120/1] via 192.168.2.2, 00:00:11, Serial1/1
R    10.1.4.0 [120/1] via 10.2.2.2, 00:00:02, Serial1/0
C 192.168.1.0/24 is directly connected, Ethernet0/0
C 192.168.2.0/24 is directly connected, Serial1/1
是不是有更详细的子网了
汇总的依然存在 毕竟是匹配最精确的路由的 没关系!
辅助IP有时候很有用 比如网络要开始重新规划调整了 网络又不能中断 这个时候用辅助IP地址进行路由的协议的汇聚牙等等 然后午夜子时 切换到新的!


实验4:RIP的度量(RIP metric)
拓扑依然是上面那个 另外要启动R4 R5的s1/0接口!关掉R4R5的Loopback接口
r5(config)#int loopback 0
r5(config-if)#ip add 10.1.44.4 255.255.255.0
上面的回环接口改一下 TNND和 R5的s1/0 接口冲突 没在意 哈哈!
启动所有接口的RIP进程
命令参考:offset-list {access-list-number|name}{in|out} offset {type number}
Offset偏移   tcp/ip网络层也有个偏移量的东东!
R4的子网10.1.3.0到R5的子网10.1.2.0 这样走的话是以跳 经过R3是2跳 现在的情况是向让R4 R5之间的串行线路作为备份!不向动态链路的协议还可以改变什么接口带宽啊什么的 RIP可不认 管你链路质量好坏 过一个ROUTE就是一跳跳的越少就是好的!很简单的协议!
r5(config)#access-list 1 permit 10.1.0.0
r5(config)#router rip                                ^
r5(config-router)#offset-list 1 in 2 s1/1
先检查从s1/1接口接收进来的RIP通告如果存在和访问列表1指定的地址相匹配的路由条目,那么把改路由条目的度量加大2跳!                      ^
r4(config)#access-list 3 permit 10.1.44.0 0.0.0.0
r4(config)#router rip

看看R4的路由表
r4#show ip route


R 192.168.88.0/24 [120/1] via 192.168.2.1, 00:00:10, Serial1/1
    10.0.0.0/24 is subnetted, 6 subnets
C    10.1.3.0 is directly connected, Loopback0
C    10.2.1.0 is directly connected, Serial1/1
R    10.2.2.0 [120/1] via 10.1.4.2, 00:00:04, Serial1/0
R    10.0.0.0 [120/2] via 192.168.2.1, 00:00:10, Serial1/1
C    10.1.4.0 is directly connected, Serial1/0
R    10.1.44.0 [120/3] via 10.1.4.2, 00:00:04, Serial1/0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:10, Serial1/1
C 192.168.2.0/24 is directly connected, Serial1/1
R 192.168.3.0/24 [120/1] via 192.168.2.1, 00:00:10, Serial1/1
                   [120/1] via 10.1.4.2, 00:00:04, Serial1/0
偏移列表指定额外增加的跳数 变成三跳了!
注意事项 如果不指定偏移列表的接口,那么偏移列表将在所有于访问列表匹配的接口上更改所有的入站更新或者是出站的更新 如果不调用访问列表来做匹配那就更改所有的入站或者出站的更新啦!
在正在运行使用的路由上实施偏移列表时需要注意 因为当一个偏移列表引起下一跳路由器通告的度量只比他正在通告的路由更新的度量值更搞时将直到抑制计时器超时这个路由条目标记成不可达! 呵呵当然了 收到了一个 又收到一个 跳数大的 就怀疑出问题 把这个条目关紧闭180S 过后发现还通告就无奈的接收了!


实验5:5:版本之间的兼容性(compatibility)
Ripv2默认的情况是接收V2 V1版本的更新 只发送V1版的更新通告
缺省的方式是只发送和接收版本2的更新。上面的不对的 虽然看到文档有这么说 做了实验就知道了
命令 ip rip send version
    Ip rip reveive version
采用R1 R2 SW R3 R5 所有接口参与RIP
r1(config-router)#ver 2
r3(config-router)#ver 2
r2(config-router)#ver 1
r5(config-router)#ver 1

R3的route table

r3#show ip route

R 192.168.66.0/24 [120/1] via 192.168.1.1, 00:00:16, Ethernet0/0
C 192.168.1.0/24 is directly connected, Ethernet0/0
C 192.168.3.0/24 is directly connected, Serial1/0
R2 R5都是版本一的 接收不到!
r2#show ip pro
Interface          Send   Recv   Triggered RIP   Key-chain
FastEthernet0/0    1     1                                 
Loopback0          1     1                                 
r2#show ip route
C 192.168.55.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0

R2是版本一的默认是收发v1的通告! 没有学到其他的非直连的子网!
进行R3的配置 解决兼容性的问题
r3(config)#int s1/0
r3(config-if)#ip rip send ver 1   
r3(config-if)#ip rip receive ver 1
r3(config)#int e0/0
r3(config-if)#ip rip   send ver 1 2

r3#Debug ip rip
*Mar   1 00:20:06.491: RIP: sending v1 update to 255.255.255.255 via Ethernet0/0 (192.168.1.3)
*Mar   1 00:20:06.491: RIP: build update entries
*Mar   1 00:20:06.491: network 10.0.0.0 metric 2
*Mar   1 00:20:06.491: network 192.168.3.0 metric 1
*Mar   1 00:20:06.495: RIP: sending v2 update to 224.0.0.9 via Ethernet0/0 (192.168.1.3)
*Mar   1 00:20:06.499: RIP: build update entries
*Mar   1 00:20:06.499: 10.0.0.0/8 via 0.0.0.0, metric 2, tag 0
*Mar   1 00:20:06.503: 192.168.3.0/24 via 0.0.0.0, metric 1, tag 0
Mar   1 00:21:33.191: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.168.3.1)
*Mar   1 00:21:33.191: RIP: build update entries
*Mar   1 00:21:33.195: network 192.168.1.0 metric 1
*Mar   1 00:21:33.195: network 192.168.66.0 metric 2
r2#show ip route
C 192.168.55.0/24 is directly connected, Loopback0
R 10.0.0.0/8 [120/2] via 192.168.1.3, 00:00:25, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 192.168.1.3, 00:00:25, FastEthernet0/0
R3只是在e0/0上发送RIP版本1和2的更新 但是仍然接收不到从R2通告的更新版本不匹配
Mar   1 00:25:40.579: RIP: ignored v1 packet from 192.168.1.2 (illegal version)
R3因为水平分割的原因 不通告从R1学到的路由更新,所以R2就学不到R1的通告的路由了
关闭水平分割!
r3(config)#int e0/0
r3(config-if)#no ip split-horizon

r2# debug ip rip
Mar   1 00:28:59.127: RIP: ignored v2 packet from 192.168.1.1 (illegal version)
*Mar   1 00:29:14.035: RIP: received v1 update from 192.168.1.3 on FastEthernet0/0
*Mar   1 00:29:14.035:    10.0.0.0 in 2 hops
*Mar   1 00:29:14.035:    192.168.1.0 in 1 hops
*Mar   1 00:29:14.039:    192.168.3.0 in 1 hops
*Mar   1 00:29:14.039:    192.168.66.0 in 2 hops
*Mar   1 00:29:14.043: RIP: ignored v2 packet from 192.168.1.3 (illegal version)
接收了版本一的更新 忽略了版本2的!
r2#show ip route
C 192.168.55.0/24 is directly connected, Loopback0
R 192.168.66.0/24 [120/2] via 192.168.1.3, 00:00:24, FastEthernet0/0
R 10.0.0.0/8 [120/2] via 192.168.1.3, 00:00:24, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 192.168.1.3, 00:00:24, FastEthernet0/0

相关阅读
·推荐文章

Copyright ©2013-2015 江浙沪招生考试网 All Rights Reserved.
地址: 苏州市姑苏区阊胥路483号(工投创业园)  电话:0512-85551931 邮编: 214000
邮箱: [email protected] 版权所有:苏州迈峰教育科技有限公司 苏ICP备15050684号-2