Download presentation
Presentation is loading. Please wait.
1
第七章 路由資訊協定(RIP) 製作:林錦財
基礎網路管理 第七章 路由資訊協定(RIP) 製作:林錦財
2
大綱 RIP之運作原理 路由迴圈問題 第一版與第二版之差異性 RIP之設定 預設路由之通告
3
RIP 路由表更新
4
RIP 第一版訊息格式 RIP 訊息封裝於 UDP 520埠之IP封包內 命令欄:要求(1); 回應(2)
版本欄:第一版(1); 第二版(2) 協定別:TCP/IP (2)
5
送出訊息範例 R1 送出之RIP訊息
6
RIP 路徑選擇 19.2 kbps T1 T1 T1 Hop 計算 路由器每隔30秒更新 最多支援相同hop數的6條路徑
7
路由迴圈問題辦法 指定最大量度(躍程)距離 15
8
路由迴圈問題辦法 水平分割法
9
路由迴圈問題辦法 路由毒殺與觸發更新 毒殺:設距離為無窮大(16) 觸發更新:立即通告斷線情況與回復情況
10
X 路由迴圈問題辦法 反向毒殺 未收到來源更新訊息的路由被標示「possible down」 送出距離為無窮大(16)的更新訊息給來源
X E0 A S0 B C S0 S1 S0 E0 Poison Reverse Routing Table S0 1 2 Infinity E0 S1 E1 Possibly Down
11
X 路由迴圈問題辦法 Hold-down 計時器 10.1.0.0 10.2.0.0 10.3.0.0 A B C 網路 10.4.0.0
是無法到達的 Update after hold-down Time X E0 A S0 B C S0 S1 S0 E0 Update after hold-down Time
12
RIP 設定 Router(config)#router rip
Router(config-router)#network network-number Purpose: This figure presents the Cisco IOS commands used to configure RIP. Emphasize: The figure shows the router rip command and the network network-number command. A proper understanding of these commands will save many problems in the lab. Point out that the network statement contains no subnetting information. Networks are directly connected and are specified as a Class A, B, or C network number. Transition: An example of configuration follows. 選擇所能到達的網路 必須是有效的網路
13
RIP 設定範例 router rip router rip network 172.16.0.0 network 192.168.1.0
S2 S2 S3 S3 E0 A B C router rip network network router rip network network Purpose: The figure shows how the RIP commands operate on the example network. Emphasize: An administrator only specifies directly connected networks that he wishes to publish to other routers. Without the network command, nothing is advertised. With a network command, the router will advertise every subnet within the Class A, B, or C network specified in the configuration. router rip network
14
查看路由表 E0 S2 S2 S3 S3 E0 A B C 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 /24 is subnetted, 1 subnets C is directly connected, Ethernet0 /24 is subnetted, 2 subnets R [120/1] via , 00:00:07, Serial2 C is directly connected, Serial2 R /24 [120/2] via , 00:00:07, Serial2 Purpose: This figure displays the show ip route command which displays the contents of the router’s IP routing table. Emphasize: Discuss the IP routing table in detail. Show the locations of hop count (metric) and the administrative distance (120). Discuss the following fields: R—Refers to routes learned from RIP. via—Refers to the router that informed us about this route. 00:00:07 timer value—RIP updates are every 30 seconds. Ask, “How long until the next update?” the interfaces to used for the best path
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,子網遮罩需相同
以群播( )傳送更新訊息 可支援VLSM
19
RIP 第一版與第二版相容性 預設上,第一版協定可接受第一版與第二版的 更新訊息,但第二版協定不能接受第一版的更 新訊息
20
控制送出 RIP 更新訊息之版本 命令 用途 GAD(config-router)# version { 1 | 2 }
配置軟體送出與接受第1或 第2版更新封包 GAD(config-if)# ip rip send version 1 配置介面只送出第1版更新 封包 GAD(config-if)# ip rip send version 2 配置介面只送出第2版更新 封包 GAD(config-if)# ip rip send version 1 2 配置介面送出第1或第2版 更新封包
21
控制接收 RIP 更新訊息之版本 命令 用途 GAD(config-if)# ip rip receive version 1
配置介面只接受第1版更新 封包 GAD(config-if)# ip rip receive version 2 配置介面只接受第2版更新 封包 GAD(config-if)# ip rip receive version 1 2 配置介面接受第1或第2版 更新封包
22
查看RIP訊息 E0 S2 S2 S3 S3 E0 A B C 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 Ethernet Serial Routing for Networks: Routing Information Sources: Gateway Distance Last Update :00:10 Distance: (default is 120) Purpose: This figure shows how the show ip protocol command is used to monitor RIP operation. Emphasize: The command displays the routing protocols that are active on the router for IP. It also gives network and timer information. Point out the timing information. Point out the list of networks for which the router is injecting routes. Point out the administrative distance metric.
23
debug ip rip 命令 E0 S2 S2 S3 S3 E0 172.16.1.0 192.168.1.0 A B C
RouterA#debug ip rip RIP protocol debugging is on RouterA# 00:06:24: RIP: received v1 update from on Serial2 00:06:24: in 1 hops 00:06:24: in 2 hops 00:06:33: RIP: sending v1 update to via Ethernet0 ( ) 00:06:34: network , metric 1 00:06:34: network , metric 3 00:06:34: RIP: sending v1 update to via Serial2 ( ) 00:06:34: network , metric 1 Purpose: This figure shows the debug ip rip command. Emphasize: Explain that debug commands also provide information for monitoring IP. The first highlighted line lists the source of the updates. The router returned information about two destinations. The last highlighted line shows the broadcast address to which the router sent updates.
24
ip classless 命令用法 若是全域組態沒有 ip classless 命令 不使用預設路由,因為 網路為直接相連
25
ip classless 命令用法 若是全域組態有 ip classless 命令 會使用預設路由,因為允許 子網在外
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 命令 neighbor 命令 使某介面不送出RIP路由更新訊息 (但仍會接收 RIP更新訊息)
Router(config)#router rip Router(config-router)# passive interface 介面 編號 neighbor 命令 定義欲與其交換路由資訊的鄰居路由器 Router(config-router)# neighbor 鄰居IP位址
29
非連續性子網路
30
解決非連續性子網路問題 使用 no auto-summary 命令 BHM(config)# router rip
BHM(config-router)# version 2 BHM(config-router)# network BHM(config-router)# network BHM(config-router)# no auto-summary
31
重覆的子網路
32
RIP負載平衡 RIP 可以在多達6條(預設是4條)同成本路徑上做負載平衡 (load balancing)
#show ip route
33
管理性距離預設值 管理性距離路由來源 預設距離 直接相連介面 靜態路由 1 EIGRP 總結路由 5 外部(External) BGP 20
靜態路由 1 EIGRP 總結路由 5 外部(External) BGP 20 EIGRP 內部路由 90 IGRP 100 OSPF 110 IS-IS 115 RIP 120 EIGRP 外部路由 170 內部(Internal) BGP 200 未知 255
34
RIP與浮動靜態路徑 當到相同目標的動態路徑還存在時,路由表不會出現該靜態路由
Similar presentations