Routing protocols in networking and its types.

During the transmission of a packet in a computer network, a sender node attaches an IP header to the user data (e.g., an HTTP web request) and transmits the packet to the next hop. A next hop can be a final destination or an intermediary node that routes the packet to its destination.

What is Routing?

When a message is received, a network node named router determines an outgoing path for the message to follow to its destination. According to the OSI model, routers operate at the network layer. Upon receiving a packet, the router extracts the destination IP address from the header and then looks up the routing table for the packet’s next hop.

What is a routing table?

Routing tables contain information that routers use to determine the next hop. Routing tables are composed of tuples containing IP addresses and the ethernet interface to the next node., e.g., IP = route to 67.345.6.7 via eth0.

Routing Protocols between Routers
Routing Protocols between Routers

But what if the link is down towards the next hope? Is the router keep updating routing information for the changed topology?

What routing protocol means?

Routing protocols are the network protocol standards for exchanging information among routers to update the routing information to ensure that each node in the network has up-to-date routing information.

In this tutorial, we will discuss the types of routing protocols and describe the routing protocols of each type.

What are the types of routing protocols?

There are two types of routing protocols at a very broad level: Static and Dynamic.

Static protocol type?

As the name implies, static refers to something that is fixed. It is configured by the network administrator once and again charged by him if needed. Mainly it is used where we have only one possible route to the destination.

For example, if our laptop is connected to one LAN only for the internet, a single static route will forward all packets to the internet router.

Routing Protocol Types
Routing Protocol Types

Dynamic Protocol type?

In dynamic protocols, the routing tables keep updating upon network events. Such protocols are useful for a router connecting multiple adjacent nodes to router a distance IP address.

Dynamic Routing protocols –

Following is the list of dynamic protocols used over the IP network. We are trying to give a short introduction to each type.

Distance Vector Routing Protocol –

When routers use Distance Vector Routing Protocol between them, each router advertises its routing table at a periodic interval or at the network topology change to all directly connected routers. The update receiver router updates the routing tables and does advertise to their neighboring routers if needed. This way, a change in network topology propagates to all networks.

Routing Information Protocol(RIP)-

This type of routing protocol is similar to the distance vector protocol. It is an application layer protocol as per the OSI model. A router configured with RIP uses the hop count as a matrix for selecting the outgoing path. A hop in the computer network is an integer number. It represents the number of routers that will be used to send a packet to the destination.

For example, routing decisions will occur at two places if reaching a destination has two hops.

The major drawback of the routing information protocol is that there can be a maximum of 15 hops. So the number of routers that can connect to each other using RIP is very small.

If it uses hop count, so even a path with more hops is better in terms of bandwidth and latency, but still, RIP will choose the path with the least number of hops.

Interior Gateway Protocol (IGP) –

This is the routing protocol that works over an autonomous system. For example, if a company connects multiple offices to each other via gateways (or routes). Each router can be configured to use the IGP protocol for exchanging the topology information. Unlike the RIP, it considers other metrics, too, such as bandwidth and latency.

Link state routing protocol-

It is a little similar to the distance vector routing protocol. But This protocol is more refined. Each node in the network that uses the Link-state routing protocol sends information to its neighbor about the path cost and other information such as TTL (time to live). The separate link-state table is maintained along with the routing table.

Exterior Gateway Protocol (EGB) –

With the exterior gateway protocol, we can connect different autonomous networks to communicate with each other. An autonomous network uses the IGP protocol. Each network has its own id assigned by the IANA.

Open Shortest Path First (OSPF) –

The OSPF is an interior gateway protocol that uses a link-state routing protocol. In Open Shortest Path First,  each router calculates the shortest path using the Dijkstra algorithm.