What is Router and how it works

Routers can connect two networks that use a common network layer protocol. Routers operate at the network layer of the OSI reference model. Some routers may also connect two networks that use different layer 2 protocols. Router also filter and forward information among different networks. However, routers work at the network layer-3, so they use the network addresses for filtering and forwarding information. In addition, routers can also provide additional features such as the ability to determine the best route for a destination and filtering information from a particular node.

Router store the network addresses of computers in different networks in a table, called the routing table. routing table also contains information on the path that should be used to transmit data, and any rules that have been defined for filtering network traffic. whenever a router receives a data packet, it checks for the network address of the destination. If the destination address is in a different network than the source address, it checks the routing table for the packet needs to take to reach the destination. If a route is found, the packet is forwarded to the specified path. Otherwise the data packet is filtered. 


                        Make Money Online

About Node: The nodes in a networks also maintain routing table, which contains information on the different routes within the network that can be used to transmit data.


Let's us see how routers work.

Router Work


To understand the example, Node-A sends data to Node-H. The step involved in the transmission of data from Node-A to Node-H are  as follows:

Router-1. Node-A broadcasts the data on network-1. The data is received by Node-B & C do not match the data packet, and therefore, these nodes do not accept the data.  Router-1 checks the destination address of the data packet. The destination address is compared with the routing table that contains the list of addresses of Network-1. As Node-H is not a part of Network-1, the destination address is not found in the router table, and the data packet is forwarded to Router-2.

Router-2 checks for the destination address of the data packet against its routing table.. As Node-H is not a part of Network-2, router-2 does not contain the destination address in its routing table, and therefore, the data packet is forwarded to Router-3.

Router-3 checks the destination address of the data packet against its routing table. As the destination address of the data packets matches the network address of Node-H, the router forwards the data packet to Node-H.

Above example, it is clear that the router is not only responsible for ensuring that the data packet reaches the correct destination but also in preventing the data packet from being sent to incorrect networks. Node Image represents a very simple scenario in which only one path exists between Node-A to Node-H.


Let's us consider a more complex network called Multiple Networks.


Multiple Routers

If Node-A Wants to send data to Node-I, multiple paths are available but only one of the paths should be selected. also, if the selected path poses difficulties, such as a router or link failure, the data should be diverted through an alternative path so that it reaches its destination. 

These considerations are described in the following sub topic.

Routing Mechanics

When multiple paths are available to transmit data across network, the most appropriate path is selected either by the source node or the router. If the source node selects the path , the process is called node-based routing. if the router determines the path, the process is called router-based routing.

The most appropriate path is usually the lowest-cost path. the cost of a path is determined by using metrics, such as number of hops, percentage of data loss, network traffic on that route. The network administrator specifies the metrics for a route. the lower-cost path is the route with the least metric value. At times, however, the network administrator may give importance to reliability in which case the most appropriate path is the most reliable path.


Node-based Routing

In node-base routing, the source node determines the path to be taken by the data packet to reach the destination node. This type of routing is also called source based routing. Before sending the data packet, the source node compares the inter-network address of the destination node against the entries in its internal routing table to check if the destination node is part of the same network. If the destination node is in the same network, the source node directly sends the data to the destination.

If the destination node is outside the network, the source node sends a packet to the destination node to trace the entire route. After obtaining the route information, the source node provides the entire path that should be taken by the data packet to reach the destination. In case of node-based routing, the routers perform a function similar to a bridge. The routers do not decide the path of the data packets but forward the data packets depending on the path information included with the packet.

As the source node needs to determine the different possible paths to the destination, and then select a path to be taken by the data packet, this form of routing increases network traffic. Also, this form of routing causes considerable delay in transfer of data packets because the source node needs to first determine the complete path before sending the data packet. Node-based routing is generally used to troubleshoot network problems, such as a router failure, in a network. "Node-based routing is supported only by TCP/IP networks. IPX/SPX networks do not support node based routing."


Router-based Routing

In this methods of routing, the source node checks if the destination node is present in the same network. If the destination is not in the same network, the source node forwards the data packet to the default gateway of the network, which is usually a router. The router then decides on the path to be taken by the data packet to reach the destination. The path is decided based on the entire in the routing table. 


**************
 Stay Home | Save Lives




Thanks a lot for reading!
Neel Kamal

What is Router and how it works What is Router and how it works Reviewed by Neel Kamal on January 30, 2019 Rating: 5

No comments:

For More Details Subscribe & Comment..!

Powered by Blogger.