1 / 82

Routing Protocol

Routing Protocol. O utline. R outer 的運作 R outing Protocol Routing Algorithm C ase Studies. 路由器 ( Router). Router 用於連接 LLC 不同,但 Network Layer 及上層都相同的網路。 Internet 以 Routers 做為中繼站,穿越各個網路轉送 Packet 。 企業內部以 Routers 做為子網路交換 Packet 的中心。. Router 通訊協定架構. Host A. Host B.

corin
Télécharger la présentation

Routing Protocol

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. Routing Protocol

  2. Outline • Router 的運作 • Routing Protocol • Routing Algorithm • Case Studies

  3. 路由器(Router) • Router 用於連接 LLC 不同,但 Network Layer 及上層都相同的網路。 • Internet 以 Routers 做為中繼站,穿越各個網路轉送 Packet。 • 企業內部以 Routers 做為子網路交換 Packet 的中心。

  4. Router 通訊協定架構 Host A Host B Application Application Presentation Presentation Session Session Router Function Transport Transport Network Network Network Data Link Data Link Data Link Data Link Physical Physical PHY PHY LAN 2 LAN 1

  5. Routers 的運作 • 讀取收到的 Packet 上的 IP 位址,查詢路由表(Routing Table),以得知應從那 一個 Port 將 Packet 送出。 • Router 必須了解兩個協定的 PHY、Data Link Layers,以便和兩個子網路溝通和進行封包的轉換。 • 依據 Routing Table,Router 會選擇到 Destination 有最短路徑的網路介面,將 Datagram 傳給 Next Hop。

  6. 路由器 R2 的路由資訊

  7. Router R2 路由表 R3 R1 R2

  8. Routing Table 的建立 • Static Routing • Dynamic Routing

  9. Static Routing • 不會與其他 Routers 交換訊息,安全性高,當想隱藏某一部分網路資訊,就可使用 Static Routing來設定。 • 如果一個網路只能經由一個路徑到達,只要使用 Static Routing 就很足夠,可減少網路 traffic。 • 要輸入 Default Routing 的資訊。

  10. Dynamic Routing • 由於網路結構會不斷改變,無法用 Static Routing,以節省人力。 • Routers 間要不斷地交換訊息、自動學習改進 Dynamic Routing Table。 • Routers 之間使用 Routing Protocol 來交換網路的資訊。

  11. Routing/Routed Protocols • Routed Protocol:用封裝packet來攜帶data,像信件的作用。 • Ex: IP、IPX、AppleTalk • Routing Protocol:用以選擇最佳路徑來傳送 packets,像貨運公司的作用。 • Ex: OSPF、RIP、IGRP

  12. Autonomous System • 自主系統、網路自治區 (Autonomous System、AS) • A group of routers that share routing information between them. • Autonomous System 是自然形成,自己管理自己的一個網路系統。 • 每一個 Autonomous System 都有一個編號:自治號碼。 • TANET:1659、Hinet:3462、Seednet:4780、FETnet:9674、ETWebs:7481 。

  13. Routing Protocols • 各 Autonomous System 自行決定自己的 Routing Paths。 • 兩大類的 Routing Protocols: • EGP(Exterior Gateway Protocol):用於讓 Autonomous Systems 間互相交換 Routing Information 的 Protocol。 • IGP(Interior Gateway Protocol):用於 Autonomous System 內部 Routers 交換路徑的 Protocol。

  14. 內部使用 IGP 1 使用 EGP Autonomous System 1 Autonomous System 2 內部使用 IGP 2 Border gateway EGP(1/2) • Exterior Gateway Protocol(外部選徑協定) • 用於讓 Autonomous Systems 間互相交換 Routing Information。

  15. EGP(2/2) • Routing Information 包含如何經由某些特定 Autonomous Systems,可到達那些 Network 的資訊。 • 目前只有一種 EGP 在流傳:各 Autonomous Systems 間以 BGP(Border Gateway Protocol)來交換路由資訊。 • PS :有一種 Routing Protocol 也取名為 EGP 。

  16. 內部使用 IGP 1 使用 EGP Autonomous System 1 Autonomous System 2 內部使用 IGP 2 IGP(1/2) • Interior Gateway Protocol(內部選徑協定) • IGP refers to any algorithm that interior routers use when they exchange network reachability androuting information.

  17. IGP(2/2) • 常見的 IGP :RIP、OSPF、IGPR、EIGRP… • 其他有名的 IGP :SPREAD、NLSP、Hello… • 也有 Autonomous System 使用 BGP 做為IGP

  18. Types of Routing Algorithms • 以 Routers 間交換路徑資訊與處理的方式,可將 Routing Algorithm 分類: • Distance Vector • Link Status • Hybrid

  19. Distance Vector Algorithm • 指使用 Propagation 傳遞路由資訊的 Algorithms。路由資訊包含: • Vector:代表 Destination • Distance:到 Destination 的距離 • 以 Routing Table 儲存到各 Destination Network 的 Distance 和 Next Hop。 • 每一個 Router 都會定期告訴 Neighbors 自己 Routing Table 內所有的資訊。

  20. Propagation • 透過一層一層的傳送,更新 Router 資訊。 A 6. 更新 A,B 的 Routing Table 5. C 傳送更新後的 Routing Table 2. 更新 D 的 Routing Table B C D 1. 新增一個 D 的網路介面聯到 Network 1 4. 更新 C 的 Routing Table 3. D 傳送更新後的 Routing Table

  21. Basic Operations • Router 在 Boot 後,隨時偵測與 Neighbors 間的連結關係。 • 一開始只有直接相連的網路會列在 Routing Table 上。 • 定期 Router 會送出一份 Routing Table的 Copy 給 Neighbor。 • 以收到 Neighbor Routers 送來的資料,選擇新的路徑,修正維護自己的 Routing Table。

  22. NET17 NET42 NET 4 NET 2 NET 1 NET30 NET24 Network Topology (Original) 4 2 3 2 5 1 L 5 1 M 4 Q 3 1 6 2 A A 0 3 B 7 1 4 2 6 2 5 2 8 a b 4 3 4

  23. An Initial Routing Table Destination Distance Route Net 1 0 direct Net 2 0 direct • This is the routing table for a router A. • Each entry contains the IP address of network and an integer distance to the network.

  24. A’s Routing Table at Time t Destination Distance Route Net 1 0 direct Net 2 0 direct Net 4 8 Router L Net 17 5 Router M Net 24 6 Router B Net 30 2 Router Q Net 42 2 Router B

  25. NET21 NET42 NET17 NET 2 NET 1 NET 4 c NET30 NET24 Network Topology (New) 4 2 3 2 5 1 L 5 1 M 4 Q 3 1 6 2 A A 0 3 B 7 1 4 2 6 5 4 2 5 2 Y 8 a Z 3 b 4 3 4

  26. Routing Message from B to A Destination Distance Net 1 2 Net 4 3 Net 17 6 Net 21 4 Net 24 5 Net 30 3 Net 42 3 Add a new router Z. Y is crashed.

  27. Modified Routing Table Destination Distance Route Net 1 0 direct Net 2 0 direct Net 4 8 4 Router L B Net 17 5 Router M Net 24 6 Router B Net 30 2 Router Q Net 42 2 4 Router B Net 21 5 Router B A’s Routing Table at Time t+1 Destination Distance Net 1 2 Net 4 3 a shorter distance Net 17 6 Net 21 4 a new destination Net 24 5 Net 30 3 Net 42 3 Its next hop is B The B’s advertisement at Time t

  28. Propertiesof Distance Vector • 只能確定與自己直接連接網路的資訊 • 定期傳送整個 Routing Table • 容易維護 • 不需快速 processor 與大量 memory 進行計算 • Converge slowly • 不適合大 Network

  29. Connectionless Transport 的問題 • 大部分的 Routing Protocol 使用不可靠的Connectionless Transport。 • Routing Protocol 自行找解決方式: • 使用 Checksum 可解決收到錯誤封包問題。 • Sequence Number 可處理不照順序傳送的封包。 • Soft state 用 Timeout 除去過期的資料 • Acknowledgement/Retransmission可解決封包遺失問題。

  30. Examples of Distance Vector • Hello(for 56kbps NSFNET) • SPREAD(最後一代 Core Network 使用的 Protocol) • GGP(Gateway-to-Gateway Protocol) • RIP(Routing Information Protocol) • IGRP(Interior Gateway Routing Protocol)

  31. Link Status Algorithm • 又稱為 Link State、Shortest Path First(SPF)。 • 設定時每一 Router 都要先有一份 Complete Topology Information。 • Router 只送出自己與 Neighbors 間的 LinkStatus給其他 Routers。 • Link is Up:Neighbor 與 Link 都存在。 • Link is Down:Link 中斷。

  32. Tasks of Link Status • Router 定期與 Neighbor 交換訊息,以確認對方 Alive 或 Reachable。 • 每一個 Router 定期送出它自己的 Link Status給所有其他 Router。 • 其他 Router 收到並使用此資訊修改自己的 Map of Internet。並以 Dijkstra Shortest Path Algorithm 重新計算到每個 Destination 的 Shortest Path。

  33. Propertiesof Link Status • 有整個 Network Topology 的資訊 • 大家收到的訊息都相同 • Easy to debug • Guarantee to converge (also fast) • 需要有快速 processor 與大量 memory 以進行計算 • Link Status 只靠每個 router 的 links,與網路大小無關Scaling

  34. Examples of Link Status • OSPF(Open Shortest Path First) • IS-IS(Intermediate System to Intermediate System) • EIGRP(Enhanced Interior Gateway Routing Protocol) • NLSP

  35. Hybrid • 混合Distance Vector 與 Link Status • Examples of Hybrid: • IS-IS(Intermediate System to Intermediate System) • EIGRP(Extended Interior Gateway Routing Protocol) • 收斂快但不需較大的 Memory與Computing 。

  36. What Is a Short Routing Path? • Metric in IGP • Hop count • Delay • Bandwidth • Load • Reliability • MTU • Cost

  37. BGP System BGP System BGP System Router Router Router Router Router Router BGP(1/2) • BGP(Border Gateway Protocol) • RFC 1771, BGP version 4 • 唯一流傳的 EGP,但也被用於 IGP。 Autonomous System 1 Autonomous System 3 Autonomous System 2

  38. BGP(2/2) • 和其他 IGP 不同處: • 使用 IGP 的同一Autonomous Systems 內的 Router 互相信任,相信其他 Router’s Advertisement,也廣播自己的 Routing Table。 • BGP 不信賴其他 Autonomous Systems 的 Routers,可以有 Policy 決定要送出那些部份 Routes,以避免其他 Routers 的錯誤擴散。

  39. 3 Basic Functions of BGP • 建立 2 BGP peers 間的 TCP 連線。 • 包含做 Authentication。 • 送出 Positive 和 Negative Reachability Information。 • 提供 Ongoing Verification,以確保網路連結之資料正確。

  40. BGP Message Headers 32bit • Marker : detect the loss of synchronization : and authenticate incoming message • Length : total length of message • Type : type code of message Marker Length Type

  41. Types of BGP Messages 1 OPEN • 建立好 2 BGP peers 間的 TCP 連線,用Open 宣告相關的參數。 2 UPDATE • 送出 Positive 和 Negative 路由訊息。 3 NOTIFICATION • 若發現錯誤,用 Notification 告知對方 4 KEEPALIVE • 做為線上的測試。

  42. OPEN Message • Initial exchange 32bit Marker Length Type: OPEN Version My Autonomous System Hold Time BGP Identifier Auth. Code Authentication Data

  43. UPDATE Message • Transfer routing information 32bit Marker Length Type: UPDATE Path Attr - - Length  Path Attributes  Network 1   Network n

  44. NOTIFICATION Message • Report the error 32bit Marker Length Type: NOTIFIC. Error Code Error subcode Data  

  45. KEEPALIVE Message • Actively test peer connectivity 32bit Marker Length Type: KEEPALIVE

  46. Features of BGP(1/2) • Inter-autonomous system communication • Not pure distance vector, also not pure link state protocol. • Coordination among multiple BGP speakers • Policy support • Propagation of Reachability Information • Next-hop paradigm

  47. Features of BGP(2/2) • Path Information • Incremental Updates • Route Aggregation • Reliable Transport • Support for classless addressing • Authentication

  48. Hello • Original Core Network (56kbps NSFNET)使用的 IGP。目前已走入歷史。 • 屬於 Distance Vector Protocol。 • 以 Delay 做為 Metric。 • 2 Functions of Hello: • It synchronizes the clocks among these routers. • It allows each router to compute the distance of the shortest delay path to destinations. • 使用 Timestamp 求 Round Trip Delay

  49. Instability • Problem of using delay metric is instability. • Delay measurements are not fix values (i.e., it changed because of many conditions.) • Hardware clock drift (漂移), CPU load during measurement, link-level synchronization • Using hold down, threshold, K-out-of-N rules, Hello still has instable problem. • Example: satellite vs. serial lines

  50. Satellite vs. Serial Lines • Satellite: high capacity, large delay • Serial line: low capacity, small delay • Someone sends a lot of data on serial line. • Serial line traffic load and delay  :change to use satellite. • Serial line traffic load and delay  :change to use serial line. satellite Serial line

More Related