Internet Protocol (IP) routing protocols have one primary goal: to fill the IP routing table with the current best routes it can find. The goal is simple, but the process and options can be complicated. Routing protocols define various ways that routers chat among themselves to determine the best routes to each destination.
As networks grew more complex over time, routers gained both processing power and Random Access Memory (RAM). As a result, engineers designed newer routing protocols, taking advantage of faster links and faster routers, transforming routing protocols.
Routing protocols help routers learn routes by having each router advertise the routes it knows. Each router begins by knowing only directly connected routes. Then, each router sends messages, defined by the routing protocol, that list the routes. When a router hears a routing update message from another router, the router hearing the update learns about the subnets and adds routes to its routing table. If all the routers participate, all the routers can learn about all subnets in an internetwork.
When learning routes, routing protocols must also prevent loops from occurring. A loop occurs when a packet keeps coming back to the same router due to errors in the routes in the collective routers’ routing tables. These loops can occur with routing protocols, unless the routing protocol makes an effort to avoid the loops.
As you pursue your CCNA studies you will find that different authors mix and match the terms routing protocols, routed protocols, and routable protocols. The concepts behind these terms are not difficult but because the terms are so similar, they can be a bit confusing. In all of my posts, as well all Cisco documentation, these terms are generally defined as follows:
- Routing Protocol – A routing protocol is defined as a set of messages, rules, and algorithms used by routers for the overall purpose of learning routes. This process includes the exchange and analysis of routing information. Each router chooses the best route to each subnet in a process known as path selection and finally places those best routes in its IP routing table. Examples of a routing protocol include RIP, EIGRP, OSPF, and BGP.
- Routed Protocol and Routable Protocol – Both of these terms refer to a protocol that defines a packet structure and logical addressing, allowing routers to forward or route the packets. Routers forward or route packets defined by routed and routable protocols. Examples include IP and IPX. IPX is a part of the Novell NetWare protocol model.
Even though routing protocols such as RIP are different from routed protocols such as IP, they do work together very closely. The routing process forwards IP packets, but if a router does not have any routes in its IP routing table that match a packet’s destination address, the router discards the packet. Routers need routing protocols so that the routers can learn all the possible routes and add them to the routing table so that the routing process can forward routable protocols such as IP.
A routing protocol’s underlying algorithm determines how the routing protocol does its job. The term routing protocol algorithm simply refers to the logic and processes used by different routing protocols to solve the problem of learning all routes, choosing the best route to each subnet, and converging in reaction to changes in the internetwork. There are three main branches or families of routing protocol algorithms; Distance Vector, Link-State, and Balanced Hybrid.
Historically speaking, distance vector protocols were invented first, primarily in the early 1980s. A distance-vector routing protocol requires that a router informs its neighbors of topology changes periodically and, in some cases, when a change is detected in the topology of a network. Compared to link-state protocols, which require a router to inform all the nodes in a network of topology changes, distance-vector routing protocols require less router overhead and bandwidth utilization.
Distance vector means that routers are advertised as vector of distance and direction. Direction is simply next hop address and exit interface and distance means such as hop count.
Router using distance vector protocol does not have enough knowledge of entire path from source to destination. Instead of DV uses two options.
- Direction in which or interface to which packet should be forwarded.
- Distance from its destination.
As the name suggests the DV protocol is based on calculating the direction and distance to any link in a network. The cost of reaching a destination is calculated using various route metrics. RIP (Routing Information Protocol) uses the hop count of the destination as its metric for optimal route calculation. Updates are performed periodically in a distance-vector protocol where all or part of a router’s routing table is sent to all its neighbors that are configured to use the same distance-vector routing protocol.
By the early 1990s, distance vectors protocol’s somewhat slow convergence and potential for routing loops drove the development of new alternative routing protocols that used new algorithms. Link-State protocols, in particular OSPF and Integrated IS-IS, solved the main issues with distance vector protocols. However, these new link-state protocols required more planning in medium-to larger-sized networks.
First, each node needs to determine what ports it is connected to, over fully-working links. It does this using a simple reachability protocol that it runs separately with each of its directly-connected neighbors. Next, each node periodically, and in case of connectivity changes, makes up a short message called the Link State Advertisement (LSA), which flooded throughout the network.
The basic concept of link-state routing is that every node constructs a map of the connectivity to the network, in the form of a topology table showing which nodes are connected to which other nodes. Each node then independently calculates the next best logical hop from it to every possible destination in the network. The collection of best next hops will then form the node’s routing table.
Link-state routing protocols use path cost to the destination as its metric for optimal route calculation and do not rely on periodic route updates in order to maintain its topology table. Routing information is exchanged only upon the establishment of new neighbor adjacencies and construction of the adjacency table, after which only changes are sent through event generated Link State Update (LSU).
Around the same time as the introduction of OSPF, Cisco created a proprietary routing protocol called Enhanced Interior Gateway Routing Protocol (EIGRP) which used some features of the earlier IGRP protocol. EIGRP solved the same problems as did link-state routing protocols, but less planning is required when implementing the network. As time went on, EIGRP was classified as a unique type of routing protocol. It was considered to be neither distance vector nor link state, so EIGRP is called either a balanced hybrid protocol or an advanced distance vector protocol.
EIGRP was designed to minimize both the routing instability incurred after topology changes, as well as the use of bandwidth and processing power in the router. Most of the routing optimizations are based on the Diffusing Update Algorithm (DUAL) that guarantees loop-free operation and provides a mechanism for fast convergence.
The data EIGRP collects is stored in three tables:
- Neighbor Table – Stores data about the neighboring routers, i.e. those directly accessible through directly connected interfaces.
- Topology Table – Contains the aggregation of the routing tables gathered from all directly connected neighbors.
- Routing Table – Stores the actual routes to all destinations.
EIGRP does not rely on periodic route updates in order to maintain its topology table. EIGRP uses the bandwidth and delay to the destination as its metrics for optimal route calculation and does not rely on periodic route updates in order to maintain its topology table. Routing information is exchanged only upon the establishment of new neighbor adjacencies, after which only changes are sent through triggered updates.
In my next post, I will discuss the three most commonly implemented routing protocols, RIP, OSPF, and EIGRP, in detail.
Author: David Stahl