Photo by Compare Fibre on Unsplash

Internet Routing Protocols

Aditya J.
9 min readJun 1, 2021

--

The internet is an enormous network of innumerable devices all connected which are constantly sending and receiving data everywhere, the data ranging from a simple request to another device to multimedia documents and more, but there is a certain limit of the amount of data that can be sent at once which depend upon the physical limitations of the network. This limitation introduces the need to split the data into sizable chunks or ‘packets’. This is where the Internet Protocol (IP) comes into the picture, these are a set of rules which guide the routing and addressing of packets of data making sure that the data packets are delivered to the proper destination in the most optimum way.

This brings ahead the concept of IP and router.

Internet Protocol: This is a way to uniquely identify each device connected to the internet, the ‘IP address, this makes it possible to specify the destination of the message, it is a connectionless service, and works with TCP i.e the Transmission control protocol, as TCP/IP or UDP i.e. User Datagram Protocol.

Router: A router is a device that connects two or more packet-switched networks or subnetworks. It serves two primary functions: managing traffic between these networks by forwarding data packets to their intended IP addresses and allowing multiple devices to use the same Internet connection.

The IP packets contain headers(20 or 24 bytes long) and data which can vary in size. The header contains the IP address of the source and the destination, and other requisite information, while the data is part of the content being sent.

Wikipedia defines a routing protocol as:

A routing protocol specifies how routers communicate with each other to distribute information that enables them to select routes between nodes on a computer network. Routers perform the traffic directing functions on the Internet; data packets are forwarded through the networks of the internet from router to router until they reach their destination computer. Routing algorithms determine the specific choice of route. Each router has a prior knowledge only of networks attached to it directly. A routing protocol shares this information first among immediate neighbors, and then throughout the network. This way, routers gain knowledge of the topology of the network. The ability to route protocols to dynamically adjust to changing conditions such as disabled connections and components and route data around obstructions is what gives the Internet its fault tolerance and high availability.

Protocols vary according to the way they avoid routing loops, and how they select preferred routes, the use of hop costs and the time required for routing convergence, scalability of it, and other factors.

Laptop connecting to a server for sharing packets, through a network of several routers.

The process of transferring packets happens in several steps, which are as follows:

Step 1: Send packet to router

The laptop/device sends the first packet to the router which is closest to it, as seen in the diagram.

Computers send the first packet to the nearest router.

Diagram with a laptop on left and router on right. Arrow goes from laptop to router, with the message “TO: 91.198.174.192” and “FROM: 216.3.192.1”.

Step 2: Router receives a packet

When the router receives a packet, it looks at its IP header. The most important field is the destination IP address, which tells the router where the packet wants to end up.

Step 3: Router forwards packet

The router has multiple paths it could send a packet along, and its goal is to send the packet to a router that’s closer to its final destination.

Diagram with the router on the left and 3 routers on right. The left router has a line going to each of the right routers, and the lines are labeled 1, 2, and 3. A question mark is shown above each line.

How does it decide? The router has a forwarding table that helps it pick the next path based on the destination IP address. That table does not have a row for every possible IP address; there are 2^{32}2322, start superscript, 32, end superscript possible IP addresses, and that’s far too much to store. Instead, the table has rows for IP address prefixes.

IP addresses are hierarchical. When two IP addresses start with the same prefix, that often means they’re on the same large network, like the Comcast SF network. Router forwarding tables take advantage of that fact so that they can store far less information.

Once the router locates the most specific row in the table for the destination IP address, it sends the packet along that path.

Diagram with the router on the left and 3 routers on right. The left router has a line going to each of the right routers, and the lines are labeled 1, 2, and 3. The second line, labeled 2, is highlighted with green arrows going from left to right and shows a packet above it.

Step 4: Final router forwards the message

If all goes well, the packet should eventually arrive at a router that knows exactly where to send it.

The router can now send the message to the destination IP address, which may be a personal computer or a server.

Diagram with the router on the left side and laptop on the right side. Arrow goes from router to laptop with packet displayed above it.

Now that we understand how it works, let’s look at the different types of routing protocols.

Types of Routing Protocols

There are mainly two types of Network Routing Protocols

  • Static
  • Dynamic

Routing Protocols

Static Routing Protocols

Static routing protocols are used when an administrator manually assigns the path from the source to the destination network. It offers more security to the network as only the administrator is able to add routes. While these reduce the processing time by providing no overhead to the router’s CPU, and the absence of unused bandwidth between links. The drawbacks are the need for the administrator to have the knowledge of how each router is connected, and hence it becomes impractical to use on large networks, it isn’t very feasible for small networks too, as it fails when the network goes down.

Dynamic Routing Protocols

Dynamic routing protocols are another important type of routing protocol. It helps routers to add information to their routing tables from connected routers automatically. These types of protocols also send out topology updates whenever the network changes’ topological structure. The major benefits are that it becomes easier to configure networks even if they are large, and if a link goes down, the dynamic nature enables it to choose a different route, it’s also helpful to balance the load between multiple links, this used the processing power of the router hence, the additional cost on the CPU and RAM, and since the updates are share, additional bandwidth is consumed.

