Routing protocols in networking and its types.
A sender node in the computer network appends an IP header to the user data (e.g HTTP web request) and sends the packet to the next hop. The next hope can be the final destination or it could be an intermediate node that can route the packet further. Routing is the process where a network node named router selects an outgoing path towards the destination.
A router works at the network layer as per the OSI model. Upon receiving a packet it extracts the destination IP from the packet and does a lookup in the routing table. A routing table is a piece of information that routes use to select the next hope. Generally, it is in the form of tuples, where each tuple has ranges of IP addresses and next hope, e.g IP = 184.108.40.206/24 route to 67.345.6.7 via eth0.
But what if the link is down towards the next hope? Is the router keep updating routing information for the changed topology?
Routing protocols are the standards for exchanging information among routers to update the routing information. So that each node in the network has updated routing tables. In this tutorial, we will discuss what are the types of routing protocols and the description of routing protocols used.
What are the types of routing protocols?
At a very broad level, basically, there are two types of routing protocols, Static and Dynamic. In static as the name suggests that is fixed. It is configured by the network administrator once and again charged by him if needed. Mostly 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, there will be a single static route that forwards all packets to the internet router.
In dynamic routing protocols, the routing tables keep changing upon network events. Such protocols are useful at a router that connects to 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 periodical 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, if reaching a destination having two hops there will be routing decisions at two places.
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 uses hop count, so even a path with more hope 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 rouets). Each router can be configured to use the IGP protocol for exchanging the topology information. Unlike the RIP, it used other metrics such as bandwidth and latency also into accounts.
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 the information to its neighbor about the path cost along with 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 used a link-state routing protocol. In Open Shortest Path First, each router calculates the shortest path using the Dijkstra algorithm.