Types of Routing Protocols | Routing Protocols in Networking

When you send a message online, it travels through different networks and devices along the way. Network devices must follow certain rules, called routing protocols, to decide which path the message should take. These protocols help routers communicate with each other, share information about network conditions, and choose the best route for data to reach its destination. In this article, learn what routing protocols are, the types that exist, and how they work with your data.

What are routing protocols? 

Routing protocols are communication processes that guide routers in making decisions about the route to take when forwarding data to its destination. These protocols are generally used to identify or announce network paths. 

In networking, routing is how data packets travel from one network node to another (origin to destination). It occurs at layer 3 of the OSI model. This process is essential for ensuring data finds its way across the Internet

These protocols are like a map that tells the data where to go and the "road" to take through different networks. Routers are devices that perform the traffic directing functions on the Internet. They determine the specific choice of path based on routing algorithms. 

Network routers gather information regarding different routes and store it in a routing table, which is constantly updated to reflect changes in the network. Basically, each router knows about the network it's directly connected to, but it doesn't know the whole network. 

To solve this, routing protocols let routers share information with nearby routers, and eventually, all routers in the network learn about network topology.

Routing protocols also ensure the Internet stays up and running, even if there are problems, like broken connections or damaged network parts. They can quickly find new routes for the data to travel so that traffic flows smoothly. 

This ability to adapt is what makes the Internet available most of the time. Many of these protocols are defined in RFCs. 

Functions of routing protocols 

Routing protocols facilitate the exchange of routing information between routing devices. Among the functions of routing protocols are the following:

  • Discovery of remote networks. Routing protocols allow routers to find faraway or "remote networks." They do this by allowing routers to share information with each other about where different networks are located, so the router knows how to reach them.
  • Best path calculation to remote networks. After discovering remote networks, routers calculate the best route to reach them. Routing protocols determine the most optimal path for the data to travel.
  • Updating the routing table. A router keeps a "routing table" that acts like a map of all the routes it knows about. When routing protocols gather new information, they update this table to make sure the router has the latest routes available for sending data.
  • Recalculating a new best path in case of failure of the current path. If something goes wrong with the current route (for example, if a router stops working), routing protocols help the router find a new best route to send the data. 

A routing protocol gives the Internet its fault tolerance and high availability of traffic. 

A chart showing the types of routing protocols

Types of routing protocols

There are various routing protocol types in a modern network environment. All routing protocols are classified into distinct classes based on their operation: distance-vector routing protocols, link-state routing protocols, and path-vector routing protocols.

Distance-vector routing protocols 

Distance-vector routing protocols are used to find the best path for data to travel through a network. These protocols figure out the best route based on the "distance" to the destination - it is measured by how many "hops" (number of routers) the data has to go through to reach its destination.

For example, if a data packet needs to pass through 3 routers to reach its destination, the distance is 3 hops. The more hops it takes, the longer the route.

Typically, distance-vector protocols send their routing information to neighboring devices to keep everything updated. One advantage of these protocols is that they are easy to set up. Network administrators find them inexpensive because they don’t require much management. 

The only problem is that these protocols can take up a lot of bandwidth to send routing tables constantly to other devices. In addition, they sometimes cause problems like routing loops.

Common examples of distance vector routing protocols are routing information protocol and interior gateway protocol.

Routing Information Protocol (RIP)

Routing Information Protocol is one of the oldest routing protocols. Routers utilize it to decide the best way to send data across both local area networks and wide area networks.

RIP works in the application layer of the OSI model, which is a part of how computer networks are structured. 

There are different versions of RIP, like RIPv1 and RIPv2. RIPv1 decides the best path by looking at the destination IP address and counting the number of hops (routers the data passes through) to reach the destination.

In RIPv1, routers share their routing tables by broadcasting them to all routers on the network. This means all routers get the same information. RIPv2 is a more advanced version. Instead of broadcasting, it sends its routing table to a specific address called a multicast address.

RIPv2 also has some security features, like using authentication to ensure data is safe. One downside of RIP is that it can only handle at most 15 hops. For this reason, the protocol isn’t a preferred choice for large networks where data may need to pass through many routers.

Interior Gateway Protocol (IGRP)

Interior Gateway Protocol is a routing protocol created by Cisco. It is similar to RIP but designed to work better in larger networks. One of the main improvements over RIP is that IGRP removed the 15-hop limit.

IGRP looks at different factors, such as bandwidth, delay, reliability, and load, to find out the best routes. However, by default, it only uses bandwidth and delay to make its decisions.

IGRP supports up to 255 hops. It works well for large networks because it sends updates every 90 seconds to keep the network information up to date. 

Another benefit of IGRP is that it can avoid routing loops. This happens because IGRP automatically updates its routes when something changes in the network. 

Link-state routing protocols take a different approach from distance-vector protocols when finding the best path for data. Rather than sending out full routing tables, these protocols share information about the status of the paths with nearby routers. 

Routers consider factors like path speed and the cost of using resources such as bandwidth to calculate the best route. 

Link-state protocols use a special algorithm to find the best path. One big difference from distance-vector protocols is that link-state routers don’t constantly send their entire routing tables. They notify each other only when there is a change in the network or route.

Routers using link-state protocols create three types of tables:

  • Neighbor table keeps track of other routers directly connected using the same protocol.
  • Topology table shows the entire network’s layout, including all the routers and connections.
  • Routing table stores the most efficient paths for sending data to different destinations.

Some good examples include Open Shortest Path First and Intermediate System-to-Intermediate System.

Open Shortest Path First (OSPF)

Open Shortest Path First protocol enables IPs to send packets to the intended destination using the fastest route. It uses the Shortest Path First (SPF) algorithm to locate the shortest or quickest path possible for data transmission. 

OSPF keeps multiple databases with information about the network. It uses topology tables that describe how the network is connected. These details are usually gathered from link-state advertisements (LSAs) sent by individual routers. The LSAs contain information about the paths, such as how far away they are.

The protocol, as well, constantly updates the routing tables. OSPF informs routers if any changes occur in the network so they can adjust the routes accordingly. It uses the Dijkstra algorithm to recalculate the best routes.

Intermediate System-to-Intermediate System (IS-IS)

An Intermediate System-to-Intermediate System is used on the Internet to send IP routing information. It’s a link-state protocol, meaning that routers share information about the network to make better decisions about where to send data.

IS-IS uses a version of the Dijkstra algorithm to track the best path for data. An IS-IS network includes different components: end systems, intermediate systems, groups called areas, and domains

Routers in IS-IS networks can be categorized into two types. Layer 1 routers only handle data within one area, while layer 2 routers connect different areas together. The two types of addresses used in IS-IS are Network Service Access Point (NSAP) and Network Entity Title (NET). 

Path-vector routing protocols 

A path vector protocol is a routing protocol that dynamically updates information about paths to different destinations. Unlike other protocols that focus on whether a destination is reachable, path vector protocols are more concerned with ensuring that the path taken is loop-free. 

They check that the data doesn't get stuck in a cycle, going around the same set of routers repeatedly. Each route in the network keeps track of the entire path data must follow to reach its destination.

In each autonomous system, there is one special router called a speaker node. This node acts as the representative of the entire system. It creates a routing table and shares this information with neighboring systems.

The speaker node advertises the path information to other autonomous systems. It tells them the paths available and what the best routes are. 

Border Gateway Protocol (BGP)

BGP makes the Internet work. It’s a path-vector routing protocol currently used on the Internet to select the best path to reach third parties’ networks. 

The protocol was created to replace the older External Gateway Protocol. BGP is responsible for routing data between different Autonomous Systems (ASes) - large, separate networks that make up the Internet.

By default, BGP selects the route with the shortest path, thanks to the BGP’s Best Path Selection Algorithm. Even though BGP is highly customizable, and network administrators can adjust the routing decisions according to specific needs. 

How routing protocols work

Routing protocols rely on algorithms to compute the best route for data. For example, the OSPF protocol uses Dijkstra’s algorithm to find and recalculate the shortest path based on link costs.

The distance vector algorithm, used in protocols like RIP, calculates routes based on the distance (usually hop count) to destination networks.

These algorithms use data structures such as routing tables and link-state databases to store information about the network topology. Routing tables are updated periodically or in response to network topology changes.

When a router receives routing updates, it evaluates the available routes using predefined metrics. In distance vector protocols, routers compare the hop count, while in link-state protocols, the router calculates the shortest path using Dijkstra’s algorithm. Finally, a router updates its routing table to reflect the most efficient path.

Metrics used in routing protocols

Routing protocols use different metrics to decide which path is the best for sending data. Metrics measure other factors that help the protocol determine the most efficient route. 

One of the most basic metrics is hop count. This metric counts how many routers a data packet has to go through to reach its destination. The fewer the hops, the shorter and faster the path. So, RIP tries to pick the route with the least hops.

Other standard metrics include:

  • Bandwidth. Protocols choose the path with the highest bandwidth to carry the most data at once.
  • Delay. They pick the path that takes the least time for data to travel, focusing on speed.
  • Reliability. Protocols assess the likelihood that a network link will fail. A reliable path has fewer errors and past failures.
  • Cost. Cost is a value set by network administrators to weigh the route, considering different factors like bandwidth or delay.
  • Load. This factor looks at how busy a link is and picks paths with lower traffic to avoid congestion.

Why are routing protocols important in computer networks?

Routing protocols are essential for guiding data across small or large networks. They enable routers to share information and update their routing tables to ease the data forwarding process. 

Routers can find paths to distant networks either manually (static routing) or automatically (dynamic routing). In large networks, managing static routes can be difficult with changes like network link failures or adding new subnets. 

Dynamic routing protocols reduce this challenge by automatically adjusting to changes in the network. While dynamic routing is easier to manage, it uses more router resources like CPU time and bandwidth. 

Both routing methods have their places. In simpler networks, a combination of both can be effective because they offer a balance between ease of use and control.

Real-world applications of routing protocols

Routing protocols are essential in real-world networks like those used by ISPs and businesses. ISPs use these protocols to manage large networks. However, they face challenges like managing complex setups.

In enterprise networks, routing protocols help direct data between different departments. These rules are a way to improve communication. The benefits include better network management and scalability, but challenges like configuration complexity remain. 

Frequently asked questions

What is the purpose of routing protocols? 

These protocols specify how routers communicate with each other to distribute information that enables them to select paths between nodes on a computer network.

What is the difference between static and dynamic routing protocols? 

In static routing protocols, routes are manually configured by the network administrator. Dynamic routing protocols, on the other hand, automatically adjust routes based on the network's current state. They use algorithms to discover new paths. 

Author

Written and Edited by Lizzy Schinkel & WhatIsMyIP.com® Editorial Contributors

Lizzy is a tech writer for WhatIsMyIP.com®, where she simplifies complex tech topics for readers of all levels. A Grove City College graduate with a bachelor’s degree in English, she’s been crafting clear and engaging content since 2020. When she’s not writing about IP addresses and online privacy, you’ll likely find her with a good book or exploring the latest tech trends.

Reviewer

Technically Reviewed by Brian Gilbert

Brian Gilbert is a tech enthusiast, network administrator, and lifelong problem solver with a knack for making complicated topics simple. As the overseer of WhatIsMyIP.com®, he combines 25+ years of experience with a passion for helping others navigate the digital world.