Routing table

From Hill2dot0
Jump to: navigation, search
Routing Table

The routing table is at the heart of router operation. It typically stores the addresses of the local subnetworks, any static routes configured by the network administrator, and the routes dynamically learned by the router using a routing protocol. The Network Layer software can make all of its routing decisions simply by consulting this table.

There are many parallels to the routing table in everyday life. We are all familiar with the process of calling directory assistance to get a particular phone number. We provide a name and address, and the operator provides a phone number. To do this, the operator consults a database (i.e., the routing table). Meanwhile, there are a number of defined procedures for maintaining the information in that table (e.g., order entry people, etc.).

Routing Table Function

Routing table example

Routing decisions must be made quickly if a router is to avoid introducing excessive delay to the transmission time of a packet. If there are multiple routers on the path between the source and destination hosts, the delay introduced by each router is cumulative, resulting in broken connections and numerous time-outs at higher layers if delay becomes excessive. A straightforward way of expediting routing decisions is to make most of the routing decisions in advance, and store the results for later access. This is the routing table’s primary purpose.

In its simplest form, a routing table contains a list of all known subnetwork addresses (i.e., NETIDs or routing prefixes). Associated with each subnetwork address is a port identifier and the network address of an adjacent router. If the router receives a packet destined for subnetwork, it looks up this address in its routing table. If subnetwork is directly connected to the router (as depicted in the image to the left), the packet is forwarded to that specified end device by forwarding it on the port designated in the routing table to the destination address specified in the packet. The packet must be placed in a Data Link Layer frame (i.e., a MAC frame, such as Ethernet or Wi-Fi) addressed to the designated host.

If the packet was destined for subnetwork and this subnetwork was not directly connected (again, as depicted in the image), the router retrieves the port identifier from the table along with the address of an adjacent router associated with the address of the destination subnetwork, in this case In the example in the image, this would be Port 2 and Router It then forwards the packet, via the designated port, to the router specified by the router address. That is, the original packet is forwarded in a Data Link Layer frame addressed to the router specified in the routing table. This is the router that has been identified as being the best choice, based on some specified criteria, for reaching the target subnetwork.

The routing table stores all possible routes, implicitly or explicitly. It is here that static routes are stored when they are defined by the network administrator. It is here that the router stores learned routes as they are learned. Even default routes are stored in this table (there is only one default route per router).

In addition to the subnetwork, port, and adjacent router address, the routing table may store other information as well. It may store an indicator of how the entry was learned. That would mean an indicator for statically entered routes, as well as an indicator for dynamically learned routes. The latter might include the identity of the specific routing protocol used to learn the route (in some cases, routers can be running multiple routing protocols). It may also contain an indication of the total cost of the route, or other metrics related to its general goodness. Here we have to take the words "cost" and "goodness" loosely. Every routing protocol uses a defined set of metrics to assess the quality of a route. In general, it has some formula it uses to assign each route a value. If there are multiple routes to a given destination, the one with the smallest calculated value is usually the one stored in the routing table. The table can also store the calculated value and/or the individual parameters that went into calculating the route.

Routing Table Updates

Routing Table Updates

The routing process used by IP is relatively straightforward. However, a few issues need to be cleared up first; one such issue is the maintenance of routing tables. As the visual depicts, IP, like any Network Layer protocol, is simply consulting the routing table. So how is the table created and maintained? This is the task of the routing protocol.

Early routing was static only. The routing tables were manually created and maintained. Obviously, this approach is somewhat rigid and not responsive to changes in the network. If there is one thing we know about networks, it is that they change, grow, and fail. Static route entries are still very common, but they tend to be limited to places where there is only one possible path to a given destination, for example, the core router in a data center linked to individual branch offices. There is only one way to get to each branch office, so there is no need to run a routing protocol over the wide area connection. The core router can be statically programmed to know the address of the subnetwork in each branch office, and the router in each branch office can be configured with a default route back to the data center. In a network with diverse paths, however, a dynamic routing protocol is better.

Dynamic routing protocols automatically adjust to reflect changes in the network. While IP does not itself define the specific routing protocol that is to be used, the routing protocols used in TCP/IP are typically dynamic. Furthermore, they are distributed (i.e., each device makes its routing decisions independently). Each router decides how best to handle a given packet to continue it on its way to its intended destination. Through the collective action of the routers, a packet is directed towards its destination. In the IP environment, we will also find that the devices are in some way cooperating to exchange information necessary for making intelligent routing decisions.

Therefore, the role of a dynamic, distributed routing protocol is twofold. First, it must define a mechanism for selecting the “best” path, or at least one that is in some way measurably better than other options. Second, it must also define a mechanism by which any device that must make routing decisions can receive the information necessary to make those decisions intelligently. Notice that this means the routing protocol is not only updating the routing table, but could be extracting information from it to send to other routers and hosts in the internetwork.

There are a number of different routing protocols that can be used in TCP/IP environments: Routing Information Protocol (RIP), Open Shortest Path First (OSPF), Enhanced Interior Gateway Routing Protocol (EIGRP), and the Border Gateway Protocol (BGP) are common examples. RIP is formally classified as a distance vector routing protocol, OSPF is classified as a link state routing protocol, and EIGRP is a Cisco proprietary protocol that it classifies as a hybrid between distance vector and link state. BGP is a distance vector routing protocol that plays a unique role in the Internet; it is used to pass routing information between ISPs.


<mp3></mp3> | Routing table