Routing Routing Tables and Routing Algorithms

For Complete YouTube Video: Click Here

In this class, we will try to understand Routing Routing Tables and Routing Algorithms.

We have already discussed all the fields of the IPv4 header in our previous classes.

Understanding Routing Routing Tables and Routing Algorithms is very important.

Routing Routing Tables and Routing Algorithms

So far, in our previous classes, we have discussed that the data will get transmitted from source to destination but never discussed how it will get transferred.

From now we will discuss how the data is transmitted.

Before dwelling deep into the concepts, let’s understand the basic terminology.

The terminology that we understand is Routing Routing Tables and Routing Algorithms.

Routing

Definition: Routing is a mechanism that efficiently selects a way for data to get transmitted from the source to the destination.

The essential point to understand in the above definition is “efficiently.”

To understand this consider the image below.

Routing Routing Tables and Routing Algorithms 1
Routing Routing Tables and Routing Algorithms 1

From the above image, A and B want to communicate.

The above image has different colored lines indicating the different paths to transfer the data from source to destination.

Routing is a process where the data has to be transmitted from source to destination by taking the shortest path.

The numbers on the above image can be distance, cost, etc.

We will consider those numbers as distance.

The shortest path is marked in green with a distance of 3.

Routing Table

A routing table is a set of rules, often viewed in a table format, determining where data packets traveling over a network will be directed.

The image below shows an example interconnection of routers and the routing table on router A.

Routing Routing Tables and Routing Algorithms 2
Routing Routing Tables and Routing Algorithms 2

Every internet router will have a routing table with Destination, Distance, and Next Hop columns.

The destination column will have details of all the routers on the internet.

We have four routers, A, B, C, and D in our case.

The distance column has the shortest distance between router A and the destination router.

The next-hop column has the router’s details through which the data has to be transmitted to reach the destination.

To understand how the data is transmitted to the destination using the routing table, we will consider the following use case.

For example, A wants to transmit the data to C. 

It has three different paths.  

A-D-B-C with a distance of 10.

A-D-C with a distance of 8.

A-B-C with a distance of 7.

The shortest path is A-B-C, with a distance of 7. To follow the path, A has to transmit the data through B.

We will get those details from the Next-hop column in the routing table.

Routing Algorithms

Definition: The routing algorithm creates and maintains the routing table for the path decision process.

As we have seen above, routing tables are used to find the shortest path between the source and destination.

How are these routing tables generated?

The image below shows the different types of routing tables.

Routing Routing Tables and Routing Algorithms 3
Routing Routing Tables and Routing Algorithms 3

Static Routing Tables: The network administrators manually insert these routing tables. This method is not in use.

Dynamic Routing Tables: The routers generate the routing tables automatically.

This is all about Routing Routing Tables and Routing Algorithms.

The discussion on the dynamic routing table will be made in our following classes.