Table of Contents
Introduction
Routing protocols are the rules and procedures that routers use to discover networks, exchange reachability information, and choose paths for packets. They are the “conversation language” between routers that keeps large networks and the global internet functioning, without manual configuration of every route.
Routing protocols sit on top of basic routing concepts and mechanisms, such as routing tables, metrics, and administrative distance, which are addressed in separate chapters. In this chapter you will see what makes routing protocols special as a group, how they are classified, and what common behaviors they share, without going deeply into any one specific protocol. Each named protocol in the outline has its own chapter for detailed treatment.
The Role of Routing Protocols
Without routing protocols, routers would rely mostly on static routes. A static route is a manually configured entry that says, for example, “to reach network 10.1.0.0/16, send traffic to next hop 192.0.2.1.” This is simple in very small environments, but it becomes impossible to maintain in larger or frequently changing networks.
Routing protocols solve this scale and flexibility problem. Routers use them to:
- Discover remote networks automatically.
- Advertise their own directly connected networks to neighbors.
- Learn about multiple possible paths to a destination.
- Compare paths and select the best one according to protocol rules.
- React to network changes, such as link failures or new links, by updating routes.
- Reach a state where all routers agree on the best paths. This state is called convergence and has its own chapter.
Routing protocols operate between routers, not between end hosts and routers. End devices like laptops and phones use default gateways and do not run routing protocols themselves in typical enterprise or home networks.
Interior vs Exterior Routing Protocols
Routing protocols are grouped into two broad categories based on where they are used: interior and exterior. This division follows the concept of autonomous systems, which are large networks under a single administrative control, such as an ISP or a large enterprise.
An interior gateway protocol (IGP) runs inside a single autonomous system. Its job is to move packets within that organization, between all the subnets and internal routers. A single company might use one or more IGPs inside its various regions, but all stay under the same administrative policy.
An exterior gateway protocol (EGP) runs between autonomous systems. Its job is to move traffic between different organizations across the internet. Routers on the border of each AS use an exterior protocol to exchange reachability information with neighboring organizations.
Most of the common protocols you will see inside enterprises are IGPs. Examples include RIP, OSPF, and EIGRP. The dominant exterior protocol is BGP, which is covered in a separate chapter because of its importance on the internet.
The separation between IGPs and EGPs helps keep policies clear. Inside a single organization, you might want fast convergence, detailed internal topology knowledge, and automatic redistribution of routes. Between organizations, you care more about policy control, route filtering, and scalability across very large networks.
Distance Vector, Link State, and Hybrid Families
Routing protocols are also categorized by how they see the network and how they decide on paths. The three major design approaches are distance vector, link state, and hybrid (sometimes called advanced distance vector). Each approach defines how routers describe the network to each other.
In a distance vector protocol, a router thinks in terms of “distance” to a destination and the “direction,” which is its next hop. The router does not have a full map of the network topology. Instead, it periodically tells neighbors, “To reach network X, my distance is d.” Neighbors add their own distance to that and pass information along. Classic RIP is the textbook example of this style.
In a link state protocol, a router tries to build a full map of the network. Each router describes its directly connected links and the cost of those links. These descriptions are flooded to all routers in the same routing domain, so each router can independently compute the best paths using an algorithm such as Dijkstra’s shortest path first. OSPF is the best known link state IGP.
Hybrid protocols combine ideas from both families. EIGRP, for instance, uses distance metrics and neighbor relationships like a distance vector protocol, but it builds and maintains more detailed information about routes and backup paths and uses efficient mechanisms to converge quickly.
Different approaches come with different tradeoffs in terms of complexity, overhead, speed of convergence, and suitability for very large networks. Network designers choose protocols based on these characteristics, as well as vendor support and operational experience.
Metrics and Path Selection
Each routing protocol uses its own metric to compare possible paths. A metric is a numeric value that reflects how desirable a path is. The lower the metric, the more preferred the path, although details can vary from protocol to protocol.
Some protocols use very simple metrics. For example, a classic distance vector protocol might count the number of routers (hops) between the source and the destination. In that case, a path with three hops would be preferred over a path with five hops.
More advanced protocols may combine several factors into a single metric or keep multiple metric components. They can consider bandwidth, delay, reliability, load, or other characteristics of links. These metrics are combined by the protocol’s own formula. Each protocol defines its own metric rules and how they are calculated.
Routing protocols do not compare their metrics directly with each other. Metrics are used inside each protocol to pick the best path that protocol has learned. When the router has multiple routing protocols offering routes to the same destination, a different concept called administrative distance is used to decide which protocol’s route to install in the routing table. Administrative distance is covered separately, but it is important to understand that metrics only matter within a single protocol, not between different ones.
A routing protocol’s metric is used only to compare paths learned by that same protocol. It is not valid to directly compare metrics from different protocols.
Convergence and Stability
As routers exchange routing information, the network gradually reaches a consistent view of where everything is. This final consistent state is called convergence. All routers have a routing table that agrees on the best path for each destination, within the limits of the protocol and configuration.
Convergence has two important aspects. The first is how long it takes to converge after a change such as a link failure. Faster convergence means less downtime and fewer dropped packets. The second is how stable the network is while it converges. If routes constantly change or go through loops during convergence, applications might suffer.
Different routing protocols reach convergence in different ways. Some rely on periodic updates at fixed intervals. Others send updates only when there is a change. Some maintain backup paths so that they can fail over quickly, while others must reconverge from scratch.
Stability is also influenced by mechanisms that prevent routing loops and control how far incorrect updates can spread. Distance vector protocols use rules like split horizon and hold down timers. Link state protocols rely on consistent databases and sequence numbers for their topology information. The detailed mechanisms are described in the specific protocol chapters, but the shared goal is always a stable, loop free forwarding environment.
Scalability and Hierarchy
As networks grow, routing protocols must handle more routes, more routers, and more frequent changes without becoming overwhelmed. This property is called scalability. Protocol design includes features that allow scaling in both size and complexity.
One key approach to scalability is hierarchy. In a hierarchical routing design, routers are grouped into areas or regions. Inside an area, routers have detailed knowledge of local topology. Between areas, only summarized information is exchanged whenever possible.
A hierarchical design reduces the amount of information each router must store and process. It also localizes the impact of changes. A link failure in one area does not require a complete re calculation of routes in distant parts of the network.
Another scalability tool is route summarization. Instead of advertising many small networks, a router advertises a single larger network that covers them all. This reduces the size of routing tables and the volume of updates. Summarization must be applied carefully at the correct boundaries in the network design. The process of summarizing routes has its own chapter, but routing protocols provide the mechanisms that make summarization possible.
Protocols differ in how well they support hierarchy and summarization. For example, some protocols have explicit area concepts built into them, while others are flat and do not. Network architects choose protocols and design topologies that align with these capabilities.
Policy and Control of Routing Information
Routing protocols do not only discover and spread routes. They also provide mechanisms to control which routes are accepted, which are advertised, and how they are modified. This is essential for both security and traffic engineering.
Routers can use filters that match destination networks, prefixes, or other characteristics of routes. With these filters, an administrator can block unwanted routes, prevent accidental leaks of internal networks, or restrict which paths are considered valid.
In addition to filtering, routing protocols often allow tagging and manipulation of route attributes. For example, a route can carry a tag that identifies which part of the network it came from, or which policy it should follow. These tags can then be used in decisions about acceptance, redistribution, and preference.
Exterior routing protocols such as BGP have especially rich policy tools, since they must reflect business relationships and agreements between organizations. Interior protocols also support basic policies, particularly in larger enterprise designs that need to control how traffic flows between regions.
The use of policies means that routing is not always about the absolute shortest path. Sometimes an organization prefers a slightly longer path that follows a cheaper link, a more secure network, or a preferred partner.
Routing Information Exchange and Timers
Routing protocols define exactly how and when routers talk to each other. This communication includes several types of messages: initial discovery, neighbor maintenance, and route updates.
When two routers are directly connected, they often first establish a neighbor relationship. This can involve exchanging simple hello messages on a regular interval. If a router stops receiving hello messages from a neighbor for a certain period, it may declare the neighbor down and remove its routes.
Route information itself can be sent in different ways. Some protocols send full routing tables at intervals. Others send only changes as they occur. Some can request specific information when needed. The protocol defines the message formats, fields, and rules that govern these exchanges.
Timers are a fundamental part of routing protocols. They control how often updates are sent, how long information is considered valid, and how long to wait before declaring a neighbor unreachable. Incorrect timer values can lead to slow detection of failures or to unnecessary flapping of routes. Default timers are usually chosen to balance responsiveness and stability, but advanced designs may tune them.
The details of messages and timers for each protocol, such as RIP’s update intervals, OSPF hello and dead timers, or BGP keepalive and hold timers, are explained in their respective chapters. At a high level, all routing protocols use timers to maintain fresh and accurate routing information without creating excessive traffic.
Interoperability and Multi Protocol Environments
In real networks, it is common to see multiple routing protocols coexisting. For instance, one part of a network may run a link state protocol, while an older part still uses a distance vector protocol. Or an organization may use an interior protocol internally and BGP toward external peers.
When more than one routing protocol is present on a router, interoperability becomes important. The router may need to move routes from one protocol’s domain into another. This process is called route redistribution. During redistribution, metrics and attributes must be translated into a form the receiving protocol understands.
Route redistribution introduces complexity and must be controlled carefully. Incorrect or uncontrolled redistribution can create routing loops or inject unstable information into a protocol domain. Good network designs limit redistribution points and clearly define what is allowed in each direction.
When the same destination network is learned from multiple routing protocols, the router chooses which route to install based on administrative distance. The lower administrative distance is preferred. This ensures that the router uses a consistent rule to choose between protocols, independent of each protocol’s internal metrics.
Summary
Routing protocols provide the dynamic intelligence that allows routers to discover, share, and maintain paths across complex networks. They differ in how they view the network, what metrics they use, and where they are intended to operate, but they all serve the same fundamental goal. They find and maintain usable paths between sources and destinations in a way that can scale, converge, and be controlled.
The rest of the chapters in this section examine major routing protocol families in more detail. Distance vector routing and link state routing describe the core ideas behind two main protocol types. RIP, OSPF, EIGRP, and BGP each apply those ideas in different ways. Path selection and convergence explain how protocols decide among multiple routes and how they stabilize after changes. Together, these topics complete the picture of how dynamic routing keeps networks connected.