Javatpoint Logo
Javatpoint Logo

Routing Protocols in Computer Networks

Routing protocols are the set of rules and algorithms that routers use to communicate with each other to find the most efficient path to transmit data packets from a sender to a receiver. There are many routing protocols in computer networks, which we are going to discuss in this article, but to understand routing protocols properly, let us first understand routing.

Routing in Computer Networks

The term "routing" comes from the word "route", which means the path used to transport data packets in computer networks. Routing is a procedure of moving data packets from one network to another by discovering the finest path from the source to the destination. The device that helps in finding the best path to forward data packets from the source of one network to the destination of another network is called a router.

Types of Routing Protocols

There are three kinds of routing protocols in computer networks, which are given as:

Routing Protocols in Computer Networks

1. Static Routing Protocol:

It can also be called non-adaptive routing. It is a manual configuration technique in which the network administrator selects the best path to transfer the data packet from source to destination. When a network administrator configures each router in the routing table by hand, it is called static routing. After that, the router forwards the data packets to the destination along the path defined by the network administrator.

It provides security because only the administrator has control over routing. It is ideal for small organizations as it requires less bandwidth; hence, the cost is low.

2. Default Routing Protocol:

The default routing protocol can also be called the default route. When a router faces a situation where it does not know the destination network of a data packet, then it uses a method called "default routing". It is an approach in which the router transfers all data packets to the single-hop device, regardless of the network.

The default route is the predetermined path the router uses to send all data packets when encountering such a situation. When the destination network is unknown to the router, then the router uses the default route and sends all data packets to that route.

3. Dynamic Routing Protocol:

It can also be called adaptive routing. It is an approach in which a router automatically finds the best path to transmit data packets from the sender to the receiver and puts the selected path information into the routing table of each router.

The router selects the path based on situations of the communication circuit or the network topology. If there is any loss of connection between the nodes or there is a problem with the route decided, the packed data is automatically adjusted on the new route to be forwarded towards the destination. It is ideal for larger organizations where many routers are used.

Types of Dynamic Routing Protocols

Routing Protocols in Computer Networks

There are 2 types of routing protocols, which are as follows:

1. Interior gateway protocols (IGPs):

The routing protocols that are used within the same network or autonomous system (AS) facilitate the swapping of routing details between routers. The main function of IGP is to search for the best route for forwarding data packets from sender to receiver within an autonomous system.

2. Exterior gateway protocols (EGPs):

The routing protocols are used in various autonomous systems that facilitate the swapping of routing details between routers. The main function of EGP is to search for the best route for forwarding data packets from sender to receiver between various autonomous systems.

Interior gateway protocols (IGPs)

They are further categorized into link-state routing protocols, distance-vector routing protocols, and hybrid routing protocols.

1. Link-state routing protocols:

Link-state routing protocols are a type of interior gateway protocol which are used in computer networks to decide the most suitable path to send data packets from one point to another over the network. These protocols have a very good knowledge of the network topology to forward the data packets to their destination efficiently. These protocols track the status and connection type of each link; based on these factors, they produce calculated metrics with the help of which routing is done.

There are several link-state routing protocols, which are discussed below:

  • OSPF (Open Shortest Path First):

It is the popular and most widely used open standard protocol. It was introduced 34 years ago in 1989. It is one of the internal gateway protocols that use a link-state routing algorithm or shortest path first algorithm that works within a single routing domain. This algorithm was designed by an expert named Dijkstra, which is why it is also known as Dijkstra Algorithm.

It uses Internet Protocol (IP) type 89 for communication. It supports Classless Inter-Domain Routing (CIDR) and Variable Length Subnet Mask (VLSM). It is developed to work with both IPv4 and IPv6 networks. It can divide a larger internetwork into smaller internetwork called areas.

The OSPF router keeps the information of network topology, such as routers, links, and networks within the same autonomous system. This information is stored in the form of Link-State Advertisements (LSAs) in a database called the Link-State Database (LSDB). Each router has a distinctive Router ID (RID) identifying an individual router. Each router contains information about every other router connected to the network, due to which the size of the link state database increases.

