Open In App

Difference between Hub, Switch and Router

Last Updated : 23 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

In computer network it is very important to understand the difference between devices like hubs, switches, and routers. These devices play an important role in how data is transferred across networks, affecting everything from speed and efficiency to security. In this article we will see basic differences between these devices, how they work within the OSI model, and where their use cases are applicable.

connectivity devices


What is Hub?

A Hub is just a connector that connects the wires coming from different sides. There is no signal processing or regeneration. It is an electronic device that operates only on physical layers of the OSI model.

It is also known as a repeater as it transmits signal to every port except the port from where signal is received. Also, hubs are not that intelligent in communication and processing information for 2nd and 3rd layer.

What is Switch?

Switch is a point to point communication device. It operates at the data link layer of OSI model. It uses switching table to find out the correct destination.

Basically, it is a kind of bridge that provides better connections. It is a kind of device that set up and stop the connections according to the requirements  needed at that time. It comes up with many features such as flooding, filtering and frame transmission.

What is Router?

Routers are the multiport devices and more sophisticated as compared to repeaters and bridges. It contains a routing table that enables it to make decision about the route i.e. to determine which of several possible paths between the source and destination is the best for a particular transmission.

It works on the network layer 3 and used in LANs, MANs and WANs. It stores IP address and maintains address on its own.

Difference between Hub, Switch and Router

Hub

Switch

Router

Hub is a physical layer device i.e. layer 1. Switch is a data link layer device i.e. layer 2. Router is a network layer device i.e. layer 3.  
A Hub works on the basis of broadcasting.Switch works on the basis of MAC address.A router works on the basis of IP address.
A Hub is a multiport repeater in which a signal introduced at the input of any port appears at the output of the all available ports.A Switch is  a tele-communication  device which receives a message from any device connected to it and then transmits the message only to the device for which the message is intended.A router reads the header of incoming packet and forward it to the port for which it is intended there by determines the route. It can also perform filtering and encapsulation.
Hub is not an intelligent device that may include amplifier on repeater.A Switch is an intelligent device as it passes on the message to the selective device by inspecting the address.A route is more sophisticated and intelligent device as it can read IP address and direct the packets to another network with specified IP address. Moreover routers can built address tables that helps in routing decisions.
At least single network is required to connect.At least single network is required to connect.Router needs at least two networks to connect. 
Hub is cheaper as compared to switch and router. Switch is an expensive device than hub.Router is a relatively much more expensive device than hub and switch.
Speed of original hub 10Mbps and modern internet hub is 100Mbps.maximum speed is 10Mbps to 100Mbps.maximum speed for wireless is 1-10 Mbps and maximum speed for wired connections is 100 Mbps.
Hubs are used in LANs.Switch is used in LANs.Routers are used in LANs, MANs and WANs.

Conclusion

Thus, all the networking devices do a similar core task of connecting the devices, done in a vastly different way: the mere operation of a hub is done on the physical layer, while the complex operations of switches and routers are realized through the data link and network layers, respectively. Therefore, having knowledge of these differences can become quite important if performance needs to be enhanced for proficient communication of data in the network.


Next Article

Similar Reads