On Routing – An Overview    

Recently a friend said to me “A network is not built on static routes”. I almost retorted, “Thomas, are you joking? Tons of networks are built with static routes.” I kept my mouth shut and filed the tidbit away for later consideration. This paper is a result of that consideration. Oh and Thomas was right as you will see.

There are three types of routes used in networking: connected, static and dynamic. Each will populate the routing table. The routing table is just what the name describes. It is a table that looks like a spreadsheet which tells a networked device where to direct the data packet. The networked device looks at the data packet’s header and at the routing table and sends the packet on its way based on the listed destination address. Every device on a network has a little bit of ‘router’ inside and so from now on we will stick to the term router.

There are fancy configuration options where both the destination and source address are taken into consideration in routing. In this paper we will stick to only destination-based routing.

Static Routing Overview
The single most common type of routing is the static route. Every computer on a network that can reach the Internet, whether Windows, Mac or UNIX based, has a static route. Every home router, business router and government router that connects those computers to the Internet has one. The static route on my computer looks something like the line below:
	Network Destination      Netmask        Gateway       Interface 	Metric
The example above shows only the ‘default route’, also known as the ‘gateway of last result’. This configured route directs data packets towards the destination router as a more specific route doesn’t exist. The assigned to the IP address and Netmask represent ‘ALL’. Sometimes there are multiple routers leading to different destination networks. The administrator will often place these routers side by each at the network edge. The default router then gets a static route added which redirects traffic out the specified gateway. The routing table changes with the addition of the static route. Here’s the change:
	Network Destination     Netmask         Gateway       	Interface 	Metric    20	22

As the network grows and changes, managing static routes becomes cumbersome. The network administrator needs to ensure there is a stated route for each path from end to end. The list will grow longer and become difficult to manually manage. Errors will begin to crop up and will be difficult to find.

Imagine what happens when ten or more networks need to be connected. There is an alternative. We can allow the network to ‘know’ the locations and paths by itself. This is dynamic routing.

Dynamic Routing Overview
A router configured for dynamic routing relies on three principles when encountering a packet: what do I know, what have I learned, and where did I learn it from. Additionally a router needs to know what to say to other routers; this speaking out is called route advertisement. With these basic principles in mind we can see how a router builds its route table.
Example 1
A network has four routers. Three are connected to the forth, Router-1. Router-0 leads to the Internet. Router-2 and Router-3 lead off to different departments

Router-0 has the following configuration
  • R0-Int0 IP address [something on the internet]
  • R0-Int1
  • Default Route [points to IP address provided by ISP]

Router-1 is the core router with three interfaces has the following configuration:
  • R1-Int01 - IP address
  • R1-Int02 – IP address
  • R1-Int03 – IP address
  • Default Route -

Router-2 has the following configuration:
  • R2-Int0 – IP address
  • R2-Int1 – IP address
  • Default Route -

Router-3 has the following configuration:
  • R3-Int0 – IP address
  • R3-Int1 – IP address
  • Default Route -

The table below presents the principles of routing for each router.
Router IDWhat do I knowWhat did I learnWhere did I learn itWhat do I tell
@ Router-0
@ Router-2 Router-3
@ Router-3
@ Router-1
@ Router-1

By combining the “What do I know” and the “What did I learn” columns we can build the routing table for each router.

This leaves the “Where did I learn it” and “What do I tell” columns. These columns are important because typically a router never tells another router about the routes it learned from that router. In our example Router-1 will NOT tell Router-2 that is available via Router-1. Yes you got it, routers don’t gossip.

A Split-Horizon is the act of not telling my neighbour router what I already know. This prevents loops and false routes. These are bad, and could bring a network to its knees. With Split-Horizon turned on, a router doesn’t send the route advertisement, the ‘What do I Tell’ information, back to the interface it was learned on.

Dynamic Routing Types
There are two main types of dynamic routing protocols: distance vector and link state.

The distance vector family of protocols is the simplest to configure and use. With this type of protocol the sending or advertising router transmits what it knows to the next router. The receiving router accepts the advertisement and adds the learned routes to its routing table. It uses the sender’s IP address as the next hop to reach these new networks. Our receiving router then becomes the sending router; it passes routing information on to the next router. When the learned routes are passed on, the sending router increases the hop count by one. Once all routes are entered into the routing table on all routers, the network is said to be fully converged.

The problem with distance vector routing is that only the number of hops count. When there are two links between routers, the routers will learn both routes. If the hop counts match then all packets are sent over each link in a round-robin manner regardless of link speed. If the link speeds are different then the packets are equally distributed over a 10 Mbps link and a 100 Mbps link as long as both links are up. To use the 100 Mbps link add an additional router to the 10 Mbps side thus adding to the hop count and forcing the routes on the faster links to be preferred.

