1 / 34

基礎網路管理

第七章 路由資訊協定 (RIP) 製作:林錦財. 基礎網路管理. 大綱. RIP 之運作原理 路由迴圈問題 第一版與第二版之差異性 RIP 之設定 預設路由之通告. RIP 路由表更新. RIP 第一版訊息格式. RIP 訊息封裝於 UDP 520 埠之 IP 封包內 命令欄:要求 (1); 回應 (2) 版本欄:第一版 (1); 第二版 (2) 協定別: TCP/IP (2). 送出訊息範例. R1 送出之 RIP 訊息. RIP 路徑選擇. Hop 計算 路由器每隔 30 秒更新 最多支援相同 hop 數的 6 條路徑.

noel-solis
Télécharger la présentation

基礎網路管理

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第七章 路由資訊協定(RIP) 製作:林錦財 基礎網路管理

  2. 大綱 • RIP之運作原理 • 路由迴圈問題 • 第一版與第二版之差異性 • RIP之設定 • 預設路由之通告

  3. RIP 路由表更新

  4. RIP 第一版訊息格式 • RIP 訊息封裝於 UDP 520埠之IP封包內 • 命令欄:要求(1); 回應(2) • 版本欄:第一版(1); 第二版(2) • 協定別:TCP/IP (2)

  5. 送出訊息範例 R1 送出之RIP訊息

  6. RIP 路徑選擇 • Hop 計算 • 路由器每隔30秒更新 • 最多支援相同hop數的6條路徑 19.2 kbps T1 T1 T1

  7. 路由迴圈問題辦法 • 指定最大量度(躍程)距離 15

  8. 路由迴圈問題辦法 • 水平分割法

  9. 路由迴圈問題辦法 • 路由毒殺與觸發更新 • 毒殺:設距離為無窮大(16) • 觸發更新:立即通告斷線情況與回復情況

  10. S0 Routing Table Routing Table Routing Table S0 10.1.0.0 10.2.0.0 10.3.0.0 0 0 E0 0 S0 S0 10.2.0.0 10.3.0.0 S0 10.4.0.0 0 S1 Infinity 0 S0 10.3.0.0 1 S0 10.4.0.0 PossiblyDown S1 10.2.0.0 1 10.4.0.0 2 S0 10.1.0.0 2 E1 10.1.0.0 2 路由迴圈問題辦法 • 反向毒殺 • 未收到來源更新訊息的路由被標示「possible down」 • 送出距離為無窮大(16)的更新訊息給來源 10.4.0.0 10.1.0.0 10.2.0.0 10.3.0.0 X A B C E0 S0 S0 S1 S0 E0 PoisonReverse

  11. 路由迴圈問題辦法 • Hold-down 計時器 網路10.4.0.0 是無法到達的 Update after hold-down Time 10.1.0.0 10.2.0.0 10.3.0.0 X A B C E0 S0 S0 S1 S0 E0 Update after hold-down Time

  12. RIP 設定 • 啟動RIP協定 Router(config)#router rip Router(config-router)#network network-number • 選擇所能到達的網路 • 必須是有效的網路

  13. router rip network 172.16.0.0 network 10.0.0.0 router rip network 10.0.0.0 router rip network 192.168.1.0 network 10.0.0.0 RIP 設定範例 E0 S2 S2 S3 S3 E0 192.168.1.0 172.16.1.0 A B C 10.1.1.1 172.16.1.1 10.1.1.2 10.2.2.2 192.168.1.1 10.2.2.3 2.3.0.0 2.3.0.0

  14. 查看路由表 E0 S2 S2 S3 S3 E0 192.168.1.0 172.16.1.0 A B C 10.1.1.1 172.16.1.1 10.1.1.2 10.2.2.2 192.168.1.1 10.2.2.3 RouterA#sh 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, * - candidate default U - per-user static route, o - ODR T - traffic engineered 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, Ethernet0 10.0.0.0/24 is subnetted, 2 subnets R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:07, Serial2 C 10.1.1.0 is directly connected, Serial2 R 192.168.1.0/24 [120/2] via 10.1.1.2, 00:00:07, Serial2

  15. RIP 第二版 • RIP 第一版 1 (RIP v1) 有區分位址等級(classful) • RIP 第二版 (RIP v2)為無級式(classless)路由協定,增加如下功能: • 可攜帶額外路由資訊,包括路徑標示、下一步位址、以及子網遮罩 • 表格更新之認證機制 • 支援可變長度子網遮罩 (variable-length subnet mask, VLSM),故允許有各種大小之子網

  16. RIP 第二版訊息格式

  17. 認證

  18. RIP 第一版與第二版的比較 • 第一版 • 以有限廣播(255.255.255.255)傳送更新訊息 • 不支援VLSM,子網遮罩需相同 • 第二版 • 以群播(224.0.0.9)傳送更新訊息 • 可支援VLSM

  19. RIP 第一版與第二版相容性 • 預設上,第一版協定可接受第一版與第二版的更新訊息,但第二版協定不能接受第一版的更新訊息 • 可利用控制送出或接收 RIP 更新封包命令調整(參考下一頁)

  20. 控制送出 RIP 更新訊息之版本

  21. 控制接收 RIP 更新訊息之版本

  22. 查看RIP訊息 E0 S2 S2 S3 S3 E0 192.168.1.0 172.16.1.0 A B C 10.1.1.1 172.16.1.1 10.1.1.2 10.2.2.2 192.168.1.1 10.2.2.3 RouterA#sh ip protocols Routing Protocol is "rip" Sending updates every 30 seconds, next due in 0 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain Ethernet0 1 1 2 Serial2 1 1 2 Routing for Networks: 10.0.0.0 172.16.0.0 Routing Information Sources: Gateway Distance Last Update 10.1.1.2 120 00:00:10 Distance: (default is 120)

  23. debug ip rip 命令 E0 S2 S2 S3 S3 E0 192.168.1.0 172.16.1.0 A B C 10.1.1.1 172.16.1.1 10.1.1.2 10.2.2.2 192.168.1.1 10.2.2.3 RouterA#debug ip rip RIP protocol debugging is on RouterA# 00:06:24: RIP: received v1 update from 10.1.1.2 on Serial2 00:06:24: 10.2.2.0 in 1 hops 00:06:24: 192.168.1.0 in 2 hops 00:06:33: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.16.1.1) 00:06:34: network 10.0.0.0, metric 1 00:06:34: network 192.168.1.0, metric 3 00:06:34: RIP: sending v1 update to 255.255.255.255 via Serial2 (10.1.1.1) 00:06:34: network 172.16.0.0, metric 1

  24. ip classless 命令用法 • 若是全域組態沒有 ip classless 命令 不使用預設路由,因為 10.0.0.0 網路為直接相連

  25. ip classless 命令用法 • 若是全域組態有 ip classless 命令 會使用預設路由,因為允許 10.2.2.0 子網在外

  26. 相關命令 • show ip rip database • show ip protocols {summary} • show ip route • debug ip rip {events} • show ip interface brief

  27. 相關命令 • 停用水平分割 (split horizon): GAD(config-if)#no ip split-horizon • 使用下列命令更改 更新(update,預設30秒)、失效(invalid,預設180秒)、holddown(預設180秒) 與刷除(flush,預設240秒) 計時器之設定值: Router(config-router)# timers basic-update invalid holddown flush [sleeptime ]

  28. 相關命令 • passive-interface 命令 • 使某介面不送出RIP路由更新訊息 (但仍會接收RIP更新訊息) Router(config)#router rip Router(config-router)# passive interface 介面 編號 • neighbor 命令 • 定義欲與其交換路由資訊的鄰居路由器 Router(config)#router rip Router(config-router)# neighbor 鄰居IP位址

  29. 非連續性子網路

  30. 解決非連續性子網路問題 • 使用 no auto-summary 命令 BHM(config)# router rip BHM(config-router)# version 2 BHM(config-router)# network 172.31.29.0 255.255.255.0 BHM(config-router)# network 192.168.13.0 255.2.55.255.0 BHM(config-router)# no auto-summary

  31. 重覆的子網路

  32. RIP負載平衡 • RIP 可以在多達6條(預設是4條)同成本路徑上做負載平衡 (load balancing) #show ip route 10.0.0.0

  33. 管理性距離預設值

  34. RIP與浮動靜態路徑 • 當到相同目標的動態路徑還存在時,路由表不會出現該靜態路由

More Related