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:
- Static Routing
- Default Routing
- Dynamic 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