Open source software security

Hubs And Switches, What's the Difference?

30 November -0001
March 20, 2003

My company recently had a problem with our deployment of an Oracle application. We were having a lot of time outs and hanging user sessions. After a lot of head banging we called in an Oracle consultant to help us out. He did a really thorough investigation of our network architecture and finally concluded that the problem we were having was a bottleneck in our LAN communications caused by a hub. All our Oracle servers were connected via 10/100 cat 5e ethernet cable to a single hub and from there on to our Cisco router and our T1. Well, it seems the hub was causing the bottleneck and we needed to replace it with a switch. Bear in mind that as with any system, the cheapest component is always the most likely culprit in a problem situation. The $80,000 Oracle application was failing because of a $40 piece of plastic (the hub). After replacing the hub with a switch our application performance increased dramatically. This highlighted for me the need to understand the difference between a hub and a switch.

Often when setting up a network, especially a home LAN, little thought is giving to whether to use a hub or a switch in the architecture. Both look exactly the same and the only way to tell the difference is to know what you're looking for. For instance, a Netgear 8 port hub looks exactly like a Netgear 8 port switch. The only way to tell the difference is to look at the label painted on the top of the box (one says hub, the other says switch) and the price difference. Switches are more expensive than hubs, and there is a reason why.

In a nutshell, a hub functions like a water pipe. In a four port hub you have three computers and one uplink sharing the hub. If one computer begins to talk to another computer, its signal is sent to the hub, and broadcast to all the hub nodes (the other computers and the router uplink) until the signal finds its target, then it communicates with the target. The problem is that a hub only has a certain amount of capacity, so if another computer begins a download from the internet, that communication will impact the other two computers ability to communicate with one another. The hub only has so much capacity, and it must be shared by all the communications across it.

A switch is like an old operator sitting at a switch board. When two nodes on the switch want to talk the switch creates and exclusive connection between them. This means that if two of your four nodes are communicating with one another and the third node begins a download from the internet, the communications are all kept separate and the download will not affect the LAN communication. Switches also limit broadcast information which is a security bonus. On a switch, a packet sniffer will not work since the computers all establish direct connections to their targets and other computers cannot listen in to the traffic. Switches also usually support full duplex communications meaning the computer can upload and download at the same time without causing collisions.

All in all a switch is a much better decision on your LAN architecture. Not only will you get a speed boost, but also you'll get some added security as a bonus. Switches will cost more than hubs, but with the price of networking gear in general falling, you should be able to justify the extra cost. You can buy small 4 port switches from SOHO vendors like Netgear and LinkSys easily at all sorts of online vendors (I recommend, although if you're looking for more enterprise level solutions you may want to consider higher end providers like Cisco or 3com.