Hubs and switches are different types of network equipment that connect devices. They differ in the way that they pass on the network traffic that they receive.
The term ‘hub’ is sometimes used to refer to any piece of network equipment that connects PCs together, but it actually refers to a multi-port repeater. This type of device simply passes on (repeats) all the information it receives, so that all devices connected to its ports receive that information.
Hubs repeat everything they receive and can be used to extend the network. However, this can result in a lot of unnecessary traffic being sent to all devices on the network. Hubs pass on traffic to the network regardless of the intended destination; the PCs to which the packets are sent use the address information in each packet to work out which packets are meant for them. In a small network repeating is not a problem but for a larger, more heavily used network, another piece of networking equipment (such as a switch) may be required to help reduce the amount of unnecessary traffic being generated.
Switches control the flow of network traffic based on the address information in each packet. A switch learns which devices are connected to its ports (by monitoring the packets it receives), and then forwards on packets to the appropriate port only. This allows simultaneous communication across the switch, improving bandwidth.
This switching operation reduces the amount of unnecessary traffic that would have occurred if the same information had been sent from every port (as with a hub).
Switches and hubs are often used in the same network; the hubs extend the network by providing more ports, and the switches divide the network into smaller, less congested sections.
When Should I Use a Hub or Switch?
In a small network (less than 30 users), a hub (or collection of hubs) can easily cope with the network traffic generated and is the ideal piece of equipment to use for connecting the users.
When the network gets larger (about 50 users), you may need to use a switch to divide the groups of hubs, to cut down the amount of unnecessary traffic being generated.
If there is a hub or switch with Network Utilization LEDs, you can use the LEDs to view the amount of traffic on the network. If the traffic is constantly high, you may need to divide up the network using a switch.
When adding hubs to the network (to add more users), there are rules about the number of hubs you can connect together. Switches can be used to extend the number of hubs that you can use in the network.