1 / 189

Chapter 13 Routing Protocols (RIP, OSPF, and BGP)

Chapter 13 Routing Protocols (RIP, OSPF, and BGP). Outline. INTERIOR AND EXTERIOR ROUTING RIP OSPF BGP. Introduction. An internet is a combination of networks connected by routers How to pass a packet from source to destination ? Which of the available pathways is the optimum pathway ?

zeki
Télécharger la présentation

Chapter 13 Routing Protocols (RIP, OSPF, and BGP)

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. Chapter 13Routing Protocols (RIP, OSPF, and BGP)

  2. Outline • INTERIOR AND EXTERIOR ROUTING • RIP • OSPF • BGP

  3. Introduction • An internet is a combination of networks connected by routers • How to pass a packet from source to destination ? • Which of the available pathways is the optimum pathway ? • Depends on the metric: • Metric: a cost assigned for passing through a network • A router should choose the route with the smallest metric

  4. Introduction (Cont.) • The metric assigned to each network depends on the type of protocol • RIP (Routing Information Protocol) • Treat each network as equals • The cost of passing through each network is the same: one hop count • Open Shortest Path First (OSPF) • Allow administrator to assign a cost for passing through a network based on the type of serviced required • For example, maximum throughput or minimum delay • Border Gateway Protocol (BGP) • The criterion is the policy, which can be set by the administrator

  5. Introduction (Cont.) • Routing table can be static or dynamic • An internet needs dynamic routing tables • Dynamic routing table is achieved by the routing prococols

  6. 13.1 INTERIOR AND EXTERIOR ROUTING The McGraw-Hill Companies, Inc., 2000

  7. Interior and Exterior Routing • An internet can be so large that one routing protocol cannot handle the task of updating routing table of all routers • Thus, an internet is divided into autonomous systems (AS) • AS is a group of networks and routers under the authority of a single administration

  8. Interior and Exterior Routing • Interior routing • Routing inside an autonomous system • Each AS can chose its own interior routing protocol • Examples: RIP and OSPF • Exterior routing • Routing between autonomous systems • Only one exterior routing protocol is usually used for exterior routing • Examples: BGP

  9. Figure 13-1 Popular Routing Protocols The McGraw-Hill Companies, Inc., 2000

  10. Example • R1, R2, R3 and R4 use an interior and an exterior routing protocol • Solid thin lines • Interior routing protocol • Broken thick lines • Exterior routing protocol

  11. Figure 13-2 Autonomous Systems The McGraw-Hill Companies, Inc., 2000

  12. 13.2 RIP: Routing Information Protocol The McGraw-Hill Companies, Inc., 2000

  13. RIP • RIP: Routing Information Protocol • Based on distance vector routing • Use the Bellman-Ford algorithm for calculating the routing tables

  14. Distance Vector Routing • Each router periodically shares its knowledge about the entire internet with its neighbors • Sharing knowledge about the entire AS • At the start, a router’s knowledge may be sparse • But, how much it knows is unimportant, it sends whatever it has • Sharing only with neighbors • Sends its knowledge only to neighbors • Sharing at regular intervals

  15. RIP Updating Information • Routing table is updated on receipt of a RIP response message • Receipt: a response RIP message • Add one hop to the hop count for each advertised destination • Repeat the following steps for each advertised destination • If (destination not in the routing table) • Add the advertised information to the table • Else • If (next-hop field is the same) • Replace retry in the table with the advertised one • Else • If (advertised hop count smaller than one in the table) • Replace entry in the routing table • Return

  16. Example of Updating a Routing Table

  17. Initializing the Routing Table • When a router is added to a network • It initializes a routing table for itself using its configuration file • The table contains only the directly attached networks and the hop count (= 1)

  18. Updating the Routing Table • Each routing table is updated upon receipt of RIP message • Using the RIP updating message algorithm shown above

  19. Initial Routing Tables in a Small Autonomous System

  20. Final Routing Tables for the Previous Figure

  21. RIP Message Format • Command: 8-bit • The type of message: request (1) or response (2) • Version: 8-bit • Define the RIP version • Family: 16-bit • Define the family of the protocol used • TCP/IP: value is 2 • Address: 14 bytes • Defines the address of the destination network • 14 bytes for this field to be applicable to any protocol • However, IP currently uses only 4 bytes, the rest are all 0s • Distance: 32-bit • The hop count from the advertising router to the destination network

  22. Figure 13-6 RIP Message Format The McGraw-Hill Companies, Inc., 2000

  23. Requests and Response • RIP uses two type of messages • Request and response • Request • Sent by a router that has just come up or has some time-out entries • Can ask specific entries or all entries

  24. Figure 13-7 Request Messages The McGraw-Hill Companies, Inc., 2000

  25. Requests and Response (Cont.) • Response: solicited or unsolicited • A solicited response: sent only in answer to a request • Contain information about the destination specified in the corresponding request • An unsolicited response: sent periodically • Every 30s • Contains information about the entire routing table • Also called update packet

  26. Example 1 • What is the periodic response sent by router R1 in the next slide? • Assume R1 knows about the whole autonomous system.

  27. Figure 13-8 Example 1 The McGraw-Hill Companies, Inc., 2000

  28. Solution • R1 can advertise three networks 144.2.7.0, 144.2.9.0, and 144.2.12.0. • The periodic response (update packet) is shown in the next slide.

  29. Figure 13-9 Solution to Example 1 The McGraw-Hill Companies, Inc., 2000

  30. Timers in RIP • RIP uses three timers • Periodic timer • Expiration timer • Garbage collection timer

  31. Figure 13-10 RIP Timers The McGraw-Hill Companies, Inc., 2000

  32. Periodic Timer • Periodic timer • Control the advertising of regular update message • Although protocol specifies 30 s, the working model uses a random number between 25 and 35 s • Prevent routers update simultaneously

  33. Expiration Timer • Govern the validity of a route • Set to 180 s for a route when a router receives update information for a route • If a new update for the route is received, the timer is reset • In normal operation, this occurs every 30 s • If timer goes off, the route is considered expired • The hop count of the route is set to 16, which means destination is unreachable

  34. Garbage Collection Timer • When a route becomes invalid, the router does not immediately purge that route from its table • It continues advertise the route with a metric value of 16 • A garbage collection timer is set to 120 s for that route • When the count reaches zero, the route is purged from the table • Allow neighbors to become aware of the invalidity of a route prior to purging

  35. Example 2 • A routing table has 20 entries. • It does not receive information about five routes for 200 seconds. • How many timers are running at this time?

  36. Solution • The timers are listed below: • Periodic timer: 1 • Expiration timer: 20 - 5 = 15 • Garbage collection timer: 5

  37. Problems in RIP • Slow Convergence • Instability

  38. Slow Convergence • A change somewhere in the internet propagates very slowly through the rest of the internet • For example • A change is Net1, R1 updates itself immediately • R1->R2: an average of 15 s • R2->R3: an average of 15 s • … • Thus, R1-Rn: an average of 15 x n s

  39. Figure 13-11 Slow Convergence The McGraw-Hill Companies, Inc., 2000

  40. Solution • Limit the hop count to 15 • Prevent data packet from wandering around forever • Thus, an autonomous system using RIP is limited to a diameter of 15 • The number 16 is considered infinity and designates an unreachable network

  41. Figure 13-12 Hop count The McGraw-Hill Companies, Inc., 2000

  42. Instability • An internet running RIP can become unstable • A packet could go from one router to another in a loop

  43. Instability

  44. Solutions • Triggered Update • Split Horizons • Poison Reverses

  45. Triggered Update • If there is no change, updates are sent at the 30-s intervals • If there is a change, the routers sends out its new table immediately

  46. Split Horizons • A router must distinguish between different interface • If a router received route updating message from an interface • This same updated information must not be sent back through this interface • Example • B receives information about Net1 and Net2 through its left interface • This information is updated and passed on through the right interface but not to the left

  47. Figure 13-14 Split Horizon The McGraw-Hill Companies, Inc., 2000

  48. Poison Reverse • A variation of split horizons • Information received is used to update routing table and then passed out to all interface • However, a table entry that has come through one interface is set to a metric of 16as it goes out through the same interface • For example • Router B has received information about Net1 and Net2 through its left interface • Thus, it sends information out about Net1 and Net2 with a metric of 16

  49. Figure 13-15 Poison Reverse The McGraw-Hill Companies, Inc., 2000

  50. RIP Version 2 • Does not augment the length of the message of each entry • Only replace those fields in version 1 that were filled with 0s with some new fields

More Related