Link-State Dynamic Routing (3.4)Distance vector routing protocols are thought to be simple to understand, whereas link-state routing protocols have the reputation of being very complex, even intimidating. However, link-state routing protocols and concepts are not difficult to understand. In many ways, the link-state process is simpler to understand than distance vector concepts. Show
Link-State Routing Protocol Operation (3.4.1)This section describes the characteristics, operations, and functionality of link-state routing protocols. Understanding the operation of link-state routing is critical to enabling, verifying, and troubleshooting these protocols. Shortest Path First Protocols (3.4.1.1)Link-state routing protocols are also known as shortest path first protocols and are built around Edsger Dijkstra’s shortest path first (SPF) algorithm. The SPF algorithm is discussed in more detail in a later section. The IPv4 link-state routing protocols are shown Figure 3-35:
Link-state routing protocols have the reputation of being much more complex than their distance vector counterparts. However, the basic functionality and configuration of link-state routing protocols is equally straightforward. Just like RIP and EIGRP, basic OSPF operations can be configured using the:
Dijkstra’s Algorithm (3.4.1.2)All link-state routing protocols apply Dijkstra’s algorithm to calculate the best path route. The algorithm is commonly referred to as the shortest path first (SPF) algorithm. This algorithm uses accumulated costs along each path, from source to destination, to determine the total cost of a route. In Figure 3-36, each path is labeled with an arbitrary value for cost. The cost of the shortest path for R2 to send packets to the LAN attached to R3 is 27. Specifically, the cost is R2 to R1 (20) plus R1 to R3 (5) plus R3 to LAN (2). Each router determines its own cost to each destination in the topology. In other words, each router calculates the SPF algorithm and determines the cost from its own perspective. SPF Example (3.4.1.3)The table in Figure 3-37 displays the shortest path and the accumulated cost to reach the identified destination networks from the perspective of R1. The shortest path is not necessarily the path with the least number of hops. For example, look at the path to the R5 LAN. It might be assumed that R1 would send directly to R4 instead of to R3. However, the cost to reach R4 directly (22) is higher than the cost to reach R4 through R3 (17). Observe the shortest path for each router to reach each of the LANs, as shown in Tables 3-8 through 3-11. Table 3-8 R2 SPF Tree
Table 3-9 R3 SPF Tree
Table 3-10 R4 SPF Tree
Table 3-11 R5 SPF Tree
Link-State Updates (3.4.2)Link-state updates (LSUs) are the packets used for OSPF routing updates. This section discusses how OSPF exchanges LSUs to discover the best routes. Link-State Routing Process (3.4.2.1)So exactly how does a link-state routing protocol work? With link-state routing protocols, a link is an interface on a router. Information about the state of those links is known as link-states. All routers in an OSPF area will complete the following generic link-state routing process to reach a state of convergence:
Link and Link-State (3.4.2.2)The first step in the link-state routing process is that each router learns about its own links, its own directly connected networks. When a router interface is configured with an IP address and subnet mask, the interface becomes part of that network. Refer to the topology in Figure 3-38. For purposes of this discussion, assume that R1 was previously configured and had full connectivity to all neighbors. However, R1 lost power briefly and had to restart. During boot up R1 loads the saved startup configuration file. As the previously configured interfaces become active, R1 learns about its own directly connected networks. Regardless of the routing protocols used, these directly connected networks are now entries in the routing table. As with distance vector protocols and static routes, the interface must be properly configured with an IPv4 address and subnet mask, and the link must be in the up state before the link-state routing protocol can learn about a link. Also, like distance vector protocols, the interface must be included in one of the network router configuration statements before it can participate in the link-state routing process. Figure 3-38 shows R1 linked to four directly connected networks:
As shown in Figures 3-39 through 3-42, the link-state information includes:
Say Hello (3.4.2.3)The second step in the link-state routing process is that each router is responsible for meeting its neighbors on directly connected networks. Routers with link-state routing protocols use a Hello protocol to discover any neighbors on their links. A neighbor is any other router that is enabled with the same link-state routing protocol. In Figure 3-43, R1 sends Hello packets out its links (interfaces) to discover if there are any neighbors. In Figure 3-44, R2, R3, and R4 reply to the Hello packet with their own Hello packets because these routers are configured with the same link-state routing protocol. There are no neighbors out the FastEthernet 0/0 interface. Because R1 does not receive a Hello on this interface, it does not continue with the link-state routing process steps for the FastEthernet 0/0 link. When two link-state routers learn that they are neighbors, they form an adjacency. These small Hello packets continue to be exchanged between two adjacent neighbors and serve as a keepalive function to monitor the state of the neighbor. If a router stops receiving Hello packets from a neighbor, that neighbor is considered unreachable and the adjacency is broken. Building the Link-State Packet (3.4.2.4)The third step in the link-state routing process is that each router builds an LSP containing the state of each directly connected link. After a router has established its adjacencies, it can build its LSPs that contain the link-state information about its links. A simplified version of the LSP from R1 displayed in Figure 3-45 would contain the following:
Flooding the LSP (3.4.2.5)The fourth step in the link-state routing process is that each router floods the LSP to all neighbors, who then store all LSPs received in a database. Each router floods its link-state information to all other link-state routers in the routing area as shown in Figure 3-46. Whenever a router receives an LSP from a neighboring router, it immediately sends that LSP out all other interfaces except the interface that received the LSP. This process creates a flooding effect of LSPs from all routers throughout the routing area. In the animation, the LSPs are flooded almost immediately after being received without any intermediate calculations. Link-state routing protocols calculate the SPF algorithm after the flooding is complete. As a result, link-state routing protocols reach convergence very quickly. Remember that LSPs do not need to be sent periodically. An LSP only needs to be sent:
In addition to the link-state information, other information is included in the LSP, such as sequence numbers and aging information, to help manage the flooding process. This information is used by each router to determine if it has already received the LSP from another router or if the LSP has newer information than what is already contained in the link-state database. This process allows a router to keep only the most current information in its link-state database. Building the Link-State Database (3.4.2.6)The final step in the link-state routing process is that each router uses the database to construct a complete map of the topology and computes the best path to each destination network. Eventually, all routers receive an LSP from every other link-state router in the routing area. These LSPs are stored in the link-state database. Table 3-12 displays the link-state database content of R1. Table 3-12 Link-State Database
As a result of the flooding process, R1 has learned the link-state information for each router in its routing area. Notice that R1 also includes its own link-state information in the link-state database. With a complete link-state database, R1 can now use the database and the shortest path first (SPF) algorithm to calculate the preferred path or shortest path to each network, resulting in the SPF tree. Building the SPF Tree (3.4.2.7)Each router in the routing area uses the link-state database and SPF algorithm to construct the SPF tree. For example, using the link-state information from all other routers, R1 can now begin to construct an SPF tree of the network. To begin, the SPF algorithm interprets each router’s LSP to identify networks and associated costs. The SPF algorithm then calculates the shortest paths to reach each individual network, resulting in the SPF tree as shown in Figure 3-47. R1 now has a complete topology view of the link-state area. Each router constructs its own SPF tree independently from all other routers. To ensure proper routing, the link-state databases used to construct those trees must be identical on all routers. Adding OSPF Routes to the Routing Table (3.4.2.8)Using the shortest path information determined by the SPF algorithm, these paths can now be added to the routing table. Figure 3-48 shows the routes that have now been added to R1’s IPv4 routing table. The routing table also includes all directly connected networks and routes from any other sources, such as static routes. Packets are now forwarded according to these entries in the routing table. Why Use Link-State Routing Protocols? (3.4.3)This section discusses the advantages of using link-state routing protocols and compares the two types of link-state routing protocols. Why Use Link-State Protocols? (3.4.3.1)There are several advantages of link-state routing protocols compared to distance vector routing protocols.
Link-state protocols also have a few disadvantages compared to distance vector routing protocols:
Link-State Protocols Support Multiple Areas (3.4.3.2)Modern link-state routing protocols are designed to minimize the effects on memory, CPU, and bandwidth. The use and configuration of multiple areas can reduce the size of the link-state databases. Multiple areas can also limit the amount of link-state information flooding in a routing domain and send LSPs only to those routers that need them. When there is a change in the topology, only those routers in the affected area receive the LSP and run the SPF algorithm. This can help isolate an unstable link to a specific area in the routing domain. For example, in Figure 3-49, there are three separate routing domains: area 1, area 0, and area 51.
Figure 3-49 Create Areas to Minimize Router Resource Usage If a network in area 51 goes down, the LSP with the information about this downed link is only flooded to other routers in that area. Only those routers in area 51 need to update their link-state databases, rerun the SPF algorithm, create a new SPF tree, and update their routing tables. Routers in other areas learn that this route is down, but this is done with a type of LSP that does not cause them to rerun their SPF algorithm. Routers in other areas can update their routing tables directly. Protocols that Use Link-State (3.4.3.3)There are only two link-state routing protocols, OSPF and IS-IS. Open Shortest Path First (OSPF) is the most popular implementation. It was designed by the Internet Engineering Task Force (IETF) OSPF Working Group. The development of OSPF began in 1987 and there are two current versions in use:
IS-IS was designed by International Organization for Standardization (ISO) and is described in ISO 10589. The first incarnation of this routing protocol was developed at Digital Equipment Corporation (DEC) and is known as DECnet Phase V. Radia Perlman was the chief designer of the IS-IS routing protocol. IS-IS was originally designed for the OSI protocol suite and not the TCP/IP protocol suite. Later, Integrated IS-IS, or Dual IS-IS, included support for IP networks. Although IS-IS has been known as the routing protocol used mainly by ISPs and carriers, more enterprise networks are beginning to use IS-IS. OSPF and IS-IS share many similarities and also have many differences. There are many pro-OSPF and pro-IS-IS factions who discuss and debate the advantages of one routing protocol over the other. Both routing protocols provide the necessary routing functionality. What is linkThe LSDB (Link State Database) is the database that OSPF builds and is based on the information that it has found in LSAs (Link State Advertisements). The LSDB is synchronized between routers within the same area.
Which OSPF neighbor state indicates that two neighbors have exchanged routes?2-Way State
This state describes the Bi-Directional communication state, Bi- Directional means that each router has received the other's Hello packet and that each router can see its own Router ID included within the Hello packet's neighbor field.
Which of the following OSPF neighbor states is expected when the exchange of topology information is complete between two OSPF neighbors?Which OSPF neighbor states is expected when exchange of topology information is complete so that neighboring routers have same LSDB? Answer: B. Neighboring OSPF routers that complete the database exchange are considered fully adjacent and rest in a Full neighbor state.
What are the 7 stages of OSPF?The states are Down, Attempt, Init, 2-Way, Exstart, Exchange, Loading, and Full.
|