Day 6 - Routing Concepts and Protocols
Routing Concepts
The purpose of routing
In a nutshell, the purpose of routing is to connect different networks together to allow them to communicate and pass data traffic.
Most often, routing protocols are how networks determine where to send network traffic (the routes they will take). They build maps (actually routing tables) that they use for directing network traffic. Routing is what makes this interconnected world function as well as it does. Networking would be pure chaos without it.
Basic Routing Concepts
Static routing
Uses administrator defined routes.
Each router must contain the route.
- A static route from A to B requires that B has a static route to A.
Easy to set up (in a small network).
- Not so easy to maintain.
Routes only change when the administrator changes them.
Dynamic routing
Routers use protocols in order to determine the best route between two networks.
Administrator determines which protocols will be in use.
The routers must all use the same protocols.
- An exception is when route redistribution has been implemented.
Routing protocols can be stacked within a router.
Is very fluid and dynamic in nature and is what makes today's interconnected world.
The default route
The direction that a router will send network traffic when there is no known route in the routing table.
It is assigned by an administrator.
It is usually a designated interface on the router or it is the designated next hop interface
The routing table
A list of known routes to all known networks from the router's perspective.
It is established by an administrator when static routing is used.
It is dynamically built by routing protocols when dynamic routing is employed.
Each routing protocol maintains a routing table.
- Different routing protocols may have different routes to the same network.
Loop back interface
An administratively configured logical number assigned to a router to ease administrative functions or routing processes.
Often, the loopback interface is assigned in an IPv4 address format.
Many routing protocols have been designed to take the loopback interface into account when performing administrative functions.
The interface may be completely logical, or a physical interface may be assigned to be the loopback interface.
Routing loops
A possible problem that can be created if interconnected router: have a breakdown in their routing algorithms.
When a routing loop occurs, the network keeps looping through the routers until some system or mechanism breaks the cycle.
They can create network congestion or even bring down a network.
Routing protocols use multiple methods to prevent loops from occurring.
- The time to live (TTL) field is also utilized to stop routing loops after they have occurred.
Routing Metrics
There may be more than one route available to a remote network. Routing protocols use metrics to determine which route is best to use.
Each routing protocol will use its own set of metrics in determining which routes to which networks are placed on its routing table.
The same basic metric may be used by different routing protocols When this occurs, the metric is usually implemented in a different manner through the use of different algorithms.
Hop count
The number of routers between two endpoints
- Determined from the sending router’s perspective.
Maximum transmission unit (MTU)
The maximum allowed size of a packet, measured in bytes.
- The standard MTU for Ethernet is 1500 bytes.
Packets that exceed the MTU must be fragmented into small pieces, leading to more packets, leading to slower connection.
Bandwidth
A measure of the speed of the network connection.
- The speed can be measured in Kbps, Mbps, or Gbps.
Latency
A measure of time that a packet takes to traverse a link.
- When implemented by routing protocols, the total amount of latency (or delay) to go end to end between two points is used.
Administrative distance (AD)
The believability of a routing protocol’s advertised routes.
- Different routing protocols are considered to be more believable (trustworthy) than others.
Routers use the AD to help determine which routing protocol to use when more than one protocol is installed on the router.
The lowest AD of an advertised route will determine the protocol used.
Route Aggregation
Without some mechanism put in place, routing tables soon become very large and highly inefficient.
Through careful planning. network administrators use a process called route aggregation to condense the size of routing tables. They do so through the use of Classless Inter-Domain Routing (CIDR) to summarize routes to different networks Route aggregation is common in networking
Example of route aggregation
Networks connected to interface S/0/1.
10.1.10/24.
10.1.17.0/24.
10.132 0/24.
10.1.128.0/24.
These routes could be summarized (aggregated) by a common CIDR entry in a routing table:
- 10.1.0.0/16
Warning on route aggregation
Route aggregation takes careful planning during the network design phase.
- The above example would not work if interface s/1/1 on the same router was connected to network 10.1.2.0 (this is an example of non-contiguous networks).
High Availability
Part of a network admin’s job is to ensure that networks remain up and active for the maximum amount of time
In an effort to ensure that networks don't go down, administrators often remove single points of failure.
A single point of failure in a network is the point where a single failure will cause the network to cease functioning. Network administrators often use high availability techniques in order to remove those single points of failure. An example of a high availability technique is the use of redundant links to outside networks.
Routing Protocols
Interior vs Exterior routing protocols
Interior Gateway Protocol (IGP)
A category of protocols used within autonomous networks.
- Used between networks that you can control.
The most popular IGP protocols are OSPF (Open Shortest Path First) and RIPv2 (Routing Information Protocol version 2).
Special mention IS-IS (intermediate System to Intermediate System), which is popular with extremely large autonomous networks like an ISP’s network.
Exterior Gateway Protocol (EGP)
A category of protocols used between non-autonomous networks.
- The type of routing protocol used between networks under separate control.
The most popular EGP protocol is Border Gateway Protocol (BGP).
It is not uncommon for organizations to have more than one network that they are routing traffic between.These are called autonomous networks.
Some IGP routing protocols use an administrator-defined autonomous system (AS) number as one means of identifying which networks can directly communicate with each other.
The AS is not a metric, but a means of identifying a network that might possibly accept another network's traffic. Remember, the AS is only significant within autonomous networks and have no significance outside of them.
More routing protocols
Classification of routing protocols
IGP and EGP routing protocols can be broken out into three other categories of protocols, which is designated by their main method of determining routes between networks.
Distance-vector routing protocols
- Routes are determined by how many routers exist between the source and the destination The efficiency of the links in the selected route is not taken into consideration.
Link state routing protocols
Metrics are used to determine the best possible route between destinations. The protocol then only monitors the state of directly connected links and only makes changes when changes to links occur.
Only changes in link status are broadcasted.
Hybrid routing protocols.
- Use aspects of both the distance vector and link state routing protocols.
Some Routing Protocols
Routing Information Protocol v2 (RIPv2).
An IGP (autonomous) distance-vector protocol.
- A hop count of 16 ts considered unreachable.
Uses various methods, including hop count to reduce the chances of a routing loop.
Uses multicast to advertise routing tables (224 0.0.9).
Open Shortest Path First (OSPF)
An IGP link state routing protocol.
Uses Dijkstra’s algorithm to determine the shortest path to a network.
After initial startup, it only advertises changes to its routing table, making convergence faster.
Uses different types of link state advertisements (LSAs) to announce different changes or operations.
- Uses multicast addresses 224.0.0.5 or 224.0.0.6, depending on the type of LSA.
intermediate System-to-Intermediate System (IS-IS)
An IGP link state routing protocol.
Similar to OSPF in operation
- It uses Dijkstra’s algorithm as weil, but also uses different metrics to determine the best path.
Highly scalable and offers fast convergence.
Often found used within networks under the control of an ISP.
Border Gateway Protocol
An EGP (non-autonomous) hybrid routing protocol
Considered as the routing protocol of the Internet.
It can be considered a path-vector protocol.
- One of the metrics used is the number of autonomous systems that must be crossed (not individual routers).
Highly scalable, but it has very slow convergence times when changes occur.
Enhanced Interior Gateway Routing Protocol (EIGRP) is an advanced distance-vector (hybrid) IGP routing protocol developed by Cisco.
In 2013, Cisco made EIGRP an open source routing protocol in an effort to increase its use in autonomous networks. It uses aspects of both the distance-vector protocols and link state protocols to build its routing table. EIGRP has very fast convergence times.
EIGRP uses a Neighbor Table (directly connected routers) and a Topology Table to build its routing table. The protocol only announces changes to the routing table (on multicast address 224.0.0.10) in order to reduce bandwidth consumption.
To keep expanding your knowledge base about networking and learning with me. Don't forget to subscribe to my newsletter to receive updates about my new learning everyday. Consider following me on LinkedIn. Want to know more about me!! follow me on Instagram!!
Subscribe to my newsletter
Read articles from Shreyas Ladhe directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Shreyas Ladhe
Shreyas Ladhe
I am Shreyas Ladhe a pre final year student, an avid cloud devops enthusiast pursuing my B Tech in Computer Science at Indian Institute of Information Technology Vadodara ICD. I love to learn how DevOps tools help automate complex and recurring tasks. I also love to share my knowledge and my project insights openly to promote the open source aspect of the DevOps community.