How Routing works? Routing and Switching, ospf

Routing and Switching, Types of Routing

In this post we will get info about – Routing and Switching, Types of Routing, How Routing works? So let’s Start – The backbone of the internet is made up of data packets traveling from a data center to your device. This data flow is regulated to ensure the most effective data transfer possible. It is clear from this image that regulating data from the source to the destination across such a complex network is a difficult undertaking. Routing refers to the entire process of efficiently moving data from a source to a destination.

How-Routing-works
How-Routing-works

Let’s use an analogy to help us grasp routing. Consider the following scenario: you’re trying to get from your office to your house. There is a lot of traffic on the roads. In this scenario, you use Google Maps to check the route and traffic conditions. You take the shortest route to your house based on the traffic situation and road conditions.

Similarly, in routing, decisions about packet movements are made based on the state of the network, and these logical data decisions are made by a device called a router.

How-Routing-works
How-Routing-works

Routing and Switching

The basic goal of a router is to discover the most efficient path for packets to travel from source to destination. The router determines which router or device the current packet must be transmitted via using sophisticated algorithms. This process is repeated until the packet is delivered to its intended location. Routing can be classified into two types.

  1. Static 
  2. Dynamic

In static routing – All of the routes are manually configured in a router. As a result, unless someone manually corrects the route, if the network changes, the route will not update.

How-Routing-works
How-Routing-works

In dynamic routing – The software determines the routes based on the current state of the network. At each discrete time step, network changes such as connection failures, traffic changes, and cost changes will be updated. At each time step, new routes will be determined based on this information.

Because routers update themselves in response to network changes, dynamic routing is preferable over static routing. ( Satellite)

Let’s Learn and take a closer look at one of the most often used dynamic routing techniques. 

The link-state algorithm

The link-state algorithm has two parts:

  1. Reliable flooding
  2. Dijkstra’s shortest path algorithm
How-Routing-works
How-Routing-works

Let’s start with a basic understanding of Dijkstra’s shortest path algorithm – an

Edsger W. Dijkstra, a well-known Dutch computer scientist, created the method in 1956. Consider the following network. The costs between each node are indicated below. The goal is to discover the quickest route from one node to the next.

The Dijkstra algorithm generates a table as an output, which we may use to find the network’s shortest path. For vertex A, this table is generated. You may also anticipate the shortest path to any other place using this table. Simply verify the previous vertex for the shortest path to point I.

How-Routing-works
How-Routing-works

Check the previous vertex of this vertex, and so on, until you reach point A. This table was created using an iterative process with infinity as the starting value for the shortest distance. We are only animating Images the technique used to build this algorithm because of a lack of time. We get the routing table, which is the output, at the end of the loop.

Link-State Packets

The first part of a link-state algorithm, dependable flooding, is now discussed. You may have noticed that in order to perfectly run Dijkstra’s algorithm, each router must have complete topology knowledge. In link-state routing, this is the initial phase.

How-Routing-works
How-Routing-works

The link state of a router refers to the information about its immediate surroundings. This information could include the neighboring router’s IP address, the pricing of neighboring lines, the health of the links, and so on. Link-state packets are short packets that provide this neighbor information. As implied by the name.

How-Routing-works
How-Routing-works

We should accurately flood each router with all of the other routers’ link states in the topology. This is similar to how classroom gossip spreads like wildfire from one kid to the next until everyone is aware of it. Each router in a network initially understands its own link state. A passes its link-state packet to its neighbors, B passes the packet to its neighbors, and so on for this small network.

How-Routing-works
How-Routing-works

As a result, all nodes will have access to the topology’s whole link-state information. All nodes generate or update a routing database with this packet information and send the packet using Dijkstra’s shortest path method.

Flooding, on the other hand, is not so straightforward. Consider the case of three interconnected nodes, A, B, and C. Node A transmits link-state data to nodes B and C. Similarly, C transmits information to B, who then sends it back to C, and the process repeats again. Looping is the term for this problem. So, in a perfect world, you’d like the node to only get this information once.

How-Routing-works
How-Routing-works

How do you overcome the looping problem?

A unique ID is issued to each packet. When B receives this packet from A and C with its unique ID, it does not deliver it to C. Following the flooding process, each node determines the shortest path between itself and other nodes in the network using the Dijkstra shortest path algorithm.

How-Routing-works
How-Routing-works

With the help of protocols, the algorithm we saw is implemented in a network. It’s nearly hard to apply the flooding operation over the entire global network. OSPF is the protocol for the link-state routing algorithm.

OSPF

The entire network is partitioned into numerous local areas in OSPF. Also created is a backbone area that shares at least one router with the local areas. A few border routers are created this way. As you can see, these border routers connect all of the local areas to the backbone area.

The flooding operation in OSPF takes place locally rather than globally. If packets from one local area need to transit to another, they must first pass through the backbone area. This is exemplified in the image below.

How-Routing-works
How-Routing-works

If data packets flow from area two to area three, they must first travel through the backbone area. This structure decreases the complexity of the operation by reducing the size of the routing table, as well as assisting the network’s scalability.

We hope this post has given you a good overview of the routing operation. Thank you.

NEXT

How do Satellites work? Learn Engineering

Leave a Comment

Share via
Copy link
Powered by Social Snap