900 likes | 992 Views
Chapter 8 Routing with OSPF. Two important questions for IP to deliver packets? 1. How does IP know which step is the next step? 2. How does IP know where to route?.
E N D
Chapter 8 Routing with OSPF Two important questions for IP to deliver packets? 1. How does IP know which step is the next step? 2. How does IP know where to route? The Open Shortest Path First (OSPF) protocol is TCP/IP’s primary routing protocol. Routers rely on OSPF to exchange information among themselves. That information gives each router a map of the network. By checking their maps, routers know how to move packets through the network to their destinations.
Chapter 8 Routing with OSPF OSPF is an example of a particular type of routing protocol-a link state protocol. All link state protocols share the same basic principle. (detect neighbor, flood the information, calculate the route) Another strategy is the distance vector routing. A B B’s distance to C is 1, A’s distance to C is 2 (by passing through B) Consider what happens when link B-C is down? C
Chapter 8 Routing with OSPF Link State Routing Link state routing has a reputation for complexity. (RFC2328, OSPFv2, 244 pages, RFC2740 OSPF for IPv6, 80 pages) Routing protocols are the primary tool of routers, and routers have a simple goal. They want to know how the network is put together so that they can tell how to get from one point to another. In a real sense, routers just want a map of the network, and routing protocols help them create such a map.
Chapter 8 Routing with OSPF Link State Routing Link state protocols create the map in three distinct phases: 1. Each router meet its neighbors. In that phase, the routers learn about their neighborhood. 2. Routers share the information with all other routers on the network. 3. Routers combine the information about individual neighborhood. This combination describes the entire network, and from it routers calculate routes.
Chapter 8 Routing with OSPF Link State Routing Example: U.S. Interstate highway system
Chapter 8 Routing with OSPF Link State Routing Meet Your Neighbors Hello packets
Chapter 8 Routing with OSPF Link State Routing Meet Your Neighbors After hello packets exchange, each router can create a table for neighbors. (delay, etc.) (IP address) (outgoing interface)
Chapter 8 Routing with OSPF Link State Routing Share the Information Link state advertisement packets All other cities do the flooding too. Flooding Kansas City’s link state advertisement
Chapter 8 Routing with OSPF Link State Routing Share the Information After the flooding, each system has the view of the network like the following table (link state database).
Chapter 8 Routing with OSPF Link State Routing Calculate Routes Once all systems have an up-to-date link state database, they cab begin the final phase of link state routing-actually calculating routes. The technical details of this calculation are not a formal part of most link state protocol specifications. One particular algorithm is so much more efficient at determining routes, though, that nearly all link state implementations rely on it. This is the Dijkstra’s shortest path algorithm.
Chapter 8 Routing with OSPF Link State Routing Calculate Routes Dijkstra’s single-source shortest path algorithm 1. Kansas Dallas (844 is the smallest) 2. Kansas Dallas Phoenix (2066<3150, 2066<844+1719) 3. Kansas Dallas Phoenix Salt Lake (2066+1083<3150) 4. Kansas Dallas Phoenix Salt Lake San Francisco 5. Kansas Dallas Phoenix Salt Lake Seattle San Francisco
Chapter 8 Routing with OSPF Link State Routing Network Changes All three phases happen in parallel, and they all take place continuously. When a system hears of a new neighbor, it updates its link state advertisement and floods it again. The same thing happens if a system fails to hear from its neighbor. The flooding updates everyone’s link state database. A new database requires a new Dijkstra calculation, so each router performs its computation again. As the network changes, OSPF tracks those changes, and routing continues to function successfully.
Chapter 8 Routing with OSPF Link State Routing Network Changes Link failure
Chapter 8 Routing with OSPF Link State Routing Network Changes
Chapter 8 Routing with OSPF Link State Routing Network Changes
Chapter 8 Routing with OSPF OSPF and Network Organization The OSPF protocol employs all the principles of a link state routing protocol. It meets neighbors, shares the information, and calculates routes. Of course, real networks introduce a few complications to these simple processes. One such complication is network organization. In reality, there are just too many systems on the Internet. The required link state database would be enormous, and Dijkstra’s calculation would take hours. To solve these problems of scale, OSPF establishes hierarchies within the network. These hierarchies include autonomous systems, areas, backbones, stub areas, and not so stubby areas.
Chapter 8 Routing with OSPF OSPF and Network Organization Autonomous Systems At the coarsest level, the Internet consists of many autonomous systems. An autonomous system is actually a collection of many computer systems, routers, and other network devices. The equipment comprising an autonomous system shares a single administrative entity.
Chapter 8 Routing with OSPF OSPF and Network Organization Autonomous Systems AS defines the limits of OSPF’s interactions. AS boundary routers No OSPF traffics
Chapter 8 Routing with OSPF OSPF and Network Organization Autonomous Systems AS boundary routers can learn about the network beyond the autonomous system. They may learn information from routing protocols other than OSPF, or they may learn from manual configuration. In either case, AS boundary routers can use OSPF to distribute that information within the autonomous system. They do so by building special link state advertisements. These special LSAs are external LSAs, so called because they describe topology external to AS.
Chapter 8 Routing with OSPF OSPF and Network Organization Area AS provides some relief to a routing protocol such as OSPF. It limits the scope of the protocol’s influence, and reduces the memory, processor resources, and network bandwidth the protocol requires. Sometimes, however, even an AS by itself is too big and unwieldy. When such problems arise, OSPF offers another mechanism that provides even more hierarchy to networks. That mechanism is the area.
Chapter 8 Routing with OSPF OSPF and Network Organization Area Area border routers A special area that connects to all other areas.
Chapter 8 Routing with OSPF OSPF and Network Organization Area Areas are arbitrary collections of networks, hosts, and routers. All systems within an area must be connected together, but otherwise there are no restrictions on what is allowed in an area. Within each area, OSPF functions normally. At the boundary between areas, however, the OSPF protocol does not exchange simple LSAs. Instead, area border routers construct special LSAs (summary LSA) that summarize the information within their areas.
Chapter 8 Routing with OSPF OSPF and Network Organization The Backbone The backbone is a special area within an autonomous system. It serves as the hub of the AS, and all other areas in the AS must connect to the backbone. Routers within the backbone are known as backbone routers. Some backbone routers are also area border routers; they connect the backbone to another area. (except the central router) OSPF considers the backbone a particularly important area, and it provides special features to account for a break in the backbone connectivity.
Chapter 8 Routing with OSPF OSPF and Network Organization The Backbone Virtual link created by network administrator (manually configured)
Chapter 8 Routing with OSPF OSPF and Network Organization Stub Areas :AS boundary router :area border router External LSAs Summary LSAs
Chapter 8 Routing with OSPF OSPF and Network Organization Stub Areas In external or summary LSAs, the detailed topology of the outside world is hidden. The LSAs simply indicate which destinations are available. Even with such summaries, OSPF can still require considerable bandwidth. To avoid this extra overhead, OSPF supports the concept of a stub area. A stub area is a special OSPF area that has only one area border router; that is, there is only one way out of the area.
Chapter 8 Routing with OSPF OSPF and Network Organization Stub Areas Within the stub area, no summary or external LSAs circulate. Each router in the network learns only the location of the area’s exit point-its one active area border router. In effect, the area border router serves as a default router for packets that otherwise have no place to go. Stub areas suffer from two restrictions. First, virtual links cannot pass through a stub area. (only one in, no exit) Second, stub areas cannot have an AS boundary router within them. Note that a stub area’s area border router can serve as an AS boundary router as well. AS boundary routers are only prohibited inside a stub area.
Chapter 8 Routing with OSPF OSPF and Network Organization Not So Stubby Areas Stub areas are quite effective in reducing the burden on OSPF. In exchange, the routers forfeit the ability to exchange routes learned from any source other than OSPF. All such routes are classified as external routes, and OSPF does not propagate them within a stub area. This restriction is sometimes too severe. It makes it difficult to coordinate additional routing protocols within an area. A not so stubby area, more commonly known as an NSSA, provides most of the benefits of stub areas, but with a little more flexibility.
Chapter 8 Routing with OSPF OSPF and Network Organization Not So Stubby Areas NSSAs allow routers to exchange some information about routes from other sources, without incurring the cost of becoming a full OSPF area. NSSAs permit the distribution of special, NSSA link state advertisements. These NSSA LSAs are very similar to external LSAs; the only difference is how they are disseminated. External LSAs are not flooded in a not so stubby area, while NSSA LSAs are flooded only in a single NSSA.
Chapter 8 Routing with OSPF Special Networks OSPF makes special allowances for three special types of networks: broadcast networks, non-broadcast networks, and demand networks. Broadcast Networks Broadcast networks provide an inherent broadcast or multicast capability, and they allow any system to communicate directly (without intervening routings) with any other system. Broadcast networks deserve special treatment because of their any-to-any flexibility.
Chapter 8 Routing with OSPF Special Networks Broadcast Networks A total of 20 entries will be needed in the link state database. n*(n-1) entries needed in LS database
Chapter 8 Routing with OSPF Special Networks Broadcast Networks O(n2) O(n)
Chapter 8 Routing with OSPF Special Networks Broadcast Networks Elect a router as the designated router. Other routers consider the designated router as their only neighbor. network link (in contrast to normal router link) 2n entries needed in LS database
Chapter 8 Routing with OSPF Special Networks Broadcast Networks In order to force a correct route calculation, all neighbors advertised by the designated router are done so with a distance of zero. The distance between any two routers on the network is the sum of the distance to the designated router (which reflects the true cost of the network) and the distance from the designated router (defined to be zero).
Chapter 8 Routing with OSPF Special Networks Broadcast Networks OSPF takes advantage of the broadcast networks when it floods LSA packets. Instead of sending a copy of the LSA to every router on the network, the designated router transmits LSA to a special multicast address. All OSPF routers listen for this address, and they all receive the flooded LSA packet. Since the designated router sends LSAs to all routers on the networks, regular routers do not worry about flooding LSA packets to all. Instead, they simply send LSAs to the designated router.
Chapter 8 Routing with OSPF Special Networks Broadcast Networks Clearly, the designated router plays a key role in OSPF’s operation on a broadcast network. That importance could make networks vulnerable to failures of the designated routers. To reduce this vulnerability, OSPF elects a backup designated router when it elects a designated router. The backup router keeps track of the same information as the designated router, but it normally remains silent. If the backup detects a failure of the designated router, however, it becomes active immediately.
Chapter 8 Routing with OSPF Special Networks Nonbroadcast Networks Same designated router concept can be applied to reduce routing entries
Chapter 8 Routing with OSPF Special Networks Nonbroadcast Networks Differences to broadcast network: 1. Must transmit LSAs to each router separately. 2. Designated router election is more complicated.
Chapter 8 Routing with OSPF Special Networks Demand Networks Demand networks are networks whose expense is directly related to usage. Narrowband ISDN links, for example, often incur charges based on the length of time they remain active. Such networks earn the name demand because, ideally at least, they should only be active when actual application traffic demands their use. OSPF, however, normally counts on links remaining active indefinitely in order to exchange routing information periodically. Even without user traffic, these packets will consume bandwidth and incur cost in a demand network.
Chapter 8 Routing with OSPF Special Networks Demand Networks OSPF copes with demand networks in two ways. First, it eliminates the periodic hello packet used for neighbor greeting. Once a router knows the identify of its peer, it leaves the link turned off. Second, OSPF refrains from sending periodic LSA packets across demand networks. Unless the LSA has changed, routers block its progress. To support this type of operation, OSPF relaxes the requirement of LSA age limit check.
Chapter 8 Routing with OSPF Multicast Routing Assume all links have the same cost.
Chapter 8 Routing with OSPF Multicast Routing Router B’s shortest path tree (independent of who is the sender)
Chapter 8 Routing with OSPF Multicast Routing
Chapter 8 Routing with OSPF Multicast Routing Have different root with respect to unicast shortest path tree (therefore, will change for different sender)
Chapter 8 Routing with OSPF Multicast Routing
Chapter 8 Routing with OSPF Multicast Routing
Chapter 8 Routing with OSPF Multicast Routing All these examples prove, multicast routing can present a significant problem to OSPF routers. Those routers must calculate a different shortest path tree for each source system. Unfortunately, Dijkstra’s calculation can be very computation-intensive, particularly with large networks. To limit the burden on routers, OSPF strongly recommends that routers cache the results of multicast tree calculations. If the source sends additional packets to the multicast group, the routers can look at this cache instead of recalculating the tree.
Chapter 8 Routing with OSPF OSPF Packet Format Size of packet in bytes, including this header Also carried in IP datagram A value of zero signifies the backbone area For entire packet, excluding authentication data 0: no authentication 1: simple password
Chapter 8 Routing with OSPF OSPF Packet Format
Chapter 8 Routing with OSPF Packet Header for IPv6 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version # | Type | Packet length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Router ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Area ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Instance ID | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version #=3 Authentication removed