Routers are the devices that are essential in networking. They play a vital role in directing the best path to the packet to reach the final destination. The router is a three-layer device.
Routers in Computer Network
What is Router?
A router is a device that specifies the path to the arrived data packet. The routers also connect two different networks.
Routers can operate on the three different layers of the network i.e.;
- Physical layer
- Datalink layer
- Network layer
Function of Router
- At the physical layer, it regenerates the data signals it receives. This is a process of restoring the data signal that is distorted by the transmission loss.
- At the data link layer, the router scans the data packet. On scanning, it determines the physical address present source and destination field of the packet. This helps the router in routing the packet to its destination.
- At the network layer, the router determines the logical address of the source and destination for routing the data packet.
A router can link several LANs together, even it can link different WANs together. Along with this router is even able to connect LAN and WAN together. As the router can connect two different and independent networks together, we can refer to it as an internetworking device.
To make the routing decisions every router maintains a routing table. The entries of the routing table provide the necessary information that is required to route the data packet through the best path towards its destination.
Usually, the routing tables are dynamic and keep updating their entries using the routing protocols.
Working of Router
Whenever a packet reaches the router, the routers scan the packet and determine the destination IP address in the packet’s header.
The router analyzes its routing table and compares the destination IP of the packet to determine the next hop or the next network in the path of the data packet.
You can think of the router as the post office system and the data packets as the letters. Whenever a letter arrives at the post office it first determines its final destination. It then determines the next post office in the path of the letter and forwards the letter to the next post office. In this way each post office in the path of the letter to its final destination guides it. So that the letter reaches the final destination without getting lost.
Types of Routers
There are four types of routers are available in the market.
- Wired router
- Wireless router
- Core router
- Edge router
- VPN router
Wired Router
As the name suggests the wired router connects to other devices through cables or wired connections. One port of the router connects to a computer via cable. And another port of the router connects to the modem to connect the computer to the internet.
The firewall used in the wired router identifies the threat present in the data packet that may cause a security threat to your computer.
Wireless Router
The wireless router connects to the modem with the cable. But it connects to computers in a wireless mode using one or more antennae.
The wireless router receives the data from the modem in digital form. The router converts this digital signal into radio signals. These radio signals are then broadcasted to the computers.
Edge Router
Edge routers are the routers that are present on the boundaries of the network. Edge routers are used to distribute the data packets across the multiple networks that are connected together by the router.
Core router
Core routers are the routers that are present inside a network. The core router distributes the received data packets to the computers present in the same network as of core router, unlike the edge router that can distribute data packets across the different connected networks.
Virtual Routers
A virtual router is actually a software function that allows a host in the network to act like a typical hardware router.
Advantages and Disadvantages of Router
Advantages
- A router connects two different networks efficiently.
- The router determines the best route for the data packet and assists the data packet to reach the final destination.
- With the help of a dynamic routing protocol, the router maintains the network traffic.
- The router is compatible to use in combination with other networking devices such as modems, switches, etc.
Disadvantages
- Routers are quite expensive as compared to other networking devices.
- The firmware of the router contains several vulnerabilities that can be easily exploited by the cyber attacker.
- The routers are quite slow as they have to process the data packets at three layers.
- The dynamic router keeps on updating its routing table which causes additional overhead.
- A router is a protocol-dependent device as it operates using routable protocols.
Here we end up our discussion of the routers. So far we have discussed its working, types, advantages, and disadvantages.