A hub serves as a central point to which all of the hosts in a network connect to. It is an OSI Layer 1 device and has no concept of Ethernet frames or addressing – it simply receives the signal from one port and sends it out to all other ports. Here is an example 4-port Ethernet hub (image source: Wikipedia):
As mentioned above, hubs have no way of distinguishing out which port a signal should be sent to; instead, an electrical signal is sent out each port. All nodes on the network will receive data, and the data will eventually reach the correct destination, but with a lot of unnecessary network traffic:
In the example above you can see that the hub has sent out the receiving signal out all other ports, except the incoming port. Hubs are therefore considered obsolete and switches are commonly used instead in modern LANs. Hubs have numerous disadvantages over switches, such as:
- they are not aware of the traffic that passes through them
- they create only one large collision domain
- a hub typically operates in half duplex
- there is also a security issue with hubs since the traffic is forwarded to all ports (except the source port), which makes it possible to capture all traffic on a network with a network sniffer!