Distance Vector Routing Protocol (DVR)

Distance Vector Protocols advertise their routing table to every directly connected neighbor at specific time intervals using lots of bandwidths and slow converge.

In the Distance Vector routing protocol, when a route becomes unavailable, all routing tables need to be updated with new information.

Advantages:

  • Updates of the network are exchanged periodically, and it is always broadcast.
  • This protocol always trusts route on routing information received from neighbor routers.

Disadvantages:

  • As the routing information is exchanged periodically, unnecessary traffic is generated, which consumes available bandwidth.

The more used routing protocols are discussed below:

Routing Information Protocol (RIP)

RIP is used in both LAN and WAN Networks. It also runs on the Application layer of the OSI model. The full form of RIP is the Routing Information Protocol. Two versions of RIP are

  1. RIPv1
  2. RIPv2

The original version or RIPv1 helps you determine network paths based on the IP destination and the hop count journey. RIPv1 also interacts with the network by broadcasting its IP table to all routers connected with the network.

RIPv2 is a little more sophisticated as it sends its routing table to a multicast address.

Interior Gateway Protocol (IGP)

IGRP is a subtype of the distance-vector interior gateway protocol developed by CISCO. It is introduced to overcome RIP limitations. The metrics used are load, bandwidth, delay, MTU, and reliability. It is widely used by routers to exchange routing data within an autonomous system.

This type of routing protocol is the best for larger network size as it broadcasts after every 90 seconds, and it has a maximum hop count of 255. It helps you to sustain larger networks compared to RIP. IGRP is also widely used as it is resistant to routing loops because it updates itself automatically when route changes occur within the specific network. It is also given an option to load balance traffic across equal or unequal metric cost paths.

Link State Routing Protocol

Link State Protocols take a unique approach to search for the best routing path. In this protocol, the route is calculated based on the speed of the path to the destination and the cost of resources.

Routing protocol tables:

Link state routing protocol maintains below given three tables:

  • Neighbor table: This table contains information about the neighbors of the router only. For example, adjacency has been formed.
  • Topology table: This table stores information about the whole topology. For example, it contains both the best and backup routes to a particular advertised network.
  • Routing table: This type of table contains all the best routes to the advertised network.

Advantages:

  • This protocol maintains separate tables for both the best route and the backup routes, so it has more knowledge of the inter-network than any other distance vector routing protocol.
  • The concept of triggered updates is used, so it does not consume any unnecessary bandwidth.
  • Partial updates will be triggered when there is a topology change, so it does not need to update where the whole routing table is exchanged.

Exterior Gateway Protocol (EGP)

EGP is a protocol used to exchange data between gateway hosts that are neighbors with each other within autonomous systems. This routing protocol offers a forum for routers to share information across different domains. The full form for EGP is the Exterior Gateway Protocol. EGP protocol includes known routers, network addresses, route costs, or neighboring devices.

Enhanced Interior Gateway Routing Protocol (EIGRP)

EIGRP is a hybrid routing protocol that provides routing protocols, distance vector, and link-state routing protocols. The full form routing protocol EIGRP is Enhanced Interior Gateway Routing Protocol. It will route the same protocols that IGRP routes using the same composite metrics as IGRP, which helps the network select the best path destination.

Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF) protocol is a link-state IGP tailor-made for IP networks using the Shortest Path First (SPF) method.

OSPF routing allows you to maintain databases detailing information about the surrounding topology of the network. It also uses Dijkstra’s algorithm to recalculate network paths when its topology changes. This protocol is also

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

ISIS CISCO routing protocol is used on the Internet to send IP routing information. It consists of a range of components, including end systems, intermediate systems, areas, and domains.

The full form of ISIS is Intermediate System-to-Intermediate System. Under the IS-IS protocol, routers are organized into groups called areas. Multiple areas are grouped to make form a domain.

Border Gateway Protocol (BGP)

BGP is the last routing protocol of the Internet, which is classified as a DPVP (distance path vector protocol). The full form of BGP is the Border Gateway Protocol.

This type of routing protocol sends updated router table data when changes are made. Therefore, there is no auto-discovery of topology changes, which means that the user needs to configure BGP manually.

But wait! What is the purpose of Routing Protocols?

Routing protocols are required for the following reasons:

  • Allows optimal path selection
  • Offers loop-free routing
  • Fast convergence
  • Minimize update traffic
  • Easy to configure
  • Adapts to changes
  • Scales to a large size
  • Compatible with existing hosts and routers
  • Supports variable length

Classful Vs. Classless Routing Protocols

Here are some main difference between these routing protocols:

Summary:

References:

We would like to express our gratitude towards all the sources who have made the related knowledge available freely.

Note: Illustrations are directly taken, and/or inspired by Khan Academy, but recreated.

Wikipedia

Khan Academy, 2

Cloudflare

Routerfreak

Guru99

Authors

Aditya Jaiswal

Aniruddha Kulkarni

Nikhilesh Joshi

Sanika Jade

Sarthak Jaiswal

--

--