Router Essentials
Author: Dheeraj (Raj) Tolani
Abstract
Students getting started with Cisco and other networking
technologies often ask if there is a basic class before the basic
class. This routing white paper provides some of the basic concepts
and commands a beginning networking student needs to know to get
the most of out a Cisco or other networking class.
Router Basics
A router is a device that allows you to move packets between
networks. This forwarding of packets occurs using the best path.
What is the best path? The best path depends on the routing
protocols you're using on your routers.
I like to think of best path determination as asking multiple
people how to go from point A to point B. Some might give me an
option to start walking from A to B, while others might ask me to
use the public bus service.
Keep in mind that there might be multiple public buses, so if I
choose the public bus option, I must then pick the best bus line to
get from point A to point B. Initially, I have to choose the person
to trust: the one asking me to walk or the one giving me the bus
line information. I can listen to all possible directions, and then
focus only on the directions from the individual I trust.
Routers do the same kind of thing. Multiple routing protocols
could be running on routers, especially when you are migrating from
a non-Cisco environment to Cisco-only environments, or for other
political reasons in your organization. We need a method to pick
the best routing protocol from all the routing protocols running.
And, since that best protocol might have multiple paths, we then
have to pick the best one among all the paths.
The parameters these protocols use to determine their best path
will vary. For example, some protocols will only consider the
number of hops between two points, as with Routing Information
Protocol (RIP). Other protocols will consider multiple items
including bandwidth, as with Cisco's proprietary protocol Enhanced
Interior Gateway Routing Protocol (EIGRP) or the industry-standard
Open Shortest Path First (OSPF). The things that are considered for
path determination by these routing protocols are known as metrics.
If there is a change in the metrics, then these paths will be
recalculated. Therefore, we call these dynamic routing protocols
since they have the capability to adapt with the changes in your
network.
Some routing protocols, called distance vector protocols,
periodically exchange routing protocol tables with other routers
running the same protocols. While other protocols, called link
state routing protocols, only send the path information when
something changes and don't have a periodic exchange of routes
(other than some "hellos" to ensure that their other neighbor
routers running the same routing protocols are still out
there).
So, as we said earlier, we pick these routing protocols based on
the criteria/metric (hops or bandwidth, for example) they use, and
then only the best path (i.e., the one with the lower hop count or
the better bandwidth) from the best routing protocol goes in the
routing table, which is used for forwarding these IP packets.
Cisco routers have a method of picking the preferred protocol
using administrative distance. As explained on Cisco's web
site,
"...administrative distance defines the reliability of a routing
protocol. Each routing protocol is prioritized in order of most to
least reliable (believable) with the help of an administrative
distance value."
Cisco assigns a number to the routing protocols on a scale of
0-255, where the protocol with the lower number is preferred. (And,
yes, you can change those numbers.) Once we pick the best routing
protocol, then we need to see all the different paths available
using that routing protocol. At that point, the consideration is
the best path among all possibilities using the lowest metric for
that protocol (as in our example of picking the best bus line from
all other buses).
This table of all the best routes is kept in the router's Random
Access Memory (RAM). RAM is a volatile part of the router, meaning
that, if you lose power, you lose the contents of RAM. So, if you
lost power, you'd lose this routing table, and you would have to
relearn the routes.
How did we get the contents in the routing table? Remember that,
depending on the type of routing protocol, we were either learning
the contents periodically (distance vector routing protocols) or
learning the contents when something changed in the network, such
as an interface coming up or going down (link state routing
protocols). This volatile table not only keeps the routing table
entries, but it also keeps other information such as the
configuration that is currently running on your router or switch
(called running-config).
This table also keeps various caches, such as ARP, cache a
device's operating system once it's decompressed, and many other
things.
Related Courses
Understanding Networking Fundamentals
ICND1 - Interconnecting Cisco Network Devices 1
ICND2 - Interconnecting Cisco Network Devices 2