Rip計時器

Rip計時器

2009-10-08 14:29:47|  分類:cisco路由交換|  標籤:|字號訂閱

在一開始學習CCNA的時候可能很多人會碰到和我一樣的問題那就是關於RIP協議的定時器的區別,RIP一共有4組定時器分別代表不同的時間段而且比較容易搞混,所以在這裏給大家詳細介紹一下,希望能對大家的學習有幫助。

首先我們先來看看RIP協議的4組定時器: 

2009年10月8日 - jaymache -

Update timer(定期更新時間,默認時間是30s)這個沒什麼可說的,就是RIP啓動之後每隔一定時間從啓動rip協議的接口不斷髮出響應消息(Response Message)並且通過廣播255.255.255.255或者組播224.0.0.9發送定期更新(RIPv1使用廣播RIPv2使用組播)。

*Mar 19 08:08:00.359: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (20.1.1.1)

*Mar 19 08:08:00.359: RIP: build update entries

*Mar 19 08:08:00.359: network 1.0.0.0 metric 2

*Mar 19 08:08:00.359: network 10.0.0.0 metric 1

*Mar 19 08:08:28.467: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (20.1.1.1)

*Mar 19 08:08:28.467: RIP: build update entries

*Mar 19 08:08:28.467: network 1.0.0.0 metric 2

*Mar 19 08:08:28.467: network 10.0.0.0 metric 1

Invalid timer(失效時間定時器,默認時間是180s)從每個路由條目被建立的時候RIP就爲它建立一個180s的計時器,如果在這個時間內沒有收到更新則路由跳數自動變成16跳,就認爲是route invalid

    顯示爲:x.x.x.x is possiblely down

R 1.0.0.0/8 [120/1] via 10.1.1.1, 00:02:59, Serial2/0

20.0.0.0/24 is subnetted, 1 subnets

C 20.1.1.0 is directly connected, Serial1/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial2/0

R 1.0.0.0/8 is possibly down, routing via 10.1.1.1, Serial2/0

20.0.0.0/24 is subnetted, 1 subnetsC 20.1.1.0 is directly connected, Serial1/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial2/0

 

Holdown timer(抑制時間,默認時間是180s)這是本次的重點也是大家容易混的地方,它是從Invalid timer完畢之後開始計時的,在這個時間裏即不接受也不發送任何關於該條目的更新信息,也就是說在這段時間內把自己和外界隔離開來。但是問題出來了,180s的Invalid timer之後只有60s時間Flush timer就到期刪除路由條目了,但是又有180s的時間是不能接受更新的於是這個時間變得毫無意義

經過查看一些資料後才發現其實這個時間是Cisco IOS的一個stability feature也就是Cisco自己加進來的,書上寫的是180s但是實際實驗發現大概只有30s左右,主要用途是防止環路

例如下面的情形: 

 

2009年10月8日 - jaymache -

C路由器的s2接口因爲某種原因斷了,B路由器接收不到前往C的路由更新,該路由條目經過180s變爲不可用,但是恰好在這個時候A路由器路由定期更新了從B那裏學到的前往C的條目,如果這時候B接受了這個更新則B以爲可以從A到達C於是環路就形成了。

所以Cisco設定了這個holdown timer,於是B路由器Invalid timer 180s後進入holdown timer,這時候A路由器關於到達C的路由條目更新被無視,差不多30s左右的時間裏A路由器到C的條目也進入了Invalid timer狀態,就不會向B發送更新了。

當無效計時器走完180s後 進入保持計時器60s 在這期間 路由條目不會被清除 而是始終保持possibly down的狀態 這時即使收到同源的正常更新信息 路由條目也會保持possibly down的狀態;如果此時收到更優的路由條目 會增加新的路由條目 而那possibly down狀態的路由條目繼續保持possibly down狀態。

R1

R1(config-router)#no passive-interface s1/0

 

R2

R 1.0.0.0/8 is possibly down, routing via 10.1.1.1, Serial2/0

20.0.0.0/24 is subnetted, 1 subnets

C 20.1.1.0 is directly connected, Serial1/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial2/0

Flush timer(刷新時間,默認時間是240s)一般和Invalid timer同時初始化,Cisco IOS初始化爲240s,比Invalid timer長60s。在該計時器到時間後將此路由條目從router table中刪除

20.0.0.0/24 is subnetted, 1 subnets

C 20.1.1.0 is directly connected, Serial1/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial2/0

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章