ICND1 100-105

ICND1 100-105

Exploring the Functions of Routing

In this lesson, we are going to explore the packet delivery process, from the routing perspective. We will see how one of the main functions of routing is to determine the optimal path across a routed network for IP packets. We will dive deep into certain components like routing tables and describe the different methods to populate routing tables, for example, static and dynamic routing. For dynamic routing, will list the characteristics of routing protocols and classify them into distance, vector, and link state.


We know that routers implement layer 3 or network layer functions. Their main job is to forward packets based upon a routing table. When doing so, they also provide traffic segmentation, multiple broadcast domains, and define network layer addressing subnets and networks. Those networks are defined by router network adapters or ports to which IP addresses are assigned. Those IP addresses are typically the default gateway to PCs and servers or other networking devices.

Routers also connect to service providers and act as gateways to other networks, typically found at the perimeter or edge of the network. Some of those network adapters will be other than Ethernet. They will have connectivity to serial interfaces, DSL connections, and other forms of WAN. The main components listed here are similar to those of any computing and network device: CPU, motherboard, RAM, ROM. In fact, Cisco routers have different types of memory. They also have flash, where the image of the operating system resides. But the main point behind this is that those computing resources are now so powerful that they allow routers to start behaving like other network elements; they can incorporate firewalling functions and even voice call routing capabilities for IP telephony environments, so routers today are the same good old layer 3 devices, but they are also the jack of all trades, which allows you to integrate multiple functions within your network elements: some of those via software upgrades, and some of them via network modules in modular configuration routers.


Cisco 2900 Series

Router Functions

The basic routing function can be split into two areas; one is to build a map of the network and for that routers typically use either static routing or dynamic routing protocols. With the help of dynamic routing protocols, routers will let other network devices know about not only the topology of the network but also about network changes. Static routing will be that static and will not adapt to network changes. Both models accomplish the task of building the map of the network in the form of the routing table.

The command and output shown here display the routing table on a Cisco router. With show IP route, an IOS device like this one could show the different destinations, the cost to get there, what is known as the administrative distance to define priorities for different routing protocols, and the next-hop to get to that destination. Notice how the routing protocol that learned that particular entry or destination is shown there in the first column. This is EIGRP, this is RIP, and this is OSPF. With this information, routers will be able to determine where to forward packets. They will do so by sending the packet to the next router in the path according to the info in the routing table. Notice then that routing is based on destination addresses.

Path Determination

During the process of path determination, the routers will consider multiple alternatives to get to the same place; those alternatives result from the redundancy built into most network designs. You want multiple paths, so that if one goes down, other alternatives will become available. In determining the best path, routers will consider several things. One of them is the source of the information, and so you could have multiple dynamic routing protocols or even static routing populating the routing table and telling the router what the options are.

The second piece of information is the cost of taking each path, and knowing that the path is made up of multiple links or hops that are defined by other routers. Then we could add the concepts of the cost in the context of the total path, but that cost is nothing more than the sum of all the costs to reach each hop in the path.

Well, the two decisions are ruled by different pieces of information, for example, in order to define a tie breaker between sources of information, the routers use the administrative distance, so if a routing protocol like OSPF is telling the router information on a destination and also RIP is telling that router information on the same destination, then the administrative distance will define who wins. Once the source is selected, then the cost is what matters; in other words, if OSPF is giving me the information on those two paths, then the cost of the path will define which one I take. This is similar to having two maps to drive from one city to the other. You first select which map you are going to follow and then if the map is giving you more than one option, then you will select the option according to perhaps the amount of time it takes or the amount of miles you have to drive for each option.

Routing Tables

So the routing table contains the network layer intelligence that tells the router how to forward packets to remote destinations. Initially, that routing table is made up of networks that are directly connected to the particular router. They are obviously shown as directly connected networks, after that the way to learn about remote destinations is by either populating the routing table with static routes in which an administrator will tell the router how to get to the destination or by populating the routing table via routing table advertisements coming from other routers.

So routers are gossipy and they will tell each other information that allows them to know about all the gossip in the network. In both cases, static and dynamic routing notice how routers use the reserved subnet addresses or network addresses that contain all 0s in the host portion of the IP address.

In this case, we are talking about a classless subnetted class A address. Network 10 split into subnets similar to a class C. However, in all cases here, the host portion of the address, the fourth byte is all 0s and that represents that subnet or network itself. In other words, these are destination networks or subnets. In the case of remote destinations, the routing table entries show what the next hop is in order to reach that destination. In this case, in order to reach, our next-hop is router 2 at

Routing Tables

These are categories of routing table entries that could be populated either dynamically or statically. Some of them are born with the router. As soon as the router boots up, it will identify its directly connected active networks and interfaces and define them as reachable destinations, only because of the fact that the router is directly attached or connected to it. Now that is pretty smart, but even smarter is the fact that the routers will communicate with each other, exchange routing information via dynamic routing protocols like OSPF or EIGRP, and then learn not only about those destinations, but also adjust to changes on those destinations.

Routing protocols will be able to identify topology changes and tell each other about them. Soon enough, entries will appear and disappear from the routing table according to availability; again, an administrator could come in and manually insert static entries. This is sometimes not recommended because they will be static and they will not adjust to network changes; in other words, if the entry or the destination goes down, the entry will remain there and the router will still forward packets to a destination that is not available. Perhaps a special case of a static route is the default route. Although they can also be learned dynamically, static defaults are used when no explicit route to a destination is known and so this is the entry that identifies all unknown destinations. The router will say, "If I do not know about a certain destination, I will forward a packet to someone that does, typically another router."

Routing Metrics

Optimal path selection depends on what is known as the cost to reach a destination across a certain path. Again, the cost of a path is made up of incremental costs for each hop along the path. The cost is also known as metric, and different routing protocols will consider different criteria in order to define the metric. Older technologies and protocols consider the number of routers along the path in order to reach a destination; that is what they call the hop count. Hop count is sometimes not an efficient way to determine cost, because you could have different bandwidths associated with each hop or each link.

Routing Metrics

In this example the two-hop path is better, because it has more bandwidth available. Other routing protocols start considering bandwidth as a measure of cost, and even more parameters in the criteria, for example, EIGRP considers bandwidth delay, reliability, load, and maximum transmission unit. In that case, a path with enough bandwidth, but one that is fully congested, would not be selected and perhaps another path with less available bandwidth would be selected because it is less congested and more reliable.

Perhaps one of the points and highlights of this lesson is the fact that routing protocol selection, if you are doing dynamic routing, is key in determining the cost or metric and, therefore, how efficient and optimal the path selection will be, but also the convergence time, which is defined by the time it takes for routing protocol to detect a topology change and adjust by selecting an alternative path if the main path is down. There are different categories of routing protocols if you are using dynamic routing that define their cost and metric, but also their behavior under those circumstances.

Distance Vector Routing Protocols

Perhaps one of the points and highlights of this lesson is the fact that routing protocol selection, if you are doing dynamic routing, is key in determining the cost or metric and, therefore, how efficient and optimal the path selection will be, but also the convergence time, which is defined by the time it takes for routing protocol to detect a topology change and adjust by selecting an alternative path if the main path is down. There are different categories of routing protocols if you are using dynamic routing that define their cost and metric, but also their behavior under those circumstances.

Using the distance vector approach, which is one of the categories, routers do not have to really know the whole path toward the destination. They only have to know the direction or vector in which to send a packet. In that sense, it will only keep information in the routing tables related to what the next-hop should be in order to reach a certain destination.

Distance vector protocols suffer from many disadvantages; one of them is that they periodically advertise the routing tables. Some of them use broadcasts to advertise the entire routing table. This creates too much overhead in the network and it may be unnecessary if the network does not really change, so it is really similar to calling everybody to tell them about gossip, by calling them frequently to tell them the same gossip over and over again. Even if the rumor has not changed, it is also similar to telling the whole story over and over again from the start, even though nothing has changed or even though just a piece of the story has changed. RIP, or Routing Information Protocol, is an example of a distance vector protocol. In the case of RIP, it uses a hop count as the measure of cost.

Link-State Routing Protocols

Link-State protocols are more efficient and effective in creating network topologies, sharing them, and selecting the best path as compared to distance vector protocols. There are several differences between the two categories. For example, link state protocols will not broadcast the information per router, it will use multicast where each router advertises via that multicast the link it knows to the neighbors. Secondly, link-state protocols do not advertise periodically. After an initial flood of all the information, yet will only advertise changes to the topology. In other words, if the link goes down then that small change will be advertised via multicast. Third, router not only know about the next hop toward a destination, they know about the whole topological map of the network. Each router after the initial flood will build that map of the network, which includes all the routers and all the links. With that information, each router is capable of browsing those tables via using the shortest path first algorithm, and select the best path toward each destination. This would be installed in a routing table. So, you do not need a chain reaction of events for each router to make a topological changes and change routing decisions. Once there is a change, for example this link going down, that will affect only a little branch of the tree and only that change will be advertised to the network. This is what they call incremental updates. All of these changes and differences make link-state protocols more effective and efficient in dealing with network changes.