A hub in computer networks is a device that connects multiple computers or other network devices together in a local area network (LAN). It acts as a central point through which data is transmitted. When a data packet arrives at one port of the hub, it is copied and sent out to all other ports, allowing all devices connected to the hub to receive the data.

2022_09_Understanding-Break-Statement-in-C-23.jpg

Hubs do not analyze or manage the data they transmit; they simply broadcast it to every connected device. Because of this lack of intelligence, hubs can lead to increased network traffic and collisions, which is why they are less common today compared to switches and routers.

Table of Contents

What is Hub in Computer Networks?

Hub is a networking device that operates on the physical layer i.e. the 1st layer of the OSI model, unlike switches that operate in data link layer. Hub connect multiple devices to itself that send and receive data through it. It is a multiport repeater that comes with add-on functionalities, such as indicating any issues with the device. They come in different variants such as 4, 8, and 16 port hubs. 

Hub is a device that works as a central connection among all network equipment and handles a data type called frames. It is connected to multiple devices that allow forwarding. Any data coming from one of the connected devices in the hub can be forwarded to another connected device.

How Does a Hub Work?

A hub is a network device that consists of multiple ports. Each port can connect one device. Multiple devices get connected to the hub through these ports. A connected device, say 1, sends the frame (sender). This frame will be delivered to all the connected devices (receivers), say 2,3, and 4 in this case. 

Suppose devices 1 and 2 simultaneously send frames/frames to the hub. Due to this, frames often crash. N number of collision domains are possible in the hub, where N refers to the number of devices connected to the hub. Whenever this collision occurs, the host that has sent the frame will detect it. The sent frames are destroyed, and the host sends a jam signal for other hosts to wait. The waiting period is different for each host to avoid any further collision. 

Working of Hub

 

Although the frame is sent to all ports, a connected device only accepts those frames or frames whose MAC matches the destination MAC address field. The rest of the frames are discarded by that device. 

Must Explore: