1 / 66

Chapter 14

Chapter 14. Unicast Routing Protocols: RIP, OSPF, and BGP. Objectives . Upon completion you will be able to:. Distinguish between intradomain and interdomain routing Understand distance vector routing and RIP Understand link state routing and OSPF

uttara
Download Presentation

Chapter 14

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 14 Unicast Routing Protocols:RIP, OSPF, and BGP Objectives Upon completion you will be able to: • Distinguish between intradomain and interdomain routing • Understand distance vector routing and RIP • Understand link state routing and OSPF • Understand path vector routing and BGP TCP/IP Protocol Suite

  2. Figure 14.1Autonomous systems An autonomous system is a set of networks and routers under the control of a single administrative authority. Routing within an autonomous system is intradomain routing. Routing between autonomous systems is interdomain routing. TCP/IP Protocol Suite

  3. Figure 14.2Popular routing protocols TCP/IP Protocol Suite

  4. 14.2 DISTANCE VECTOR ROUTING In distance vector routing, the least cost route between any two nodes is the route with minimum distance. In this protocol each node maintains a vector (table) of minimum distances to every node The topics discussed in this section include: Initialization Sharing Updating When to Share Two-Node Loop Instability Three-Node Instability TCP/IP Protocol Suite

  5. Figure 14.3Distance vector routing tables TCP/IP Protocol Suite

  6. Figure 14.4Initialization of tables in distance vector routing In distance vector routing, each node shares its table with its immediate neighbor periodically (eg every 30s) and when there is a change. TCP/IP Protocol Suite

  7. Figure 14.5Updating in distance vector routing Step 1: Add cost (2) to table received from neighbor (C). Step 2: Compare Modified Table with Old Table (row by row). If Next node entry is different, select the row with the smaller cost. If tie, keep the old one. If Next node entry the same, select the new row value (regard- less of whether new value is smaller or not). TCP/IP Protocol Suite

  8. Figure 14.6Two-node instability – what can happen with distance vector routing Both A and B know where X is. Link between A and X fails. A updates its table immediately. But before A can tell B, B sends its info to A! A, using B’s info, up- dates its table (error!). Then A send its table to B and B updates its table (more error). Both routers keep up- dating tables, event- ually hitting infinity. In the meantime, chaos! TCP/IP Protocol Suite

  9. Figure 14.6Two-node instability – what can happen with distance vector routing Possible Solutions to two-node instability: 1. Define infinity to be a much smaller value, such as 100. Then it doesn’t take too long to become stable. But now you can’t use distance vector routing in large networks. 2. Split Horizon – instead of flooding entire table to each node, only part of its table is sent. More precisely, if node B thinks that the optimum router to reach X is via A, then B does not need to advertise this piece of info to A – the info has already come from A. 3. Split Horizon and Poison Reverse – Normally, the distance vector protocol uses a timer. If there is no news about a route, the node deletes the route from its table. So when A never hears from B about the route to X, it deletes it. Instead, Node B still advertises the value for X, but if the source of info is A, it replaces the distance with infinity, saying “Do not use this value; what I know about this route comes from you.” TCP/IP Protocol Suite

  10. Figure 14.7Three-node instability – no solutions here! TCP/IP Protocol Suite

  11. 14.3 RIP The Routing Information Protocol (RIP) is an intradomain routing protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. The topics discussed in this section include: RIP Message Format Requests and Responses Timers in RIP RIP Version 2 Encapsulation TCP/IP Protocol Suite

  12. Figure 14.8Example of a domain using RIP Note the metric used here for Cost is simply the hop count. TCP/IP Protocol Suite

  13. Figure 14.9RIP message format Command: request (1) or response (2) Version: 1 or 2 (version 2 shown in a couple slides) Family: TCP/IP has value 2 Network address: address of the destination network Distance: hop count from the advertising router to the destination network TCP/IP Protocol Suite

  14. Figure 14.10Request messages A request message is sent by a router that has just come up or by a router that has some time-out entries. A response message is sent in answer to a request (solicited response, or simply every 30 seconds (unsolicited). Response message format shown in previous slide. TCP/IP Protocol Suite

  15. Example 1 Figure 14.11 shows the update message sent from router R1 to router R2 in Figure 14.8. The message is sent out of interface 130.10.0.2. The message is prepared with the combination of split horizon and poison reverse strategy in mind. Router R1 has obtained information about networks 195.2.4.0, 195.2.5.0, and 195.2.6.0 from router R2. When R1 sends an update message to R2, it replaces the actual value of the hop counts for these three networks with 16 (infinity) to prevent any confusion for R2. The figure also shows the table extracted from the message. Router R2 uses the source address of the IP datagram carrying the RIP message from R1 (130.10.02) as the next hop address. See Next Slide TCP/IP Protocol Suite

  16. Figure 14.11Solution to Example 1 Hop=16 means dest. is unreachable (only works on smaller networks) TCP/IP Protocol Suite

  17. Figure 14.12RIP timers Periodic timer: controls the advertising of regular updates Expiration timer: governs the validity of a router. When a router receives info, sets timer to 180s. No update within 180s? Route set to 16, which means unreachable. Garbage collection timer: Set to 120s after route set to 16. When timer expires, then toss route info. TCP/IP Protocol Suite

  18. Figure 14.13RIP version 2 format Note: Version 2 supports subnet masks TCP/IP Protocol Suite

  19. 14.4 LINK STATE ROUTING In link state routing, if each node in the domain has the entire topology of the domain, the node can use Dijkstra’s algorithm to build a routing table. The topics discussed in this section include: Building Routing Tables TCP/IP Protocol Suite

  20. Figure 14.15Concept of link state routing Every router has knowledge about the network, but from its own perspective. TCP/IP Protocol Suite

  21. Figure 14.16Link state knowledge Each router knows (maintains) its states of its links. Each router floods this info (via a Link State Packet) to other routers periodically (when there is a change in the topology, or every 60 to 120 minutes). Each router takes in this data and, using Dijkstra’s algorithm, creates the shortest path tree and corresponding routing table. TCP/IP Protocol Suite

  22. Figure 14.17Dijkstra algorithm TCP/IP Protocol Suite

  23. Figure 14.18Example of formation of shortest path tree TCP/IP Protocol Suite

  24. Table 14.1 Routing table for node A Now let’s try using the Dijkstra’s algorithm introduced in TDC 361. TCP/IP Protocol Suite

  25. TCP/IP Protocol Suite

  26. 14.5 OSPF The Open Shortest Path First (OSPF) protocol is an intradomain routing protocol based on link state routing. Its domain is also an autonomous system. The topics discussed in this section include: Areas Metric Types of Links Graphical Representation OSPF Packets Link State Update Packet Other Packets Encapsulation TCP/IP Protocol Suite

  27. Figure 14.19Areas in an autonomous system OSPF divides an autonomous system into areas. All networks inside an area must be connected. Notice area border router; backbones; backbone routers; boundary routers The cost associated with a route is called the metric. Metric could be min delay, max thruput, etc. TCP/IP Protocol Suite

  28. Figure 14.21Point-to-point link No hosts in between; T-1 connection common TCP/IP Protocol Suite

  29. Figure 14.22Transient link A network with several routers attached to it; all LANs and some WANs have transient links; b. is unrealistic because too many advertisements. In c., one of the routers also becomes labeled the designated router. TCP/IP Protocol Suite

  30. Figure 14.23Stub link TCP/IP Protocol Suite

  31. Figure 14.24Example of an Autonomous System and its graphical representation in OSPF What kind of networks are the dotted lines? Are there any stub networks here? What are the transient networks? TCP/IP Protocol Suite

  32. Figure 14.25Types of OSPF packets OSPF works by transferring packets. What are the different types of packets? The link state update packets are the most important, but see the next slide. TCP/IP Protocol Suite

  33. Responds to a link-state request packet. These messages also are used for the regular dispersal of LSAs. Several LSAs can be included within a single link-state update packet. Type 1 2 4 3 5 When a router just came up, it cannot wait for all link state packets. Neighbors will send it a database description (not the full database but like an outline). From this, the router can then ask for information it does not have. Establishes and maintains neighbor relationships. Requests pieces of the topological database from neighbor routers. These messages are exchanged after a router discovers (by examining database-description packets) that parts of its topological database are out of date. • Ack-nowledges link-state update packets. TCP/IP Protocol Suite

  34. Figure 14.26OSPF common header All packets have a common header. Type is 1 to 5 as shown on previous slide. Actually 64 bits So this common header is 24 bytes total length TCP/IP Protocol Suite

  35. Figure 14.27Link state update packet This is the general form of the link state update packet. It is used by a router to advertise the state of its links. Note that this packet contains one or more LSAs (the yellow part). TCP/IP Protocol Suite

  36. Figure 14.28LSA general header This is the general header for each LSA. Link state age-seconds elapsed since this message was first generated. E: if 1, then this area is a stub area T: if 1, router can handle multiple types of service Link state type: 1(router link), 2(network link), etc. (next slide) Advertising router: IP address of router advertising this msg. Link state sequence number: simply a sequence number Checksum is actually based on Fletcher’s checksum TCP/IP Protocol Suite

  37. Link-state advertisement (Link-state update) types • Router Links (RL) (Type 1) are generated by all routers. These links describe the state of the router interfaces inside a particular area. These links are only flooded inside the router's area. • Network Links (NL) (type 2) are generated by a DR (Designated Router) of a particular segment; these are an indication of the routers connected to that segment. • Summary Links (SL) are the inter-area links (type 3); these links will list the networks inside other areas but still belonging to the autonomous system. Summary links are injected by the ABR (Area Border Router) from the backbone into other areas and from other areas into the backbone. These links are used for aggregation between areas. • AS boundary router summary links are type 4 links that point to the ASBR (Autonomous System Boundary Router). This is to make sure that all routers know the way to exit the autonomous system. • External Links (EL) (type 5), these are injected by the ASBR into the domain. TCP/IP Protocol Suite

  38. Figure 14.29Router link This is a router link LSA (one of the 5 kinds of LSAs). It is used to define the links of a true router. For example, given the following network, what might the router link LSA look like? TCP/IP Protocol Suite

  39. Figure 14.30Router link LSA Default type of service, foll. by other types of service For what to enter in Link ID, Link data, and Link type, see the next slide. TCP/IP Protocol Suite

  40. Table 14.2 Link types, link identification, and link data TCP/IP Protocol Suite

  41. Example 3 Give the router link LSA sent by router 10.24.7.9 in Figure 14.31. See Next Slide SolutionThis router has three links: two of type 1 (point-to-point) and one of type 3 (stub network). Figure 14.32 shows the router link LSA. See Figure 14.32 TCP/IP Protocol Suite

  42. Figure 14.31Example 3 TCP/IP Protocol Suite

  43. Figure 14.32Solution to Example 3 TCP/IP Protocol Suite

  44. Figure 14.33Network link (second kind of LSA) A network link LSA defines the links of a network and is generated by the designated router (DR). TCP/IP Protocol Suite

  45. Figure 14.34Network link advertisement format TCP/IP Protocol Suite

  46. Example 4 Give the network link LSA in Figure 14.35. See Next Slide Solution. See Figure 14.36 TCP/IP Protocol Suite

  47. Figure 14.35Example 4 TCP/IP Protocol Suite

  48. Figure 14.36Solution to Example 4 TCP/IP Protocol Suite

  49. Example 5 In Figure 14.37, which router(s) sends out router link LSAs? See Next Slide SolutionAll routers advertise router link LSAs.a. R1 has two links, N1 and N2.b. R2 has one link, N1.c. R3 has two links, N2 and N3. TCP/IP Protocol Suite

  50. Figure 14.37Example 5 and Example 6 TCP/IP Protocol Suite

More Related