Routing metrics vary depending on the routing protocol used. Figure 4-3 shows how routers keep a table of information used to decide how to forward packets.
The routing table consists of an ordered list of "known" network addresses—that is, those addresses that have been learned dynamically by the routing process or the statically configured, directly connected networks. Routing tables also include information on destinations and next-hop associations. These associations tell a router that a particular destination is either directly connected to the router or that it can be reached through another router, called the next-hop router, on the way to the final destination. When a router receives an incoming packet, it uses the destination address and searches the routing table to find the best path. If no entry can be found, the router will discard the packet after sending an Internet Control Message Protocol (ICMP) message to the source address of the packet.
In Figure 4-3, the routing table of the router in the middle shows that when it receives a packet with a destination address on the 10.1.3.0 network, it must forward the packet to R2.
Routers communicate with each other and maintain their routing tables by transmitting routing update messages. Depending on the particular routing protocol, routing update messages can be sent periodically or only when there is a change in the network topology. The information contained in the routing update messages includes the destination networks that the router can reach and the routing metric to reach each destination. By analyzing routing updates from neighboring routers, a router can build and maintain its routing table.
Static, Dynamic, Directly Connected, and Default Routes
Routers can learn about other networks through static, dynamic, directly connected, and default routes. The routing tables can be populated by the following methods:
■ Directly connected networks: This entry comes from having router interfaces directly attached to network segments and is the most certain method of populating a routing table. If the interface fails or is administratively shut down, the entry for that network will be removed from the routing table. The administrative distance is 0 and, therefore, will preempt all other entries for that destination network, because the entry with the lowest administrative distance is the best, most trusted source.
■ Static routes: Static routes are manually entered directly into the configuration of a router by a system administrator. The default administrative distance for a static route is 1; therefore, the static routes will be included in the routing table unless there is a direct connection to that network. Static routes can be an effective method for small, simple networks that do not change frequently.
■ Dynamic routes: Dynamic routes are learned by the router, and the information is responsive to changes in the network so that it is constantly being updated. There is, however, always a lag between the time that a network changes and when all the routers become aware of the change. The time delay for a router to match a network change is called convergence time. The shorter the convergence time, the better, and different routing protocols perform differently in this regard. Larger networks require the dynamic routing method because there are usually many addresses and constant changes, which, if not acted upon immediately, would result in loss of connectivity.
■ Default route: A default route is used when no explicit path to a destination is found in the routing table. The default route can be manually inserted or populated from a dynamic routing protocol.
Some routing protocols use their own rules and metrics to build and update routing tables automatically. These protocols are known as dynamic routing protocols because they can adjust dynamically to changes in the network topology.
When a routing protocol updates a routing table, the primary objective of the protocol is to determine the best information to include in the table. The routing algorithm generates a number, called the metric value, for each path through the network. Sophisticated routing protocols can base route selection on multiple metrics, combining them in a single metric. Typically, the smaller the metric number, the better the path. Figure 4-4 shows some network criteria that can be used to establish metrics.
Figure 4-4 Establishing Routing Metrics
Metrics can be based on either a single characteristic or several characteristics of a path.
The metrics that are most commonly used by routing protocols are as follows:
■ Bandwidth: The data capacity of a link (the connection between two network devices)
■ Delay: The length of time required to move a packet along each link from source to destination—depends on the bandwidth of intermediate links, port queues at each router, network congestion, and physical distance
■ Hop count: The number of routers that a packet must travel through before reaching its destination (In Figure 4-4, the hop count from host A to host B would be 1 or 2 depending on the path.)
■ Cost: An arbitrary value assigned by a network administrator or operating system, usually based on bandwidth, administrator preference, or other measurement
In addition to the metrics used to select paths, there are also a variety of routing protocol methods. Most routing protocols are designed around one of the following two routing methods: distance vector or link-state.
Distance vector routing: In distance vector routing, a router does not have to know the entire path to every network segment; the router only has to know the direction, or vector, in which to send the packet. The distance vector routing approach determines the direction (vector) and distance (hop count) to any network in the internetwork. Distance vector algorithms periodically (such as every 30 seconds by default for Routing Information Protocol [RIP]) send all or portions of their routing table to their adjacent neighbors. Routers running a distance vector routing protocol will send periodic updates, even if there are no changes in the network. By receiving the routing table of a neighbor, a router can verify all the known routes and make changes to its local routing table based on updated information received from the neighboring router. This process is also known as "routing by rumor," because the understanding that a router has of the network topology is based on the perspective of the routing table of a neighbor router. Figure 4-5 shows how distance vector protocols determine routes.
Figure 4-5 Distance Vector Protocols
Figure 4-5 Distance Vector Protocols
An example of a distance vector protocol is RIP, which is a commonly used routing protocol that uses hop count as its routing metric.
Link-state routing: In link-state routing, each router tries to build its own internal map of the network topology. Each router sends messages into the network when it first becomes active, listing the routers to which it is directly connected and providing information about whether the link to each router is active. The other routers use this information to build a map of the network topology and then use the map to choose the best destination. Link-state routing protocols respond quickly to network changes, sending triggered updates when a network change has occurred and sending periodic updates (link-state refreshes) at long time intervals, such as every 30 minutes.
When a link changes state, the device that detected the change creates an update message regarding that link (route), and that update message is propagated to all routers (running the same routing protocol). Each router takes a copy of the update message, updates its routing tables, and forwards the update message to all neighboring routers. This flooding of the update message is required to ensure that all routers update their databases before creating an updated routing table that reflects the new topology. Figure 4-6 shows how link-state protocols determine routes.
Figure 4-6 Link-State Protocols
Examples of link-state routing protocols are Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS).
NOTE Cisco developed the Enhanced Interior Gateway Routing Protocol (EIGRP), which combines the best features of distance vector and link-state routing protocols.
Summary of Exploring the Functions of Routing
The following list summarizes the key points that were discussed in the previous sections:
■ Routers have certain components that are also found in computers and switches. These components include the CPU, motherboard, RAM, and ROM.
■ Routers have two primary functions in the IP packet delivery process: maintaining routing tables and determining the best path to use to forward packets.
■ Routers determine the optimal path for forwarding IP packets between networks. Routers can use different types of routes to reach the destination networks, including static, dynamic, directly connected, and default routes.
■ Routing tables provide an ordered list of best paths to known networks and include information such as destination, next-hop associations, and routing metrics.
■ Routing algorithms process the received updates and populate the routing table with the best route.
■ Commonly used routing metrics include bandwidth, delay, hop count, and cost.
■ Distance vector routing protocols build and update routing tables automatically by sending all or some portion of their routing table to neighbors. The distance vector routing approach determines the direction (vector) and distance to any network in the internetwork.
■ Link-state routing protocols build and update routing tables automatically, running the shortest path first (SPF) algorithms against the link-state database to determine the best paths, and flood routing information about their own links to all the routers in the network.
■ Cisco developed EIGRP, which combines the best features of distance vector and linkstate routing protocols.
Was this article helpful?
Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.