Hubs are not Switches

A hub is a network equipment with several interfaces (also called ports, not to be confused with TCP or UDP ports since these are physical ports where you can connect cables). You can connect computers, printers, routers etc to those ports using network cables and they will be able to communicate with each other.

hub-8-ports

A lot of people confuse Switches and Hubs and mistakenly call their Switches “hubs”. Let’s start by simply saying that switches and hubs work in completely different ways. Hubs are antique legacy devices that no longer belong in any computer network. Switches, on the other hand, are modern day devices.

Why do we even mention hubs in this guide then? There are still a few hubs to be found out there in the world. Also, hubs serve as a great introduction to switching, because by using hubs in our examples we can showcase several fundamental networking principles that relate to switching. Last but not least, since people sometimes still use the word “hub” when they talk about switches, why not start off by clarifying the differences?

All a hub will ever do is to copy electrical signals that are entering one port to all other ports. So whatever a computer sends into the hub will be copied by the hub to all other devices on every other port.

This means that a hub is completely unintelligent. It doesn’t care about network traffic or addresses at all. All it does is to copy electrical signals. Hubs are more or less never used these days, and you can barely buy them in stores.

One problem with a hub is that many messages that a computer sends out are meant for just one single receiver. But if the computer sends that message into a hub then the hub will copy the message to every other connected computer. So not only does the intended recipient receive the message, all other computers must listen to the message too.

Network communication through a hub

It is then up to each computer to evaluate the destination address of the packet to see if the message was intended for them or not. If the message was intended for another recipient then the computer must throw the packet away. This leads to a lot of unnecessary work for all involved computers and much of the network traffic on the network is thrown away because it ended up at the wrong destination.

Another huge downside of hubs is that they are very limiting to the network communication. Only one computer can talk at a time through a hub. When one computer is talking every other computer must stay completely silent. This is because the electrical signals of multiple computers that talk simultaneously will mix together in the hub, creating disturbances to the signals so that neither signal can be interpreted.

If two computers talk at the same time a collision occurs. When this happens all computers will notice the disturbances and must stop talking for a while before trying again. This also makes a hub really slow. Only one device can communicate at a time, and when a collision accidentally occurs every device must be silent for a while.

Collision in a network hub

The more computers you connect to a hub the bigger the risk gets for collisions to happen since more involved devices will indirectly compete with each other for the available communication time slots.

It is commonly said that with a hub all computers are sharing the available bandwidth. In practice, the bandwidth situation is even worse than just shared. If four computers are connected to a 100Mbit hub and if all computers want to communicate then each computer will end up getting less than 25Mbit bandwidth. This is because it is necessary to have some quiet time between each communication. Also, any collisions that do happen will interrupt the traffic flow for a while.

It is called Half Duplex when only one device at a time can communicate on a network. If more than one device can talk at once it is called Full Duplex.

  • A hub is always Half Duplex, so only one device at a time can communicate.
  • A switch can handle Full Duplex communication, so multiple computers can talk with each other simultaneously through a switch.

If you have a hub at home you should really consider swapping it for a Switch instead. The cost is small but the difference in performance is often huge and will be noticeable right away.

Often the equipment says on the label if it is a hub or a switch. But since Hubs and Switches have basically the same physical appearance you might have to google the model name to find out unless it says right on the device what type of equipment it is.

Previous part:
Switching

Next part:
MAC addresses