




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、第 4 章RIP動態(tài)路由協(xié)議包括距離向量路由協(xié)議和鏈路狀態(tài)路由協(xié)議。RIP(Routing InformationProtocols,路由信息協(xié)議)是使用最廣泛的距離向量路由協(xié)議。RIP 是為小型網(wǎng)絡(luò)環(huán)境設(shè)計的,因為這類協(xié)議的路由學(xué)習(xí)及路由更新將產(chǎn)生較大的流量,占用過多的帶寬。4.1RIP 概述RIP 是由Xerox 在 70 年發(fā)的,最初定義在 RFC1058 中。RIP 用兩種數(shù)據(jù)包傳輸更新:更新和請求,每個有 RIP 功能的路由器默認(rèn)情況下每隔 30 秒利用 UDP 520 端口向與它直連的網(wǎng)絡(luò)鄰居廣播(RIP v1)或組播(RIP v2)路由更新。因此路由器不知道網(wǎng)絡(luò)的全局情況,如果路
2、由更新在網(wǎng)絡(luò)上慢,將會導(dǎo)致網(wǎng)絡(luò)收斂較慢,造成路由環(huán)路。為了避免路由環(huán)路,RIP 采用水平分割、毒性逆轉(zhuǎn)、定義最大跳數(shù)、閃式更新、抑制計時 5 個機(jī)制來避免路由環(huán)路。RIP 協(xié)議分為版本 1 和版本 2。不論是版本 1 或版本 2,都具備下面的特征:是距離向量路由協(xié)議;使用跳數(shù)(Hop Count)作為度量值; 3默認(rèn)路由更新周期為 30 秒;4.5.6.7.8.管理距離(AD)為 120;支持觸發(fā)更新;最大跳數(shù)為 15 跳;支持等價路徑,默認(rèn) 4 條,最大 6 條;使用 UDP520 端口進(jìn)行路由更新。而 RIPv1 和RIPv2 的區(qū)別如表 4-1。表 4-1 RIPv1 和 RIPv2 的
3、區(qū)別4.2RIPv1實驗 1:RIPv1 基本配置1.實驗?zāi)康耐ㄟ^本實驗可以掌握:在路由器上啟動 RIPv1 路由進(jìn)程啟用參與路由協(xié)議的接口,并且通告網(wǎng)絡(luò)理解路由表的含義查看和調(diào)試 RIPv1 路由協(xié)議相關(guān)信息RIPv1RIPv2在路由更新的過程中不攜帶子網(wǎng)信息在路由更新的過程中攜帶子網(wǎng)信息不提供認(rèn)證提供明文和 MD5 認(rèn)證不支持 VLSM 和 CIDR支持 VLSM 和CIDR采用廣播更新采用組播(224.0.0.9)更新有類別(Classful)路由協(xié)議無類別(Classless)路由協(xié)議2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-1 所示。圖 4-1RIPv1 的基本配置3.實驗步驟步驟 1:配置路由
4、器 R1 R1(config)#router rip R1(config-router)#ver R1(config-router)#network R1(config-router)#network步驟 2:配置路由器 R2 R2(config)#router rip R2(config-router)#ver R2(config-router)#network R2(config-router)#network步驟 3:配置路由器 R3 R3(config)#router rip R3(config-router)#ver R3(config-router)#network R3(conf
5、ig-router)#network步驟 4:配置路由器 R4 R4(config)#router rip R4(config-router)#ver R4(config-router)#network R4(config-router)#network 4.實驗調(diào)試(1) show ip route該命令用來查看路由表。R1#show ip route/啟動RIP 進(jìn)程/配置RIP 版本 1/通告網(wǎng)絡(luò)11.0.0.0192.168.12.01192.168.12.0192.168.23.01192.168.23.0192.168.34.01192.168.34.04.0.0.0Codes:
6、C - connected, S - sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS
7、er area, * - candidate default, U - per-user sic routeo - ODR, P - periodic downloaded sic routeGateway of last resort is not setC192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 ibnetted, 1 subnetsC R RR1.1.1.0 is directly connected, Loack04.0.0.0/8 120/3 via 192.168.12.2, 00:00:03, Ser
8、ial0/0/0192.168.23.0/24 120/1 via 192.168.12.2, 00:00:03, Serial0/0/0192.168.34.0/24 120/2 via 192.168.12.2, 00:00:03, Serial0/0/0以上輸出表明路由器 R1 學(xué)到了 3 條 RIP 路由,其中路由條目“R 4.0.0.0/8192.168.12.2, 00:00:03, Serial0/0/0”的含義如下:120/3viaR:路由條目是通過 RIP 路由協(xié)議學(xué)習(xí)來的; 4.0.0.0/8:目的網(wǎng)絡(luò);120:RIP 路由協(xié)議的默認(rèn)管理距離;3: 度量值,從路由器 R1
9、到達(dá)網(wǎng)絡(luò) 4.0.0.0/8 的度量值為 3 跳;192.168.12.2:下一跳地址;00:00:03:距離下一次更新還有 27(30-3)秒; Serial0/0/0:接收該路由條目的本路由器的接口。同時通過該路由條目的掩碼長度可以看到,RIPv1 確實不傳遞子網(wǎng)信息。(2)show ip protocols該命令查看 IP 路由協(xié)議配置和統(tǒng)計信息。R1#show ip protocols【注意】“/”后的信息表示注釋,不是輸出內(nèi)容。Routing Protocol is rip/路由器上運(yùn)行的路由協(xié)議是RIP Outgoing update filter list for all/在出方
10、向上沒有設(shè)置過濾列表ing update filter list for all/在入方向上沒有設(shè)置過濾列表erfais not seterfais not setSending updates every 30 seconds, next due in 23 seconds/更新周期是 30 秒,距離下次更新還有 23 秒【注意】為了防止更新同步,RIP 會以 15%的誤差發(fā)送更新,即實際發(fā)送更新的周期的范圍是 25.5-30 秒。Invalid after 180 seconds, hold down 180, flushed after 240/invalid after:路由條目如果在
11、 180 秒還沒有收到更新,則被標(biāo)記為無效【技術(shù)要點(diǎn)】被標(biāo)記為無效的路由條目類似如下所示:R4.0.0.0/8 issibly down, routing via 192.168.12.2, Serial0/0/0可以通過很多方式使路由條目進(jìn)入無效周期,例如在接口上加接收 UDP520 端口的ACL,還比如將接口設(shè)置為接口等。/hold down:抑制計時器的時間為 180 秒/flushed after:路由條目如果在 240 秒還沒有收到更新,則從路由表中刪除此路由條目【提示】可以通過下面令來調(diào)整以上三個時間參數(shù):R1(config-router)#timers basic update
12、invalid holddown flushedRedistributing: rip/只運(yùn)行RIP 協(xié)議,沒有其它的協(xié)議重分布進(jìn)來Default vercontrol: send ver1, receive ver1/默認(rèn)發(fā)送版本 1 的路由更新,接收本版 1 的路由更新erfaceSerial0/0/0Send 11Recv Triggered RIP Key-chain 11Loack0/以上三行顯示了運(yùn)行RIP 協(xié)議的接口,以及可以接收和發(fā)送的RIP 路由更新的版本 Automatic network summarization is in effect/RIP 路由協(xié)議默認(rèn)開啟自動匯
13、總功能 um path: 4/RIP 路由協(xié)議可以支持 4 條等價路徑,最大為 6 條【提示】可以通過下面令來修改 RIP 路由協(xié)議支持等價路徑的條數(shù):um-paths numathsR1(config-router)#Routing for Networks: 1.0.0.0192.168.12.0/以上三行表明RIP 通告的網(wǎng)絡(luò) Routing Information Sour:Gateway192.168.12.2Distance120Last Update00:00:03/以上三行表明路由信息源,其中:/gateway:學(xué)習(xí)路由信息的路由器的接口地址,也就是下一跳地址/distance
14、:管理距離/last update:更新發(fā)生在多長時間以前 Distance: (default is 120)/默認(rèn)管理距離是 120(3)debug ip rip該命令可以查看 RIP 路由協(xié)議的動態(tài)更新過程。R1#clear ip route * R1#debug ip ripFeb 9 12:43:13.311: RIP: sending request on Serial0/0/0 to 255.255.255.255Feb Feb Feb Feb Feb Feb Feb Feb Feb Feb FebFeb9 12:43:13.315: RIP: sending request o
15、n Loack0 to 255.255.255.2559 12:43:13.323: RIP: received v1 update from 192.168.12.2 on Serial0/0/09 12:43:13.323:9 12:43:13.323:9 12:43:13.323:4.0.0.0 in 3 hops 192.168.23.0 in 1 hops192.168.34.0 in 2 hops9 12:43:15.311: RIP: sending v1 flash update to 255.255.255.255 via Loack0 (1.1.1.1)9 12:43:15
16、.311: RIP: build flash update entries9 12:43:15.311:9 12:43:15.311:9 12:43:15.311:9 12:43:15.311:9 12:43:15.311:network 4.0.0.0 metric 4network 192.168.12.0 metric 1network 192.168.23.0 metric 2network 192.168.34.0 metric 3RIP: sending v1 flash update to 255.255.255.255 via Serial0/0/0(192.168.12.1)
17、Feb 9 12:43:15.311: RIP: build flash update entriesFeb 9 12:43:15.311:network 1.0.0.0 metric 1通過以上輸出,可以看到 RIPv1 采用廣播更新(255.255.255.255),分別向 Loack0和 s0/0/0 發(fā)送路由更新,同時從 s0/0/0 接收三條路由更新,分別是 4.0.0.0,度量值是 3跳;192.168.34.0, 度量值是 2 跳;192.168.23.0,度量值是 1 跳?!炯夹g(shù)要點(diǎn)】flash update(閃式更新)指的是當(dāng)網(wǎng)絡(luò)上某個路徑的度量值發(fā)生變化,路由器立即發(fā)出更新
18、信息,而不管是否到達(dá)常規(guī)路由信息更新的周期。4.2.2 實驗 2:1.實驗?zāi)康慕涌谂c單播更新通過本實驗可以掌握:(1)接口的含義、配置和應(yīng)用場合(2)單播更新的應(yīng)用場合和配置2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-2 所示。圖 4-2 配置接口由于以太口 g0/0 和g0/1 連接主機(jī),不需要向這些接口發(fā)送路由更新,所以可以考慮將路由器的該接口設(shè)置為接口。3.實驗步驟(1)步驟 1:配置路由器 R1 R1(config)#router rip R1(config-router)#ver R1(config-router)#network R1(config-router)#networkR1(confi
19、g-router)#network110.0.0.0172.16.0.0192.168.12.0R1(config-router)#passive-erface GigabitEthernet0/0 R1(config-router)#passive-erface GigabitEthernet0/1(2)步驟 2:配置路由器 R2R2(config)#router ripR2(config-router)#ver R2(config-router)#network R2(config-router)#network 4.實驗調(diào)試R1#debug ip ripR1#clear ip route
20、 *1192.168.12.02.0.0.0Feb Feb FebFeb9 13:24:41.275: RIP: sending request on Serial0/0/0 to 255.255.255.2559 13:24:41.283: RIP: received v1 update from 192.168.12.2 on Serial0/0/09 13:24:41.283:2.0.0.0 in 1 hops9 13:24:43.275: RIP: sending v1 flash update to 255.255.255.255 via Serial0/0/0(192.168.12
21、.1)FebFeb Feb9 13:24:43.275: RIP: build flash update entries9 13:24:43.275:9 13:24:43.275:network 10.0.0.0 metric 1network 172.16.0.0 metric 1從以上輸出可以看出,路由器 R1 確實不向接口 g0/0 和g0/1 發(fā)送路由更新?!炯夹g(shù)要點(diǎn)】接口只能接收路由更新,不能以廣播或組播方式發(fā)送更新,但是可以以單播的方式發(fā)送更新,配置單播更新令如下:R1(config-router)#neighbor A.B.C.D【實例】如圖 4-3 所示,路由器 R1 只想把路
22、由更新送到路由器 R3 上,由于 RIPv1 路由協(xié)議采用廣播更新,默認(rèn)情況下,路由更新將發(fā)送給以太網(wǎng)上任何一個設(shè)備,為了防止這種情況發(fā)生,把路由器 R1 的 g0/0 配置成接口,然而路由器 R1 還想把路由更新發(fā)送給 R3,這時候必須采用單播更新,為指定的相鄰路由器 R3 發(fā)送路由更新。路由器 R1 具體的配置如下: R1(config)#router ripR1(config-router)#passive-erface GigabitEthernet0/0R1(config-router)#neighbor 172.16.1.3圖 4-3 配置單播更新實驗 3:使用子網(wǎng)地址1.實驗?zāi)康?/p>
23、通過本實驗可以掌握:RIPv1 使用子網(wǎng)地址的條件RIPv1 接收子網(wǎng)路由的原則2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-4 所示。圖 4-4RIPv1 使用子網(wǎng)地址3.實驗步驟步驟 1:配置路由器 R1 R1(config)#router rip R1(config-router)#ver R1(config-router)#network步驟 2:配置路由器 R2 R2(config)#router rip R2(config-router)#ver R2(config-router)#network 4.實驗調(diào)試分別查看 R1、R2 的路有表:R1#show ip route1172.16.0.01
24、172.16.0.0Codes: C - connected, S - sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS level-1, L2 - IS-IS l
25、evel-2ia - IS-ISer area, * - candidate default, U - per-user sic routeo - ODR, P - periodic downloaded sic routeGateway of last resort is not set172.16.0.0/24 ibnetted, 3 subnetsC CR172.16.1.0 is directly connected, Loack0172.16.2.0 is directly connected, Serial0/0/0172.16.3.0 120/1 via 172.16.2.2,
26、00:00:03, Serial0/0/0R2#show ip routeCodes: C - connected, S - sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 -
27、 IS-IS level-1, L2 - IS-IS level-2ia - IS-ISer area, * - candidate default, U - per-user sic routeo - ODR, P - periodic downloaded sic routeGateway of last resort is not set172.16.0.0/24 ibnetted, 3 subnetsRC C172.16.1.0 120/1 via 172.16.2.1, 00:00:21, Serial0/0/0172.16.2.0 is directly connected, Se
28、rial0/0/0172.16.3.0 is directly connected, Loack0從路由器 R1 和 R2 的路由表輸出可以看出,它們互相學(xué)習(xí)到了 24 位的路由條目,從而可以說明,某些情況下 RIPv1 更新確實可以攜帶子網(wǎng)信息?!炯夹g(shù)要點(diǎn)】RIPv1 路由更新可以攜帶子網(wǎng)信息必須同時滿足兩個條件:整個網(wǎng)絡(luò)所有地址在同一個主類網(wǎng)絡(luò);子網(wǎng)掩碼長度必須相同?!舅伎肌考偃缭趫D 4-4 中,路由器 R2 的 s0/0/0 接口的 IP 地址的掩碼長度為 25 位,那么,R2的路由表是怎樣的呢?結(jié)果如下:R2#show ip routeCodes: C - connected, S -
29、 sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-ISer area, * - candi
30、date default, U - per-user sic routeo - ODR, P - periodic downloaded sic routeGateway of last resort is not set172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksR CC172.16.1.0/25 120/1 via 172.16.2.1, 00:00:17, Serial0/0/0172.16.2.0/25 is directly connected, Serial0/0/0172.16.3.0/24 is directly
31、 connected, Loack0由此得出 RIP v1 接收子網(wǎng)路由的原則:如果路由器收到的是子網(wǎng)路由條目,那么就以接收該路由條目的接口的掩碼長度作為該子網(wǎng)路由條目的掩碼長度。4.3RIPv2實驗 4:RIPv2 基本配置1.實驗?zāi)康耐ㄟ^本實驗可以掌握:在路由器上啟動 RIPv2 路由進(jìn)程啟用參與路由協(xié)議的接口,并且通告網(wǎng)絡(luò)auto-summary 的開啟和關(guān)閉查看和調(diào)試 RIPv2 路由協(xié)議相關(guān)信息2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-1 所示。3.實驗步驟(1)步驟 1:配置路由器 R1R1(config)#router ripR1(config-router)#ver2R1(config-r
32、outer)#no auto-summaryR1(config-router)#network R1(config-router)#network(2)步驟 2:配置路由器 R2 R2(config)#router ripR2(config-router)#ver1.0.0.0192.168.12.02R2(config-router)#no auto-summaryR2(config-router)#network R2(config-router)#network(3)步驟 3:配置路由器 R3 R3(config)#router ripR3(config-router)#ver192.1
33、68.12.0192.168.23.02R3(config-router)#no auto-summaryR3(config-router)#network R3(config-router)#network(4)步驟 4:配置路由器 R4 R4(config)#router ripR4(config-router)#ver192.168.23.0192.168.34.02R4(config-router)#no auto-summaryR4(config-router)#network 192.168.34.0R4(config-router)#network 4.0.0.04.實驗調(diào)試(1
34、) show ip routeR1#show ip routeCodes: C - connected, S - sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS
35、 level-1, L2 - IS-IS level-2ia - IS-ISer area, * - candidate default, U - per-user sic routeo - ODR, P - periodic downloaded sGateway of last resort is not setic routeC192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 ibnetted, 1 subnetsC1.1.1.0 is directly connected, Loack04.0.0.0/8 is v
36、ariably subnetted, 2 subnets, 2 masks 4.4.4.0/24 120/3 via 192.168.12.2, 00:00:22, Serial0/0/0192.168.23.0/24 120/1 via 192.168.12.2, 00:00:22, Serial0/0/0192.168.34.0/24 120/2 via 192.168.12.2, 00:00:22, Serial0/0/0RR R從上面輸出的路由條目“4.4.4.0/24”,可以看到 RIPv2 路由更新是攜帶子網(wǎng)信息的。(2)show ip protocolsR1#show ip pr
37、otocolsRouting Protocol is ripOutgoing update filter list for alling update filter list for allerfaerfais not setis not setSending updates every 30 seconds, next due in 19 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Redistributing: ripDefault vererface Serial0/0/0control: send
38、 ver2, receive ver2Send 22Recv Triggered RIP Key-chain 22Loack0/ RIPv2 默認(rèn)情況下只接收和發(fā)送版本 2 的路由更新【提示】可以通過命令“ip rip send ver”和“ip rip receive ver”來控制在路由器接口上接收和發(fā)送的版本,例如在 s0/0/0 接口上接收版本 1 和 2 的路由更新,但是只發(fā)送版本 2 的路由更新,配置如下:R1(config-if)#ip rip send verR1(config-if)#ip rip receive ver21 2【注意】接口特性是優(yōu)于進(jìn)程特性的,對于本實驗,雖
39、然在 RIP 進(jìn)程中配置了“ver2” ,但是如果在接口上配置了“ip rip receive ver2 的路由更新。12”,則該接口可以接收版本 1 和Automatic network summarization is not in effect um path: 4Routing for Networks: 1.0.0.0192.168.12.0Routing Information Sour:Gateway192.168.12.2Distance120Last Update00:00:26Distance: (default is 120)4.3.2 實驗 5:RIPv2 手工匯總1.
40、實驗?zāi)康耐ㄟ^本實驗可以掌握:(1)RIPv2 路由工匯總RIPv2 不支持 CIDR 匯總RIPv2 可以傳遞 CIDR 匯總2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-5 所示。圖 4-5 RIPv2 路由手工匯總3.實驗步驟路由器 R1、R2 和R3 的配置和 4.3.1 實驗 4 相同,R4 的配置如下:R4(config)#router ripR4(config-router)#ver2R4(config-router)#no auto-summary R4(config-router)#network 192.168.34.0R4(config-router)#network 4.0.0.0R4(
41、config)#erfa0/0/0R4(config-if)#ip sum4.實驗調(diào)試ddress rip 4.4.0.0 255.255.252.0/RIP 手工路由匯總(1)在沒有執(zhí)行匯總之前路由器 R1 的路由表如下:R1#show ip routeCodes: C - connected, S - sic, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external
42、 type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-ISer area, * - candidate default, U - per-user sic routeo - ODR, P - periodic downloaded sic routeGateway of last resort is not setC192.168.12.0/24 is directly connect
43、ed, Serial0/0/01.0.0.0/24 ibnetted, 1 subnetsC1.1.1.0 is directly connected, Loack04.0.0.0/24 ibnetted, 4 subnetsR R R R RR4.4.0.0 120/3 via 192.168.12.2, 00:00:21, Serial0/0/04.4.1.0 120/3 via 192.168.12.2, 00:00:21, Serial0/0/04.4.2.0 120/3 via 192.168.12.2, 00:00:12, Serial0/0/04.4.3.0 120/3 via
44、192.168.12.2, 00:00:05, Serial0/0/0192.168.23.0/24 120/1 via 192.168.12.2, 00:00:21, Serial0/0/0192.168.34.0/24 120/2 via 192.168.12.2, 00:00:22, Serial0/0/0從上面的輸出看到路由器 R1 的路由表中有 R4 的 4 條環(huán)回接口的明細(xì)路由。(2)在執(zhí)行匯總以后路由器 R1 的路由表如下:R1#show ip routeCodes: C - connected, S - sic, R - RIP, M - mobile, B - BGPD -
45、EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-Immary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-ISer area, * - candidate default, U - per-user sic routeo
46、- ODR, P - periodic downloaded sic routeGateway of last resort is not setC192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 ibnetted, 1 subnetsC1.1.1.0 is directly connected, Loack04.0.0.0/22 ibnetted, 1 subnetsR RR4.4.0.0 120/3 via 192.168.12.2, 00:00:21, Serial0/0/0192.168.23.0/24 120/1
47、 via 192.168.12.2, 00:00:21, Serial0/0/0192.168.34.0/24 120/2 via 192.168.12.2, 00:00:22, Serial0/0/0上面的輸出表明在路由器 R1 的路由表中接收到匯總路由,當(dāng)然 R2,R3 上也能收到匯總路由?!舅伎肌楷F(xiàn)在將路由器 R4 上四個環(huán)回接口 lo0-lo4 的地址分別修改為 192.168.96.4/24,192.168.97.4/24, 192.168.98.4/24, 192.168.99.4/24,在 s0/0/0 接口下還能夠?qū)崿F(xiàn)路由匯總嗎?R4 上做如下的配置: R4(config-if
48、)#router ripR4(config-router)#network R4(config-router)#network R4(config-router)#network R4(config-router)#network R4(config-if)#ip sum路由器會提示如下信息:192.168.96.0192.168.97.0192.168.98.0192.168.99.0ddress rip 192.168.96.0 255.255.252.0“Summary mask must be greater or equal to major net”顯示的提示信息表明匯總后的掩碼長
49、度必須要大于或等于主類網(wǎng)絡(luò)的掩碼程度,因為 “2224”,所以不能匯總。所以 RIPv2 不支持 CIDR 匯總,但是可以傳遞 CIDR 匯總。解決方案如下:用靜態(tài)路由發(fā)布被匯總的路由R4(config)#ip route 192.168.96.0 255.255.252.0 null0將靜態(tài)路由重分布到 RIP 網(wǎng)絡(luò)中 R4(config)#router ripR4(config-router)#redistribute sic/將靜態(tài)路由重分布到 RIP 路由協(xié)議中R4(config-router)#no R4(config-router)#no R4(config-router)#noR
50、4(config-router)#nonetwork network networknetwork192.168.96.0192.168.97.0192.168.98.0192.168.99.0(3)在路由器 R1 上查看路由表R1#show ip routeCodes: C - connected, S - sic,R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPFer areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA externa
51、l type 2 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-ISer area* - candidate default, U - per-user sP - periodic downloaded sic routeic route, o - ODRGateway of last resort is not setC192.168.12.0/24 is directly connected, Serial0/0/0
52、1.0.0.0/24 ibnetted, 1 subnetsC R RR1.1.1.0 is directly connected, Loack0192.168.23.0/24 120/1 via 192.168.12.2, 00:00:18, Serial0/0/0192.168.34.0/24 120/2 via 192.168.12.2, 00:00:18, Serial0/0/0192.168.96.0/22 120/3 via 192.168.12.2, 00:00:18, Serial0/0/0通過輸出不難看出 RIPv2 是可以傳遞 CIDR 匯總信息的。4.3.3 實驗 6:R
53、IPv2 認(rèn)證和觸發(fā)更新1.實驗?zāi)康耐ㄟ^本實驗可以掌握:RIPv2 明文認(rèn)證的配置和匹配原則RIPv2 MD5 認(rèn)證的配置和匹配原則RIPv2 觸發(fā)更新2.拓?fù)浣Y(jié)構(gòu)實驗拓?fù)淙鐖D 4-1 所示。3.實驗步驟(1)步驟 1:配置路由器 R1R1(config)#key chaest /配置鏈R1(config-keychain)#key 1 /配置KEY IDR1(config-keychain-key)#key-string cisco/配置 KEY ID 的密匙R1(config)#erfa0/0/0R1(config-if)#ip rip authentication mode text/啟
54、用認(rèn)證,認(rèn)證模式為明文,默認(rèn)認(rèn)證模式就是明文,所以也可以不用指定R1(config-if)#ip rip authentication key-cha R1(config-if)#ip rip triggered(2)步驟 2:配置路由器 R2est/在接口上調(diào)用鏈/在接口上啟用觸發(fā)更新R2(config)#key chaestR2(config-keychain)#key 1R2(config-keychain-key)#key-string ciscoR2(config)#erfa0/0/0 triggeredauthentication key-chaR2(config-if)#ip R
55、2(config-if)#ip R2(config-if)# R2(config-if)#ipR2(config-if)#ipripripesterfa0/0/1rip authentication key-charip triggeredest(3)步驟 3:配置路由器 R3R3(config)#key chaestR3(config-keychain)#key 1R3(config-keychain-key)#key-string ciscoR3(config)#erfa0/0/0authentication key-cha triggeredR3(config-if)#ip R3(con
56、fig-if)#ip R3(config-if)# R3(config-if)#ipR3(config-if)#ipripripesterfa0/0/1rip authentication key-charip triggeredest(4)步驟 4:配置路由器 R4R4(config)#key chaestR4(config-keychain)#key 1R4(config-keychain-key)#key-string ciscoR4(config)#erfa0/0/0authentication key-cha triggeredR4(config-if)#ip ripR4(confi
57、g-if)#ip ripest4.實驗調(diào)試(1)show ip protocols R2#show ip protocols Routing Protocol is ripOutgoing update filter list for alling update filter list for allerfaerfais not setis not setSending updates every 30 seconds, next due in 4 seconds Invalid after 180 seconds, hold down 0, flushed after 240/ 由于觸發(fā)更新
58、,hold down 計時器自動為 0Redistributing: ripDefault vererface Serial0/0/0 Serial0/0/1control: send ver2, receive ver2Send 22Recv 22Triggered RIP YesYesKey-chain testtest/以上兩行表明s0/0/0 和s0/0/1 接口啟用了認(rèn)證和觸發(fā)更新 Automatic network summarization is not in effectum path: 4 Routing for Networks:192.168.12.0192.168.23
59、.0Routing Information Sour:Gateway 192.168.12.1192.168.23.3Distance120120Last Update 00:26:1000:26:01Distance: (default is 120)(2)debug ip ripR2#debug ip ripRIP protocol debugging is on R2#clear ip route *Feb 11 13:51:31.827: RIP: sending triggered request on Serial0/0/0 to 224.0.0.9*Feb 11 13:51:31
60、.831: RIP: sending triggered request on Serial0/0/1 to 224.0.0.9*Feb 11 13:51:31.843: RIP: sending triggered request on Serial0/0/0 to 224.0.0.9*Feb 11 13:51:31.847: RIP: sending triggered request on Serial0/0/1 to 224.0.0.9*Feb 11 13:51:31.847: RIP: send v2 triggered flush update to 192.168.12.1 on
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 如何創(chuàng)新共青團(tuán)思政工作
- 外貿(mào)運(yùn)營年終總結(jié)
- 步長制藥年終總結(jié)
- 保育師基礎(chǔ)知識培訓(xùn)課件
- 管道滑脫的護(hù)理措施
- 漣水縣跑道草坪施工方案
- 河湖治理工程安全生產(chǎn)培訓(xùn)
- 冀教版小學(xué)四年級下學(xué)期數(shù)學(xué)期中綜合復(fù)習(xí)假期練習(xí)題單
- 鋼材加工銷售合同
- 2025年幼兒教師年底工作計劃
- 心臟康復(fù)體外反搏
- 關(guān)于納粹德國元首希特勒的歷史資料課件
- 2024年家庭健康管理合同3篇
- 品管圈PDCA參賽作品-提高肝癌介入患者術(shù)后體位舒適率醫(yī)院品質(zhì)管理成果匯報
- 綜合應(yīng)用能力事業(yè)單位考試(綜合管理類A類)試卷及解答參考(2025年)
- 2025年高考作文素材積累之《人民日報》4篇經(jīng)典時評結(jié)構(gòu)賞析
- 房屋水電裝修合同
- 醫(yī)療器械經(jīng)營質(zhì)量管理制度和工作程序目錄
- 浙江省杭州市2023-2024學(xué)年高一上學(xué)期期末考試物理試題(含答案)5
- 2024鋼結(jié)構(gòu)工程施工合同范本
- 2023年浙江農(nóng)商聯(lián)合銀行招聘考試真題
評論
0/150
提交評論