Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Types of Routing in Computer Networks
2.1.
Static Routing
2.1.1.
Advantages:
2.1.2.
Disadvantages:
2.2.
Dynamic Routing
2.2.1.
Advantages:
2.2.2.
Disadvantages:
2.3.
Default Routing
2.3.1.
Advantages:
2.3.2.
Disadvantages:
3.
Frequently Asked Questions
3.1.
What is the importance of routing?
3.2.
What are the two types of routing process?
3.3.
Why the manual configuration on static routing is taken as an advantage as well as a disadvantage?
4.
Conclusion
Last Updated: Jul 9, 2024
Medium

Types of Routing in Computer Networks

Computer Networks

Introduction

Routing is the process of choosing a path for traffic within a network and between or across networks. Routing is performed in many networks, including circuit-switched networks like the public switched telephone network (PSTN) and computer networks like the Internet. It is a process that uses layer 3 (or network layer) devices to deliver packets by selecting the best path from one network to another. The routing algorithm design and maintains the routing table for the path determination process.

In simple terms, suppose P1 is our network, and we want to send data to P2, and there are many networks between these two. Our network requires a router to choose the best path for our data to transfer from P1 to P2. The process of choosing the best path within or across networks for data exchange is known as Routing.

This article will provide an overview of routing and its various types in Computer Networks.

Types of Routing in Computer Networks

There are three types of Routing:

  1. Static Routing
  2. Default Routing
  3. Dynamic Routing

Types of Routing

Static Routing

Another name for Static Routing is Nonadaptive Routing. Static routing is the process of manually joining routes to the routing table.

Let's suppose our computer wants to connect with another computer, and there are ten different networks between them. When we want to connect both the computers, we have to give the information manually about the networks through which we want to connect to the router, then only the exchange of data can be possible. This process is said to be Static Routing.

Advantages:

  • The administrator manually sets it up.
  • It is safe and quick.
  • There is no bandwidth usage between routers.
  • Because there is no routing overhead for the router CPU, a less expensive router can be used for routing.
     

Disadvantages:

  • Utilized in small network
  • Everything has to be set up manually.

Also see, Cyber Security

Dynamic Routing

Another name of Dynamic Routing is Adaptive Routing. Dynamic routing automatically adjusts routes based on the current state of the route in the routing table. Protocols are used in dynamic routing to discover network destinations and the routes that will take them there. The best examples of dynamic routing protocols are RIP and OSPF. If one of the network routes fails, it will make automatic adjustments to reach the network's destination.

Let's suppose our computer wants to connect with another computer. There are ten different networks between them, so the path they have to follow while connecting is chosen automatically, assuring security, collision, hacking, and many more.

Advantages:

  • There is no need to understand the networks.
  • Its setup is easy.
  • Administrator work is less.
  • It is used for big organizations.
  • It is more effective at determining the best path in response to changes in the condition or topology.
     

Disadvantages:

  • More bandwidth is consumed when interacting with other neighbours.
  • Dynamic routing necessitates the use of more resources such as CPU, RAM, and bandwidth. That's why it's more expensive.
  • Dynamic routing introduces more complexity to the network, especially during implementation.
     

Default Routing

It is the method in which the router is set up to send all packets to a single router (next hop). It makes no difference to which network the packet belongs to; it is forwarded to the router that is set to default routing. It is typically used in conjunction with stub routers. A stub router only has one route to all other networks.

It is set up for unknown locations or end locations. It is the least preferred Routing. It helps in minimizing the size of your routing table.

Advantages:

  • If there are no fixed routes in the routing table, the default route can be helpful. The default route is used for all packet traffic with an unknown destination in the routing table.
  • It is suitable for packet filtering, firewalling, and proxy servers as it is configured for unknown destinations.
     

Disadvantages:

  • If the network is overly complex, the setup will also be difficult.
  • The network topology determines it.
     

Recommended Topic - What are payloads, Subnetting in Computer Networks

Frequently Asked Questions

What is the importance of routing?

Routing is the central node around which all IP connectivity revolves. Routing establishes basic internetwork communications, implements an addressing structure that uniquely identifies each device, and organizes individual devices into an organized network structure at the most basic level.

What are the two types of routing process?

The two types of routing processes are static routing and dynamic routing. Static routing involves manually configuring routes in network devices, while dynamic routing uses protocols to automatically update and share route information among routers in a network.

Why the manual configuration on static routing is taken as an advantage as well as a disadvantage?

It's an advantage because it increases security as the static routing is configured manually because only an administrator can allow routing to specific networks. However, it is also a disadvantage because Connecting each route manually to the routing table becomes extremely difficult in an extensive network. As the administrator has to add each route manually, he should be well-versed in topology.

Conclusion

This article discussed routing, which is a process of choosing a path for traffic within a network, between or across networks, and their types in Computer Networks.

Recommended Readings:

Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.
Thank you for reading!

Live masterclass