Routing Protocols in Computer Network

Learn via video courses
Topics Covered

Overview

The Routing protocol is used to determine the path between one or more networks and store the information in the routing table. The types of Routing are static, dynamic, and default. The router is a device that is used to forward a packet from source to destination. The Routing protocol is classified as distance-vector protocol, link-state protocol, and path vector protocol

Introduction to the Routing Protocol

The routing protocol is a process where the router connects with other routers in order to share information about the most cost-effective path and status of the network. The routing process selects the best path on the basis of the reachability information and stores it in a router table. In order to select the best route, a routing metric is used and computed using a routing algorithm.

The Routing protocol basically defines a way the router can communicate with each other. It allows the router to get the optimal path to transfer packets from one network to another.

What is Routing in Computer Networks?

Routing is the process of selecting an optimal path across one or more networks. The Routing is performed on many types of networks like circuit-switched and packet-switching on the internet, where packets are forwarded from one node to another node with the help of a packet forwarding system. The mechanism or device used for forwarding the packets from source to destination is called a router.

The routing process directs the packets on the basis of the routing table. Routing tables keeps the records of all the route associated with various networks.

The routing algorithm is nothing but the software that helps determine the optimal path for packet transmission.

Types of Routing

Types of Routing

Routing is classified into 3 categories:

  • Static Routing
  • Dynamic Routing
  • Default Routing

Static Routing

Static Routing is the process of manually adding the routes in the routing table with the help of a configuration file, which is loaded when the router starts. In static routing, all the changes are done manually with the help of the system administrator. In static Routing, all the network locations are added manually by the system administrator. When the router learns from the admin, it is called static routing.

Advantages of Static Routing Protocol

  • Easy to implement
  • It is the most secure way of Routing, as information is not shared with any other router
  • It does not require a lot of resources such as CPU or Memory. There we can use a router that is cheaper for Static Routing

Disadvantages of Static Routing

  • It is suitable for only small networks.
  • If one of the links fails, it won't be able to reroute the traffic. This will stop the whole system.

Dynamic Routing

Dynamic routing protocols allow routers to dynamically learn information about other routers and add the information automatically to the router table. The Routing protocol determines the best path to the network added to the routing table.

The main purposes of the dynamic routing protocols are:

  • It discovers a remote network and maintains up-to-date routing information.
  • It automatically chooses the best path to the destination network and also has the ability to choose a new path if the current path is not available.

Advantages of Dynamic Routing Protocols

  • It works for all types of networks.
  • Reroute the traffic automatically if there is a link failure condition.
  • It automatically builds a routing table.

Disadvantage of Dynamic Routing Protocols

  • Dynamic Routing is less secure as it shares the routing Information with other routers.
  • It is more expensive as resource utilization is more in terms of CPU, memory, and bandwidth.

Default Routing

In default routing, the packets are forwarded without the specific address of the next hop. The default route is basically the address of another router. If the address on the packet matches the route, the packet is forwarded; else, it is forwarded through a default route of that router. The packet can be forwarded through any router which has been configured for default routing.

Advantages of Default Routing

  • Default Routing can be used when there is no predefined route in the routing table.

Disadvantages of Default Routing

  • The more complex the network is, the more difficult it is to set up and use efficiently.

Functions of Router

The router is a device that routes the packet from source to destination. Let's see the functionality of the router:

  • It is used for managing traffic between a network by forwarding the packets.
  • It allows multiple devices to connect with the same network.
  • The router is used to forward a packet between different networks

Routing Protocols

A routing protocol is used to select a route within a network to find the best path to forward a packet. The router communicates with each other gathers information regarding the different paths to the specific network and stores it in the routing tables. The routing table stores the information of the path that is discovered by the router to another network and finds the most optimal path while forwarding packets from source to destination.

The Routing protocols are:

  • Distant Vector Protocols
  • Link-State Protocols
  • Path Vector Protocols

Distant Vector Protocol

Distant vector protocol, also called as Bellman-Ford algorithm or Ford Fulkerson algorithm used to calculate a path. A distance-vector protocol calculates the distance and direction of the vector of the next hop from the information obtained by the neighboring router. It is necessary to keep track of the topology and inform neighboring devices if any changes occur in topology.

Let's consider a scenario where all the routers are set and run the distant routing protocol. Each router in the network will share the distance information with the neighboring router. All the information is gathered from the neighbor routers. With each router information, an optimal distance is calculated and stored in the routing table. This way, the process of calculating the optimal path is done using the distant vector routing protocol.

Link-State Routing protocols build a complete topology of the entire network and then calculate the best path from the topology of all interconnected networks. In link-state routing, the distance is calculated based on multiple metrics from source to destination, one hop at a time.

The link-state routing protocol maintains three different tables that are neighbor table, the topology table, and the routing table. The neighbor table stores the information of the neighbor table. The topology table stores the information on network topology, and the routing table keeps track of all the paths to the different networks. It requires more memory and processing power as it has the complete picture of the network.

Let's consider the scenario where routers are set. Link state routing protocol follows the following steps:

  • Discovering The Neighbour: When routes are boosted, the first task is to learn about the neighbors. Routers send a hello message to neighbors. The neighboring router responds to the "Hello" message by identifying themselves. While replying, the network addresses of the routers are attached. This information is used to build a neighbor table.

  • Measuring Delay: According to the link-state routing protocol, each router must know or have a reasonable estimate of the delay to each of its neighbors. The cost of a line is measured based upon sending a signal on the link and determining the end-to-end delay.

  • Construct packets and distribute them to routers Once the information is collected, the packets containing all the data of neighbors are built. The packet has the identity of the sender, followed by a sequence number and age, and a list of neighbors. After this, packets are forwarded to the network.

  • Computing new route. A router is used to compute the shortest distance to a destination.

Path Vector Protocol

The path vector protocol is a routing protocol that keeps track of path information that is updated dynamically. The path vector protocol does not rely on the reachability to the destination, instead determines whether the path is loop-free or not. The path vector does the analysis of the path to determine whether the path is loop-free or not.

Let's see how path vector routing works. The principle of path vector routing is similar to that of distance routing. It assumes that there is one node in each autonomous system that works on behalf of the entire autonomous system, called the speaker node. The speaker node is an autonomous system that creates a routing table and shares the information with the neighboring autonomous systems. The path is advertised by a speaker node in its autonomous system and neighboring autonomous systems.

Don't miss out on the opportunity to master the fundamentals of computer networking. Enroll in our Free Computer Networking course & learn from industry experts!

Conclusion

  • A routing protocol is the process of communication between two networks in order to share information regarding reachability and network status.
  • Routing is the process of selecting the best path across one or more networks.
  • In static routing routes, information is added manually to the routing table.
  • In dynamic Routing, the data is updated dynamically in the routing table as per the change in network topology.
  • The Routing protocols that are used to calculate paths are distant vector routing, link-state vector routing, and path-vector routing.
  • Each router in distance vector routing has a route distance to a destination stored in the routing table. This information is gathered from the neighboring node.
  • In link-state routing, the distance is calculated based on multiple metrics from source to destination, one hop at a time.
  • The path vector protocol is a routing protocol that keeps track of path information that is updated dynamically.