The link state family of routing protocols considers the number of hops and the bandwidth and latency along the path. With link state the problem mentioned concerning distance vector dynamic routing goes away because the router learns about the difference in the speed of the links. By moving to link state the network administrator can improve the resiliency of the network and can realize a cost savings.

Back to our dual link example where there are two links between routes. In link state routing the network traffic will prefer the 100 Mbps. If that link goes down the 10 Mbps link will be used. It’s slower, and users will notice. But they won’t lose connectivity. The recurring monthly cost for having the second, slower link is lower. And when needed, the bandwidth is there.

Influencing Route Path Selection With distance vector dynamic routing the number of hops adds to the cost. With link state dynamic routing the hops and the bandwidth are used to calculate the cost. In routing, this ‘cost’ or ‘metric’ determines the preference for one routing path over another to a given destination.

Each routing protocol also has an administrative distance which is used to select which routing protocol is to be trusted over another. The table below shows the default administrative distance on Cisco routers.

Default Administrative Distances
Connected	0
Static		1
eBGP		20
EIGRP (internal) 90
IGRP		100
OSPF		110
IS-IS		115
RIP		120
EIGRP (external) 170
iBGP		200
EIGRP summary	5

Selecting the Best Path
Routers look at three characteristics when it comes to deciding which route to place in the routing table. These are administrative distance, metric and subnet mask. The example below shows how this works.

Example 2
Let’s look at the routers from example 1 again. A fifth router, Router-4, is added with the following configuration:
Router-4 has the following configuration:
  • R4-Int0 – IP address
  • R4-Int1 – IP address
  • Default Route -
  • Learned Routes - via

A simplified routing table for Router-1 using Routing Information Protocol (RIP), a distance vector protocol, as the routing protocol, would result in the output below where C = Connected, L = Learned and S = Static
Type	Network Dest.	Netmask         Gateway		Interface 	AD/Metric
C	0/1
C	0/1
C	0/1
L	120/2
L	120/2
L	120/2
L	120/3
S	1/2

In our sample route table above we see the route for, spelled out as, will take a back seat to the three connected routes because:
A) The administrative distance is higher – 120 for learned vs. 0 for connected,
B) The metric is greater- 3 for learned vs. 1 for connected,
C) The connected routes have a smaller subnet mask – for connected a /24 vs. the /8 for learned.
See the article Four Golden Rules for IP Address Deployment for more information on IP subneting.

At this time the local routing functions as it did before the introduction of Router-4.

Hold on a moment though. Everyone knows you can’t have the same network ranges in two places*. The three connected networks on Router-1 fall inside of the network described by If you said this, you would be right – almost. One last piece on routing that you should be aware of is route summarization. Route summarization is where you take a number of routes and collapse them into a single route statement.

The ten dot (10.) routes on the other side of Router-4 could be 100+networks. Without route summarization, Router-1 would have 100+more lines in its routing table. Each line in the routing table adds costs in memory, processing and bandwidth. The cost to bandwidth is due to the fact that some routing protocols, especially distance vector, transmit the entire routing table every N seconds. By using route summarization we reduce the routing table size thus saving memory, processor and bandwidth.

Let’s go back to Thomas’s statement that “a network is not built on static routes”. When you require a robust, easily managed network, static routes will break easily. By choosing the correct dynamic routing protocol for your network you can have redundant paths between destinations improving the resiliency of the network promoting uptime and therefore productivity.

* This used to be the rule of thumb. Current technologies have been developed in support of Cloud Computing and Virtualization which allow hosts to float between multiple data centres without the need to change the IP address of the host. This is a paper on basic routing technologies and so these newer techniques are out of scope.

Orginally published Feb, 2013
Fragment - Current Release


IT Roles and Responsibilities
On Passwords
Spending Enough
Planning to Fail
Living With the Enemy
A Reason for Policy
Mission Critical Messaging – Do you have a policy
Globalizing the SMB
High Availability: People and Processes
Case for Project Management
Risk Management

On Routing
VLAN Tutorial
IPs 4 Golden Rules
WAN Technology primer
DHCP Primer
Your Head in the Cloud(s)
DNS: Terms and Process
VPN Surfing Challenge
Network Slowdown
Importance of Time
High Availability: Technologies

Spammers Go Full Circle
Beyond the Lock
The Guardian at the Gate
A Web of Trust
Data Breach Notification

Electricity Primer
Data Control
Open Source in the Enterprise
Closing the Loop
Helping IT to help you
Your ICT Keystone

eSubnet Services

Contact us regarding your network,
security and Internet services needs

All content © eSubnet 2003-2021