Basic Routing Concepts and Protocols Explained

This tutorial explains the basic concepts of routing protocols. Learn the types, features, and functions of routing protocols and understand how routing protocols work.

Routers use a routing protocol to know all the available paths of the network and to select the best and the fastest path to forward incoming packets. A routing protocol provides the following functionalities.

  • Provide a virtual map of all paths of the network.
  • Calculate the cost of each path and help a router to select the best and fastest path.
  • Detect any change in the network and update all routers about that change.

Type of routing

There are two types of routing; static routing and dynamic routing.

In static routing, we have to manually provide/configure the above-listed functionalities on each router of the network. Since all configurations are done manually, a routing protocol is neither required nor used in static routing.

In dynamic routing, a routing protocol provides/configures the above-listed functionalities on each router of the network. Since all functionalities are provided by a routing protocol, we must have to configure and activate a routing protocol on all routers of the network.

How does a routing protocol work?

Routing protocols require information about locally available networks. When we configure and activate a routing protocol, we must have to specify this information. A routing protocol, after configuration, shares locally available networks' information with other routers running the same routing protocol.

Let’s take a simple example. Suppose, in a network two routers; A and B are connected. An administrator configures the same routing protocol on both routers. After configuration, the routing protocol of both routers automatically exchanges the information of locally available networks.

The following image shows this process.

routing concept

If a routing protocol detects any change in locally available networks’ information, it immediately updates other routers about this. This way, an administrator only needs to provide information about locally available networks once. After that, the routing protocol automatically manages all changes in the network.

Routing broadcasts

To share the paths' information, a routing protocol uses broadcast messages. A routing protocol periodically reads the routing table and shares it with neighbors through a broadcast message. Upon receiving a broadcast message from a neighbor, the routing protocol reads the broadcast message and updates the routing table accordingly.

For example, if the broadcast message contains information about a new path, the routing protocol adds that path in the routing table or if the broadcast message contains information that an existing path has gone down, the routing protocol removes that path from the routing table or marks that path unusable in the routing table.

When a router broadcasts the routing table, it not only broadcasts the information about the locally connected networks but also broadcasts the information about the networks that it has learned from its neighbors through the previously received broadcasts.

This update sequence eventually allows all routers to learn all paths. Let’s understand this process through an example. Suppose, in a network four routers; A, B, C, and D are connected in a sequence. All four routers are using the same routing protocol. Networks 10.0.0.0/8, 20.0.0.0/8, 30.0.0.0/8, and 40.0.0.0/8 are locally connected to the routers A, B, C, and D respectively.

The routing update sequence goes in the following way.

Router A broadcasts information of the network 10.0.0.0/8 to Router B.

Router B broadcasts information of the network 10.0.0.0/8 to Router A and C.

Router C broadcasts information of the network 30.0.0.0/8 to Router B and D.

Router D broadcasts information of the network 40.0.0.0/8 to Router C.

All routers after receiving broadcast update their routing tables, respectively.

Router A adds an entry in the routing table that indicates the network 20.0.0.0/8 is reachable through Router B.

Router B adds an entry in the routing table that indicates the networks 10.0.0.0/8 and 30.0.0.0/8 are reachable through Router A and C, respectively.

Router C adds an entry in the routing table that indicates the networks 40.0.0.0/8 and 20.0.0.0/8 are reachable through Router B and D, respectively.

Router D adds an entry in the routing table that indicates the network 30.0.0.0/8 is reachable through Router C.

The following image shows this process.

routing protocol routing updates

After the next routing update:-

Router A adds an entry in the routing table that indicates the network 30.0.0.0/8 is reachable through Router B.

Router B adds an entry in the routing table that indicates the network 40.0.0.0/8 is reachable through Router C.

Router C adds an entry in the routing table that indicates the network 10.0.0.0/8 is reachable through Router B.

Router D adds an entry in the routing table that indicates the network 20.0.0.0/8 is reachable through Router C.

The following image shows routing tables before and after the second routing broadcast.

how routing protocol works

After the next routing update:-

Router A adds an entry in the routing table that indicates the network 40.0.0.0/8 is reachable through Router B.

Router D adds an entry in the routing table that indicates the network 10.0.0.0/8 is reachable through Router C.

The following image shows routing tables before and after the third routing broadcast.

routing updates

The situation in which all routers know all paths of the network is called convergence. After the convergence, a routing protocol actively monitors all paths. If it detects any change in any path, it immediately updates all neighboring routing protocols running on their relative routers.

That’s all for this tutorial. If you like this tutorial, please don’t forget to share it with friends through your favorite social network.

Advertisements

ComputerNetworkingNotes CCNA Study Guide Basic Routing Concepts and Protocols Explained