RIP
的防环机制
|
|
实验连接图
|
|
提要描述
|
1-
记数无穷大(maximum hop count):
定义最大跳数(最大为15跳),当跳数为16跳时,目标为不可达。
2-
水平分割(split horizon)
:从一个接口学习到的路由不会再广播回该接口。cisco
可以对每个接口关闭水平分割功能。这个特点在
( N B M A )
非广播多路访问
hub-and-spoke
环境下十分有用。
3-
毒性逆转
(poison reverse)
:从一个接口学习的路由会发送回该接口,但是已经被毒化,跳数设置为16跳,不可达。
4-
触发更新
(trigger update)
:
一旦检测到路由崩溃
,
立即广播路由刷新报文
,
而不等到下一刷新周期
。
5-
抑制计时器
(holddown timer):
防止路由表频繁翻动,
增加了网络的稳定性。
实验目标: 通过实验调试出各个现象
|
基本配置
|
R1
的配置
|
R2
的配置
|
!
hostname R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 13.1.1.1 255.255.255.0
no shut
!
interface Serial1/1
ip address 12.1.1.1 255.255.255.0
no shut
!
router rip
network 1.0.0.0
network 12.0.0.0
network 13.0.0.0
!
|
!
hostname R2
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
no shut
!
interface Serial1/1
ip address 23.1.1.2 255.255.255.0
no shut
!
router rip
network 12.0.0.0
network 23.0.0.0
!
|
R3
的配置
|
|
!
hostname R3
!
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
no shut
!
interface Serial1/1
ip address 13.1.1.3 255.255.255.0
no shut
!
router rip
network 13.0.0.0
network 23.0.0.0
!
|
|
↓调试配置及监测步骤↓
|
注意
!!
:
请在完成每个分解实验的时候,重启路由器重新配置表格的基本配置,再进行调试。
(一) 记数无穷大,16跳情况
产生16跳的工作过程:
1:
R1
丢失了
looback
接口的网络(下面简称网络A)后,产生一个即时更新送往R2和R3。这个更新信息要告诉R2和R3,R1不再有到达网络A的路径。然而这个更新信息传输到R3被推迟了(
C P U
忙、链路拥塞等),但到达了R2。R2从路由表中去掉到网络
A
的路径。
2:
R3
仍未收到R1
的即时更新信息,并发出它的常规路由选择更新信息,通告网络
A
以
2
跳的距离可达
。R2收到这个更新信息,认为出现了一条新路径到网络
A
。
3:
R2
告诉R1它能以
3
跳的距离到达网络
A
。
4:
R1
告诉R3它能以
4
跳的距离到达网络
A
。
5:
这个循环将进行到跳数为无穷,在
R I P
中定义为
1 6
。一旦一个路由器达到无穷,它将声明这条路径不可用并从路由表中删除此路径。由于记数到无穷大问题,路由选择信息将从一个路由器传到另一个路由器,每次段数加一。路由选择环路问题将无限制地进行下去,除非达到某个限制。这个限制就是
R I P
的最大跳数。当路径的跳数超过
1 5
,这条路径就从路由表中删除。
操作步骤:
第一步:
各个路由器完成基本配置,
R2
的路由表如下:
R2#sh ip route
R 1.0.0.0/8 [120/1] via 12.1.1.1, 00:00:01, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
R 13.0.0.0/8 [120/1] via 23.1.1.3, 00:00:23, Serial1/1
[120/1] via 12.1.1.1, 00:00:01, Serial1/0
网络
1.0.0.0
是学自
R1
的
第二步:
被动
R1
的
s1/1
接口,令
R2
学到网络
A
是来自
R3
,而不是
R1
,
大约
4
分钟后,
R2
的路由表如下:
R1(config)#router rip
R1(config-router)#passive-interface s1/1
R2#show ip route
R 1.0.0.0/8 [120/2] via 23.1.1.3, 00:00:06, Serial1/1
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
R 13.0.0.0/8 [120/1] via 23.1.1.3, 00:00:22, Serial1/1
现在
R2
学到
1.0.0.0
的网络是来自
R3
了
第三步:
把
R1
的
s1/0
的接口也被动掉,且断开
lookback0
接口。且打开个各个路由器的
debug ip rip
R1(config)#router rip
R1(config-router)#passive-interface s1/0
R1(config)#int loopback 0
R1(config-if)#shutdown
第四步:
直到
R1
收来
1.0.0.0
的网络是来自
R2
后,再取消
R1
被动
s1/0
接口。
R1#sh ip route
R 1.0.0.0/8 [120/3] via 12.1.1.2, 00:00:01, Serial1/1
R 23.0.0.0/8 [120/1] via 13.1.1.3, 00:00:19, Serial1/0
[120/1] via 12.1.1.2, 00:00:01, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/1
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial1/0
R1
现在的路由表学到的
1.0.0.0
网络是来自
R2
的
R1(config)#router rip
R1(config-router)#no passive-interface s1/0
第五步:
通过上面的一系列设置,
1.0.0.0
这个网络已经在拓扑上出现
R1―R3―R2―R1
这样的路由环。下面我们看看
debug
信息:
R3#debug ip rip
*Mar 9 00:49:27.839: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (23.1.1.3) #----
发送到
R2
*Mar 9 00:49:27.839: RIP: build update entries
*Mar 9 00:49:27.843: network 1.0.0.0 metric 2
*Mar 9 00:49:27.843: network 13.0.0.0 metric 1
R3#
*Mar 9 00:49:39.335: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:49:39.339: 1.0.0.0 in 4 hops #----
接收来自
R1
为
4
跳
*Mar 9 00:49:39.339: 12.0.0.0 in 1 hops
*Mar 9 00:49:41.343: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:49:41.343: RIP: build flash update entries
*Mar 9 00:49:41.347: network 1.0.0.0 metric 5
R3#
*Mar 9 00:49:45.463: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:49:45.463: 1.0.0.0 in 7 hops
*Mar 9 00:49:47.463: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:49:47.463: RIP: build flash update entries
*Mar 9 00:49:47.463: network 1.0.0.0 metric 8
R3#
*Mar 9 00:49:51.347: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:49:51.347: 1.0.0.0 in 10 hops
*Mar 9 00:49:53.355: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:49:53.355: RIP: build flash update entries
*Mar 9 00:49:53.359: network 1.0.0.0 metric 11
*Mar 9 00:49:53.507: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:49:53.507: RIP: build update entries
*Mar 9 00:49:53.511: network 1.0.0.0 metric 11
*Mar 9 00:49:53.511: network 13.0.0.0 metric 1
R3#
*Mar 9 00:49:57.387: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:49:57.391: 1.0.0.0 in 13 hops
R3#
*Mar 9 00:49:59.395: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:49:59.395: RIP: build flash update entries
*Mar 9 00:49:59.399: network 1.0.0.0 metric 14
R3#
*Mar 9 00:50:03.583: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:50:03.587: 1.0.0.0 in 16 hops (inaccessible) #--
跳数去到
16
,已经无限大,不可达了。于是
R3
马上向所有接口发送
16
跳不可达信息。↓↓
R3#
*Mar 9 00:50:05.587: RIP: sending v1 flash update to 255.255.255.255 via Serial1/1 (13.1.1.3)
*Mar 9 00:50:05.587: RIP: build flash update entries
*Mar 9 00:50:05.591: network 1.0.0.0 metric 16
*Mar 9 00:50:05.591: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 00:50:05.595: RIP: build flash update entries
*Mar 9 00:50:05.595: network 1.0.0.0 metric 16
R3# --------------------
同时
R3
也收到其他路由器发来不可达的信息
------------
*Mar 9 00:50:07.603: RIP: received v1 update from 23.1.1.2 on Serial1/0
*Mar 9 00:50:07.607: 1.0.0.0 in 16 hops (inaccessible)
*Mar 9 00:50:07.863: RIP: received v1 update from 13.1.1.1 on Serial1/1
*Mar 9 00:50:07.867: 1.0.0.0 in 16 hops (inaccessible)
*Mar 9 00:50:07.867: 12.0.0.0 in 1 hops
(二) 水平分割
水平分割规则是:从一个接口学习到的路由不会再广播回该接口。
下面我们看看在串行链路中水平分割的情况。为了方便测试我们先断开
R1
的
s1/0
接口
R1(config)#int s1/0
R1(config-if)#shutdown
看看
R2
、
R3
的路由表
R2#sh ip route
R 1.0.0.0/8 [120/1] via 12.1.1.1, 00:00:17, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
可以看到
R2
学到了来自
R1
的
1.0.0.0/8
路由条目
R3#sh ip route
R 1.0.0.0/8 [120/2] via 23.1.1.2, 00:00:14, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
R 12.0.0.0/8 [120/1] via 23.1.1.2, 00:00:14, Serial1/0
可以看到
R3
通过
R2
学到了
1.0.0.0/8
路由条目
现在通过
debug ip rip
看看
R2
的接收和发送情况。
R2#debug ip rip
RIP protocol debugging is on
*Mar 9 14:30:51.939: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 14:30:51.943: 1.0.0.0 in 1 hops #---
接收到来自
R1
为
1
跳的路由
R2#
*Mar 9 14:30:53.695: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (12.1.1.2) #----
发送到
R1
的更新
*Mar 9 14:30:53.695: RIP: build update entries
*Mar 9 14:30:53.699: network 23.0.0.0 metric 1
R2#
*Mar 9 14:31:03.315: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (23.1.1.2) #----
发送到
R3
的更新
*Mar 9 14:31:03.315: RIP: build update entries
*Mar 9 14:31:03.319: network 1.0.0.0 metric 2
*Mar 9 14:31:03.319: network 12.0.0.0 metric 1
从
debug
信息可以看到,
R2
从
s1/0
接收
来自
R1
的
1.0.0.0/8
路由条目,再从
s1/0
发送
更新时,只有
23.0.0.0
的网络,并没有包括了
1.0.0.0
的网络,但从
s1/1
发送
到
R3
的更新时,却包括了
1.0.0.0
的网络,这就是说水平分割已经起作用了。
现在我们来看看关闭水平分割的情况
R1(config)#int s1/1
R1(config-if)#no ip split-horizon
R2(config)#int s1/0
R2(config-if)#no ip split-horizon
R2# debug ip rip
*Mar 9 14:46:03.123: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 14:46:03.127: 1.0.0.0 in 1 hops
*Mar 9 14:46:03.127: 12.1.1.0 in 1 hops
*Mar 9 14:46:03.127: 23.0.0.0 in 2 hops
*Mar 9 14:46:03.651: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 14:46:03.651: RIP: build update entries
*Mar 9 14:46:03.655: network 1.0.0.0 metric 2
*Mar 9 14:46:03.655: subnet 12.1.1.0 metric 1
*Mar 9 14:46:03.655: network 23.0.0.0 metric 1
从
debug
信息可以看到,关闭水平分割之后,
R2
从
S1/0
接收
来自
R1
的
1.0.0.0
网络,又从
S1/0
发送回
给
R1
。
现在我们来玩个小游戏,就是利用在
R1
、
R2
都关闭了水平分割,只用两个路由器就能产生一跳一跳地增加到
16
跳的效果,实验前都要打开
R1
、
R2
的
debug ip rip
来监测
1:
先被动掉
R1
的
s1/1
接口
R1(config)#router rip
R1(config-router)#passive-interface s1/1
2:
关闭
loopback0
接口
R1(config)#int loopback 0
R1(config-if)#shutdown
*Mar 9 15:13:25.567: %LINK-5-CHANGED: Interface Loopback0, changed state to administratively down
3:
取消
R1
的
S1/1
接口的被动
R1(config-if)#
R1(config-router)#no passive-interface s1/1
4:
以
R2
为例看看它的
debug ip rip
信息
R2#debug ip rip
*Mar 9 15:13:54.551: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:13:54.551: RIP: build update entries
*Mar 9 15:13:54.555: network 1.0.0.0 metric 2
*Mar 9 15:13:54.555: subnet 12.1.1.0 metric 1
*Mar 9 15:13:54.555: network 23.0.0.0 metric 1
R2#
*Mar 9 15:14:10.347: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:10.351: 1.0.0.0 in 3 hops
*Mar 9 15:14:10.351: 12.1.1.0 in 1 hops
*Mar 9 15:14:10.355: 23.0.0.0 in 2 hops
R2#
*Mar 9 15:14:12.351: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:12.351: RIP: build flash update entries
*Mar 9 15:14:12.355: network 1.0.0.0 metric 4
R2#
*Mar 9 15:14:14.371: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:14.375: 1.0.0.0 in 5 hops
R2#
*Mar 9 15:14:16.375: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:16.375: RIP: build flash update entries
*Mar 9 15:14:16.379: network 1.0.0.0 metric 6
R2#
*Mar 9 15:14:18.495: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:18.499: 1.0.0.0 in 7 hops
R2#
*Mar 9 15:14:20.499: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:20.499: RIP: build flash update entries
*Mar 9 15:14:20.503: network 1.0.0.0 metric 8
R2#
*Mar 9 15:14:22.623: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:22.627: 1.0.0.0 in 9 hops
*Mar 9 15:14:22.763: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:22.763: RIP: build update entries
*Mar 9 15:14:22.767: network 1.0.0.0 metric 10
*Mar 9 15:14:22.767: subnet 12.1.1.0 metric 1
*Mar 9 15:14:22.767: network 23.0.0.0 metric 1
R2#
*Mar 9 15:14:24.895: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:24.899: 1.0.0.0 in 11 hops
R2#
*Mar 9 15:14:26.899: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:26.899: RIP: build flash update entries
*Mar 9 15:14:26.903: network 1.0.0.0 metric 12
R2#
*Mar 9 15:14:28.967: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:28.971: 1.0.0.0 in 13 hops
R2#
*Mar 9 15:14:30.971: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:30.971: RIP: build flash update entries
*Mar 9 15:14:30.975: network 1.0.0.0 metric 14
R2#
*Mar 9 15:14:33.023: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:33.027: 1.0.0.0 in 15 hops
R2#
*Mar 9 15:14:35.027: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:35.027: RIP: build flash update entries
*Mar 9 15:14:35.027: network 1.0.0.0 metric 16
R2#
*Mar 9 15:14:37.083: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 15:14:37.087: 1.0.0.0 in 16 hops (inaccessible)
R2#
*Mar 9 15:14:39.087: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 15:14:39.087: RIP: build flash update entries
*Mar 9 15:14:39.091: network 1.0.0.0 metric 16
上面就是两路由器间关闭水平分割,产生
16
跳的效果了,为了直观中间我删除了部分
debug
信息。
其实原理很简单:
我们把
R1
的
S1/1
出口
passive
了,
R1
就不能把
lo 0
被
shutdown
掉的信息以
flash update
的形式发给
R2
,同时我们也把
R1
和
R2
的两接口的水平分割关了。
这时不知道情况的
R2
就发送更新对
R1
说:“你到
lo 0
是2跳”。而现在
R1
本身已经没有了与自身直连的
lo 0
的0跳信息,所以它别无选择的接受
R2
发来的2跳。
当我们取消
R1
的
S1/1
被动功能,
R1
再对
R2
说:“你到
lo 0
是3跳”。虽然比原来的差,且是从同一个接口收到的,但
R2
它也别无选择。
就这样它们之间就相互“欺骗”,如此循环直到出现16跳。
(三) 毒性逆转
毒性逆转的规则是:从一个接口学习的路由
会发送回
该接口,但是已经被毒化,跳数设置为16跳,不可达。
实验步骤:
1
:为了方便测试我们断开
R1
与
R3
链接的
S1/0
接口
R1(config)#int s1/0
R1(config-if)#shutdown
2
:各个路由器全部路由都学到了,在各个路由器打开
debug ip rip
观察
3:
断开
R1
的
loopback0
接口
R1(config)#int loopback 0
R1(config-if)#shutdown
R1#debug ip rip
*Mar 9 17:18:08.811: RIP: received v1 update from 12.1.1.2 on Serial1/1
*Mar 9 17:18:08.815: 1.0.0.0 in 16 hops (inaccessible)
*Mar 9 17:18:08.815: 23.0.0.0 in 1 hops
R1#
*Mar 9 17:18:12.807: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (12.1.1.1)
*Mar 9 17:18:12.807: RIP: build update entries
*Mar 9 17:18:12.811: network 1.0.0.0 metric 16
从接口
S1/1
收到,又出接口
S1/1
发出去,但已经标记为
16
跳不可达
R2#debug ip rip
*Mar 9 17:17:46.727: RIP: received v1 update from 12.1.1.1 on Serial1/0
*Mar 9 17:17:46.731: 1.0.0.0 in 16 hops (inaccessible)
R2#
*Mar 9 17:17:48.731: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (12.1.1.2)
*Mar 9 17:17:48.731: RIP: build flash update entries
*Mar 9 17:17:48.735: network 1.0.0.0 metric 16
*Mar 9 17:17:48.735: RIP: sending v1 flash update to 255.255.255.255 via Serial1/1 (23.1.1.2)
*Mar 9 17:17:48.739: RIP: build flash update entries
*Mar 9 17:17:48.739: network 1.0.0.0 metric 16
R2#
*Mar 9 17:17:50.799: RIP: received v1 update from 23.1.1.3 on Serial1/1
*Mar 9 17:17:50.803: 1.0.0.0 in 16 hops (inaccessible)
从信息也已经看到从同一个接口收到,也在同一个接口发出,但也是已经毒化
R3#debug ip rip
*Mar 9 17:18:07.551: RIP: received v1 update from 23.1.1.2 on Serial1/0
*Mar 9 17:18:07.555: 1.0.0.0 in 16 hops (inaccessible)
*Mar 9 17:18:07.555: 12.0.0.0 in 1 hops
R3#
*Mar 9 17:18:20.955: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (23.1.1.3)
*Mar 9 17:18:20.955: RIP: build update entries
*Mar 9 17:18:20.955: network 1.0.0.0 metric 16
R3
的情况也是一样,从相同的接口接收和发送。
注意
!!:
以上的效果是不用关闭水平分割的,否则不能说明毒性逆转
(四) 触发更新
触发更新的规则是
:
一旦检测到路由崩溃
,
立即广播路由刷新报文
,
而不等到下一刷新周期
下面我们就以
R1
、
R2
为例子做实验
1
:完成基本配置,都学全路由后,我们在
R1
打开
debug ip rip
和
debug ip rip trigger
2:
先在
R1
的
S1/1
启动触发更新(
ip rip triggered
)
R1(config)#int s1/1
R1(config-if)#ip rip triggered
3
:查看
debug
信息
R1#debug ip rip
RIP protocol debugging is on
R1#debug ip rip trigger
RIP trigger debugging is on
*Mar 9 18:26:55.963: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第一次请求
*Mar 9 18:26:55.963: RIP: Start poll timer from 12.1.1.1 on Serial1/1
*Mar 9 18:26:59.707: RIP-TIMER: sending timer on Serial1/1 expired
*Mar 9 18:26:59.999: RIP-TIMER: age timer expired
*Mar 9 18:27:00.247: RIP-TIMER: sending timer on Loopback0 expired
*Mar 9 18:27:00.963: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired #----
第一次超时
*Mar 9 18:27:00.963: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第二次请求
*Mar 9 18:27:00.967: RIP: Start poll timer from source 12.1.1.1 on Serial1/1
R1#
*Mar 9 18:27:05.967: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired #----
第二次超时
*Mar 9 18:27:05.967: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第三次请求
*Mar 9 18:27:05.967: RIP: Start poll timer from source 12.1.1.1 on Serial1/1
R1#
*Mar 9 18:27:09.999: RIP-TIMER: age timer expired
*Mar 9 18:27:10.967: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired #----
第三次超时
*Mar 9 18:27:10.967: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第四次请求
*Mar 9 18:27:10.971: RIP: Start poll timer from source 12.1.1.1 on Serial1/1
R1#
*Mar 9 18:27:15.971: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired #----
第四次超时
*Mar 9 18:27:15.971: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第五次请求
*Mar 9 18:27:15.975: RIP: Start poll timer from source 12.1.1.1 on Serial1/1
R1#
*Mar 9 18:27:19.999: RIP-TIMER: age timer expired
*Mar 9 18:27:20.975: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired #----
第五次超时
*Mar 9 18:27:20.975: RIP: sending triggered request on Serial1/1 to 255.255.255.255 #----
第六次请求
*Mar 9 18:27:20.979: RIP: Start poll timer from source 12.1.1.1 on Serial1/1
R1#
*Mar 9 18:27:25.979: RIP-TIMER: polling timer on Serial1/1(12.1.1.1) expired
*Mar 9 18:27:25.979: RIP: Poll 6 times on Serial1/1 thru 12.1.1.1 without any ack #----
经过
6
次触发请求后还没有收到确认消息
R1#
*Mar 9 18:27:29.463: RIP-TIMER: sending timer on Serial1/1 expired
*Mar 9 18:27:29.463: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (12.1.1.1) #---
请求无效后,发送一个普通的广播更新
*Mar 9 18:27:29.467: RIP: build update entries
*Mar 9 18:27:29.467: network 1.0.0.0 metric 1
*Mar 9 18:27:29.467: network 13.0.0.0 metric 1
*Mar 9 18:27:29.999: RIP-TIMER: age timer expired
R1#
*Mar 9 18:27:32.895: RIP: received v1 update from 12.1.1.2 on Serial1/1
*Mar 9 18:27:32.899: 23.0.0.0 in 1 hops #----
还可以收到
R2
来的信息,是因为
R2
始终在广播着他自己的
RIP
更新
从
R1
的
debug
调试信息中,显示的就是
R1
启动了触发更新试图与链路的另一端的
R2
建立触发更新关系。
R1
以
5s
为每个周期发送轮询(
Poll
)
并等待确认,但发送了
6
个
触发请求后还没有收到确认消息,那么整个轮询过程就认为超时,触发更新建立不成功,路由器
R1
等待下一个普通的更新时间,并广播一个普通
RIP
的更新。而在整个过程
R2
始终在广播着他自己的
RIP
更新。
4:
我们现在在
R2
也打开
debug ip rip
和
debug ip rip
,并且把
R2
的
S1/1
接口也启动触发更新(
ip rip triggered
)。
R2#debug ip rip
RIP protocol debugging is on
R2#debug ip rip trigger
RIP trigger debugging is on
R2(config)#int s1/0
R2(config-if)#ip rip triggered
*Mar 9 19:43:45.231: RIP: sending triggered request on Serial1/0 to 255.255.255.255 #----R2
发送触发更新请求
*Mar 9 19:43:45.231: RIP: Start poll timer from 12.1.1.2 on Serial1/0
*Mar 9 19:43:45.347: RIP: received v1 triggered update from 12.1.1.1 on Serial1/0 #----
由
S1/0
收到来自
R1
的触发更新
*Mar 9 19:43:45.351: RIP: sending v1 ack to 12.1.1.1 via Serial1/0 (12.1.1.2), #----R2
通过
S1/0
接口向
R1
发送确认信息
flush, seq# 0
*Mar 9 19:43:45.355: RIP: Stop trigger rip poll timer for 12.1.1.2 on Serial1/0 #----
停止向
R1
发送触发更新的轮询
*Mar 9 19:43:45.355: RIP: Trigger rip running on network 12.0.0.0 thru Serial1/0 #----
透过
S1/0
接口在网络
12.0.0.0
上运行着
RIP
的触发更新
*Mar 9 19:43:45.359: RIP: 12.1.1.1 change state from DOWN to INIT
*Mar 9 19:43:45.359: RIP: send v1 triggered flush update to 12.1.1.1 on Serial1/0 with no route
*Mar 9 19:43:45.363: RIP: assigned sequence number 0 on Serial1/0
*Mar 9 19:43:45.363: RIP: start retransmit timer of 12.1.1.1
*Mar 9 19:43:45.363: 1.0.0.0 in 1 hops
*Mar 9 19:43:45.367: 13.0.0.0 in 1 hops
*Mar 9 19:43:45.443: RIP: received v1 triggered ack from 12.1.1.1 on Serial1/0
R2#
*Mar 9 19:43:45.447: RIP: 12.1.1.1 change state from INIT to LOADING
*Mar 9 19:43:45.447: RIP: send v1 triggered update to 12.1.1.1 on Serial1/0
*Mar 9 19:43:45.447: RIP: assigned sequence number 1 on Serial1/0
*Mar 9 19:43:45.451: RIP: build update entries
*Mar 9 19:43:45.451: route 8: network 23.0.0.0 metric 1
*Mar 9 19:43:45.455: RIP: Update contains 1 routes, start 8, end 8
*Mar 9 19:43:45.455: RIP: start retransmit timer of 12.1.1.1
*Mar 9 19:43:45.463: RIP: received v1 triggered ack from 12.1.1.1 on Serial1/0
seq# 1
*Mar 9 19:43:45.463: RIP: 12.1.1.1 change state from LOADING to FULL
*Mar 9 19:43:46.539: RIP-TIMER: age timer expired #----
计数器超时
R2#
*Mar 9 19:43:53.259: RIP-TIMER: sending timer on Serial1/1 expired
*Mar 9 19:43:53.259: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (23.1.1.2)
*Mar 9 19:43:53.263: RIP: build update entries
*Mar 9 19:43:53.263: network 1.0.0.0 metric 2
*Mar 9 19:43:53.263: network 12.0.0.0 metric 1
R2#
*Mar 9 19:43:55.491: RIP: received v1 update from 23.1.1.3 on Serial1/1
*Mar 9 19:43:55.495: 1.0.0.0 in 2 hops
*Mar 9 19:43:55.495: 13.0.0.0 in 1 hops
R2#
*Mar 9 19:43:56.539: RIP-TIMER: age timer expired
R2#
*Mar 9 19:44:06.539: RIP-TIMER: age timer expired
*Mar 9 19:44:07.383: RIP-TIMER: sending timer on Serial1/0 expired
从上面的
debug
信息,可以看到,由请求到轮询到确认是很短的时间的。再就是触发状态从
DOWN
状态
开始,经过
INT
和
LOADING
状态,最后到为
FULL
状态。而后的就是进行路由信息的交换和更新确认了。而在输出信息的后面也出现了
RIP
更新计时器超时,做实验时候花多些时间,细心观察
debug
信息,
R2
会一直没有向
R1
发送新的更新
和从
R1
那里接收新的更新
。这就是
RIP
启用触发更新会关闭计时器的效果。
下面再看看
R1
和
R2
的路由表和
RIP
数据库
R1#show ip route
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
R 23.0.0.0/8 [120/1] via 12.1.1.2, 00:10:05, Serial1/1
[120/1] via 13.1.1.3, 00:00:03, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/1
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial1/0
R2#show ip route
R 1.0.0.0/8 [120/1] via 12.1.1.1, 00:10:40, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial1/0
R 13.0.0.0/8 [120/1] via 12.1.1.1, 00:39:40, Serial1/0
[120/1] via 23.1.1.3, 00:00:14, Serial1/1
R1#show ip rip database
1.0.0.0/8 auto-summary
1.1.1.0/24 directly connected, Loopback0
12.0.0.0/8 auto-summary
12.1.1.0/24 directly connected, Serial1/1
13.0.0.0/8 auto-summary
13.1.1.0/24 directly connected, Serial1/0
23.0.0.0/8 auto-summary
23.0.0.0/8
[1] via 13.1.1.3, 00:00:06, Serial1/0
[1] via 12.1.1.2, 00:10:22 (permanent), Serial1/1
* Triggered Routes:
- [1] via 12.1.1.2, Serial1/1
R2#show ip rip database
1.0.0.0/8 auto-summary
1.0.0.0/8
[1] via 12.1.1.1, 00:11:14 (permanent), Serial1/0
* Triggered Routes:
- [1] via 12.1.1.1, Serial1/0
12.0.0.0/8 auto-summary
12.1.1.0/24 directly connected, Serial1/0
13.0.0.0/8 auto-summary
13.0.0.0/8
[1] via 23.1.1.3, 00:00:02, Serial1/1
[1] via 12.1.1.1, 00:11:14 (permanent), Serial1/0
* Triggered Routes:
- [1] via 12.1.1.1, Serial1/0
23.0.0.0/8 auto-summary
23.1.1.0/24 directly connected, Serial1/1
从上面的信息我们已经看到,路由表阴影部分的路由条目时间已经变得很大了,这是因为启动了触发更新学
到的条目是
永久
(
permanent
)的,在
R1
、
R2
的
RIP
数据库也已经证明了。
(五) 抑制计时器
[url]http://sharkii.blog.51cto.com/325987/64146[/url]