# Hub
## What is a Hub
A hub is a basic network device that operates at the Physical layer of the OSI model. It is used to connect multiple devices in a local area network. A hub has multiple ports, and any device that sends data to the hub receives the data from one port, and the hub retransmits that data out of all other ports simultaneously. This broadcasting behavior means that every device connected to the hub receives every packet, regardless of which device the packet is addressed to. Each device must then examine the destination address in the received data and either process it if the address matches its own or discard it if the address does not match.
## How a Hub Works
When Device A sends data intended for Device B, the data enters the hub through the port where Device A is connected. The hub makes no attempt to determine where Device B is located or which port it is connected to. Instead, it simply sends the data out through all other ports. Devices B, C, D, and all other connected devices receive the data simultaneously. Device B accepts and processes the data because the destination address matches its own. All other devices discard the data.
## Problems with Hubs
Because all devices on a hub share the same bandwidth, adding more devices reduces the available bandwidth per device. The hub creates a single collision domain, meaning that if two devices transmit simultaneously, their signals collide and both must retransmit, wasting bandwidth. This problem worsens as the number of devices increases. The broadcasting of all traffic to all ports is also a security concern because any device connected to the hub can capture all traffic on the network using a protocol analyzer.
## Hubs vs Switches
Hubs have been almost entirely replaced by switches in modern networks. A switch is a more intelligent device that learns which devices are connected to which ports and sends data only to the intended recipient rather than broadcasting to all ports. This dramatically improves network performance and security. Hubs are now considered obsolete technology and are rarely installed in new networks. They may still be found in very old network installations.Back to Subject