In OSPF, a large autonomous system is divided into OSPF areas, which reduces the size of the LSDB.

Each area has its network, hosts, routers, and other devices. Each area is assigned an identification number called area identification. Each area only stores information about the devices within its area and doesn't need detailed knowledge about the network topology.

The OSPF network must have a backbone area, also referred to as Area 0, to which all other areas are connected. This connection allows routers in different areas to communicate indirectly. In OSPF, there are Area Border Routers (ABRs) that connect OSPF areas within an autonomous system and Autonomous System Border Routers (ASBRs) that connect OSPF domains to external networks. The Open Shortest Path First uses cost metrics to determine the most cost-effective route to get to the destination

  • IS-IS (Intermediate System to Intermediate System):

The IS-IS protocol was developed by Digital Equipment Corporation (DEC) for the International Standards Organization (ISO) in the late 1980s. It is one of the internal gateway protocols that use link-state routing protocol, exchanges Link-State Advertisements (LSAs), and maintains the Link-State Databases (LSDBs) for routing within an autonomous system. Like OSPF, it also uses the Dijkstra Algorithm for finding the best route to pass the data packets from source to destination, but IS-IS does not use IP routing to exchange the routes like OSPF. IS-IS is based on Connectionless Network Service (CLNS) for exchanging routes. It also supports Classless Inter-Domain Routing (CIDR) and Variable Subnet Length Masking (VLSM).

It uses a two-level hierarchy: Level 1 routing and Level 2 routing. In Level 1 routing, routers exchange routing information within the same area. In Level 2 routing, a router provides connectivity between different areas. The routers that only directly communicate with the routers of the same area are called Level 1 routers. The routers which are communicating with routers in another area are called Level 2 routers. L2 routers are also responsible for routing traffic between different autonomous systems. IS-IS can be used to route any network layer protocol. This flexibility makes it suitable for diverse networks.

2. Distance-vector routing protocols

Distance-vector routing protocols are interior gateway protocols that are used in computer networks to choose the most profitable path to transmit data packets from one point to another within autonomous systems (ASes).

In distance-vector routing protocols, distance is the measurement of the path between the two networks, and vector is the direction in which the data packets should be forwarded so that they reach the destination by covering the distance. In routers, the vector indicates the interfaces.

Distance-vector routing protocols calculate paths using distance and vectors to reach the data packets to the destination network. This protocol periodically sends information about routers to their neighbors whenever there is a change in the network topology.

There are several distance-vector routing protocols, which are discussed below:

  • RIP (Routing Information Protocol):

It is one of the oldest dynamic routing protocols. It is a type of interior gateway protocol used in computer networks, so it performs routing within an autonomous system. It is a distance-vector routing protocol that uses a hop-count metric to discover the most suitable route for transmitting data packets to the destination network.

This protocol routinely sends information about routers to their neighbors whenever there is a modification in the network topology. It is a unicast routing protocol that is used to establish one-to-one communication in which there will be one sender and one receiver. It supports classful routing.

The metric used by RIP is hop count. From one router to another, one hop is counted. RIP calculates the distance by counting the number of hops between the sender and receiver. The distance with the minimum number of hop counts is considered the best route for forwarding data packets. If all routes between the source and destination have the same hop count, then RIP will send messages on all routes to balance the load on the network. It is important to know that the maximum number of hop counts allowed in RIP is 15 hops, which is why the maximum number of routers in the network can be 16 routers. The distance greater than 15 hops is considered unreachable.

To update the routers with the information about the routes present in the network, RIP sends messages. There are two types of RIP messages: request message (it is sent by new routers entering the network to obtain information about their neighboring routers) and response message, which are classified into two types: solicited message (it is sent in response to request message) and unsolicited message (it is sent at regular interval of 30 seconds to update neighboring routers regarding the routes and the networks).

There are 2 versions of the routing information protocol: RIP Version 1 (RIPv1) and RIP Version 2 (RIPv2).

RIPv1 is the oldest version of RIP, which is a classful protocol, so it does not support VLSM. It uses the hop count metric to find the finest path between source and destination. It provides routing updates periodically to neighboring routers.

RIPv2 is a modern version of RIP, which is a classless routing protocol and supports VLSM. It uses the hop count metric, but it can hold more information in routing updates. It enhances security by supporting authentication.

  • IGRP (Interior Gateway Routing Protocol):

It is a Cisco proprietary protocol since Cisco created it in the mid-1980s, so IGRP can only be used within networks that use Cisco devices. It is a distance-vector routing protocol that exchanges details between routers within the same autonomous system. It was created to overcome the disadvantages of Routing Information Protocol (RIP), which has a limited hop count of only 15. IGRP uses several metrics such as bandwidth, reliability, load, Maximum Transmission Unit (MTU) size, and delay to select the best path to the destination network, which results in a more accurate selection of routes.

The maximum limit of hop count in IGRP is 100, and it sends updates to the router periodically, every 90 seconds. It provides more security to data packets traveling from sender to receiver.

3. Hybrid Routing Protocols

It is a combination of link-state routing protocols and distance-vector routing protocols. It has features of both of these protocols. It is used to provide the best route to transfer data packets in a more reliable and faster manner.

The hybrid routing protocol is as follows:

EIGRP (Enhanced Interior Gateway Routing Protocol):

It is a Cisco proprietary protocol that is an improved version of the Interior Gateway Routing Protocol. It is the successor to IGRP developed by Cisco to overcome the shortcomings of IGRP. It is also known as a hybrid routing protocol as it has features of both link-state routing protocols and distance-vector routing protocols.

The metrics it uses are bandwidth, load, delay, and reliability. It uses a Diffusing Update Algorithm (DUAL) algorithm to ensure loop-free routing. It supports both Classless Inter-Domain Routing (CIDR) and Variable Length Subnet Mask (VLSM). It is used for efficient use of bandwidth and fast convergence.

Exterior gateway protocols (EGP)

The most widely used EGP is the Border Gateway Protocol (BGP).

Border Gateway Protocol (BGP):

It is a dynamic routing protocol that is used to figure out the best path to transfer data packets from one network to another. It is an exterior gateway protocol that allows routers to exchange information between different autonomous systems. It uses a path-vector routing protocol, which maintains route details that get updated dynamically.

BGP enables efficient routing to determine the best route to the destination network that provides the most reliable and faster communication. It is highly scalable as it can seamlessly manage the growing number of interconnected devices and networks. It supports multi-home connectivity, which means the organization can connect to multiple internet service providers simultaneously and automatically select the best path.

BGP provides organizations with control over Internet traffic, which helps avoid congested routes. BGP enhances internet resilience by quickly adapting to network changes. If routes become congested with traffic, BGP can redirect the traffic to an alternate path that ensures uninterrupted communication. It provides global connectivity, which means that BGP allows networks from different locations to interconnect and exchange routing information, which facilitates seamless data transfer across borders.

Conclusion

  • In this article, you have learned about routing protocols in computer networks.
  • You have learned about routing, which is the process of finding the best possible path to forward a data packet towards the destination network.
  • You have learned that there are three types of routing protocols: static, default, and dynamic routing protocols.
  • Dynamic routing protocols are further classified into internal gateway protocols and external gateway protocols.
  • Interior gateway protocols are further classified into distance-vector routing protocols, link-state routing protocols, and hybrid routing protocols.
  • Link-state routing protocols are classified into Intermediate System to Intermediate System (IS-IS) and Open Shortest Path First (OSPF).
  • Distance-vector routing protocols are subclassified into Interior Gateway Routing Protocol (IGRP) and Routing Information Protocol (RIP).
  • Hybrid routing protocols include Enhanced Interior Gateway Routing Protocol (EIGRP).
  • External gateway protocols include the Border Gateway Protocol (BGP).






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA