Thursday, 14 February 2019

Hub, Switch, and Router: What is the Difference?

Hub, switch, and router are terms that are often used interchangeably. Have you ever wondered if there is any difference between them or are they all the same?

Let us find out the difference between hub, switch, and router in the following article.

Router, Switch, and Hub: Definition


The three devices router, switch, and hub are all different and can also be integrated into a single device at times.

Router:


A router is a device that forwards data packets along the network. It helps connects two networks, like two LANs, WANs or a LAN to its ISP network. The routers become gateways or places where two or more networks can be connected.

Switch:


A switch helps in filtering and forwarding packets between LAN segments. Switches can handle data as well as is aware of the specific addresses that help in sending messages. It can decide which device is the message sent to and will send the message directly to the correct device.

Hub:


A hub is used to connect segments of LAN. It contains multiple ports and when a packet arrives at a port, it is copied to other ports. This allows all the segments of LAN t see all packets and thus, a hub serves as a common connection point for devices connected in a network.

Difference between Hub, Switch and Router


Each device functions as a central connection for all the network equipment. It handles a data type called frames that carries data. When a frame is received it gets amplified before transmission to a port on the destination computer. The difference lies in the way the frames get delivered by the three devices.

A hub passes or broadcasts a frame on all its ports. It does not matter if the frame is destined for a single port. The hub cannot distinguish between which port a frame needs to be delivered. It is passed along all the ports till it reaches the destination port. This causes a lot of traffic on the network, leading to poor network speed.

In case of switch, it tracks the MAC addresses of all the devices connected. Using this information it can identify the system port. Thus, when a frame is received, it knows which port it is intended for and sends it there directly. This decreases the network response time and thus, allows users to access maximum amount of bandwidth irrespective of the number of transmitting computers.

Router on the other hand is a completely different device. It is connected to two networks called the two Local Area Networks (LAN) and Wide Area Networks (WAN) or it can be connected to LAN and its ISP network. They are located at gateways, a place where two or more than two networks are connected. With the help of headers and forwarding tables, routers use the best path to forward data packets. The router uses ICMP to communicate and configure the best path between any two hosts.

This is all about the difference between hub, switch, and router. A hub helps glue an Ethernet network segment, switch helps connect multiple Ethernet segments and a router can do both these functions as well as router TCP/IP packets between LAN and/or WANs.

References:

1.https://www.speedguide.net/articles/difference-between-routers-switches-and-hubs-2444
2.https://www.webopedia.com/DidYouKnow/Hardware_Software/router_switch_hub.asp
3.https://community.fs.com/blog/do-you-know-the-differences-between-hubs-switches-and-routers.html
4.https://medium.com/@fiberstoreorenda/do-you-know-the-difference-between-hub-switch-router-b74c2e8a8143

1 comment: