Hub |Switch |Router [Network Devices]
Hub | Switch | Router
In an Ethernet network, some networking devices play their roles at various levels such as hubs, switches, and routers. The functions of the three devices are all quite different from one another. Many people feel confused about the differences between the hub, switch, and router. Let us explore these networking devices.
What are Hub, Switch, and Router?
Hub
Hub is commonly used to connect segments of a LAN (Local Area Network). A hub contains multiple ports. When a packet arrives at one port, it is copied to the other ports so that all segments of the LAN can see all packets. Hub acts as a common connection point for devices in a network.
Switch
A switch operates at the data link layer (layer 2) and sometimes the network layer (layer 3) of the OSI (Open Systems Interconnection) Reference Model and therefore supports any packet protocol. LANs that use switches to join segments are called switched LANs or, in the case of Ethernet networks, switched Ethernet LANs. In networks, the switch is the device that filters and forwards packets between LAN segments.
Router
A router is connected to at least two networks, commonly two LANs or WANs (Wide Area Networks) or a LAN and its ISPs (Internet Service Providers) network. The router is generally located at gateways, the places where two or more networks connect. Using headers and forwarding tables, the router determines the best path to forward the packets. In addition, a router uses protocols such as ICMP (Internet Control Message Protocol) to communicate with each other and configure the best route between any two hosts. In a word, a router forwards data packets along with networks.
Hub vs Switch vs Router
In network equipment and devices, data is usually transmitted in the form of a frame. When a frame is received, it is amplified and then transmitted to the port of the destination PC (Personal Computer). The big difference between a hub and a switch is in the method in which frames are being delivered.
Get Madan Adhikari’s stories in your inbox
Join Medium for free to get updates from this writer.
In a hub, a frame is passed along or “broadcast” to every one of its ports. It doesn’t matter that the frame is only destined for one port. The hub has no way of distinguishing which port a frame should be sent to. Additionally, a 10/100Mbps hub must share its bandwidth with every one of its ports.
In comparison, a switch keeps a record of the MAC (Media Access Control) addresses of all the devices connected to it. With this information, a network switch can identify which system is sitting on which port. So when a frame is received, it knows exactly which port to send it to, without significantly increasing network response times. In addition, unlike a hub, a 10/100Mbps switch will allocate a full 10/100Mbps to each of its ports. So regardless of the number of PCs transmitting, users will always have access to the maximum amount of bandwidth.
Unlike an Ethernet hub or switch that is concerned with transmitting frames, a router is to route packets to other networks until that packet ultimately reaches its destination. One of the key features of a packet is that it not only contains data but the destination address of where it is going.
Comparison among hub vs switch vs router
Thank you for reading and stay safe! Happy learning.
![How to Reset / Recover Lost Root Password [ParrotOS]](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*_cXrThTDx0wpsB6nJeM2QA.png)







