Switches & Hubs, What's the difference?

I need some help from the techies out there. We are going to upgrade the server at work and we use Linksys 10/100 ethernet hubs to hook everything together. (Not a large LAN, we have 15 nodes). Somebody told us that we should be using switches instead of hubs. What’s the difference between a hub and a switch? And should we switch to switches?

Thanks for any help you can provide.
ben

A hub is a multi-port repeater, a switch is a multi-port bridge. The implications are obvious.

Seriously, a hub is a method for sharing the transmission media - i.e., only one station can transmit at a time, and when two or more stations try to transmit at the same time, it leads to a collision that necessitates retransmitting the data. This isn’t a bad thing, Ethernet is designed to work this way.

But when the load increases, so does the number of collisions and then you might run into capacity problems.

A switch, OTOH, offers the full media bandwidth to each station, and moves the data frames between ports over an internal backplane with much higher capacity.

To make it even more efficient, you get rid of those pesky collisions and can use your NICs in full-duplex (i.e., transmit and recieve at the same time), adding even more performance.

And finally, you can mix transmission speeds in a switch, if that tickles your fancy.

Most modern installations use switches, and if you’re experiencing load issues, it would be a good investment. If you’re not, I’m a firm believer in leaving well enough alone.

S. Norman, CCNP/CCDA

Hubs are basically just repeaters. Everyone connected to a hub is using the same bandwidth, so as you get more systems on there, there’s more chance for packet collision, making the network less effective.

A switch on the other hand is essentially connecting each port as needed, so you don’t get that collision. If you have two pairs of computers talking to each other on a switched network, they can both take advantage of the full bandwidth, but on a hub network, they’ll be taking from the same shared pool.

Imagine trying to have a conversation in a crowded room, vs many pairs of people having conversations in smaller rooms.

Should you switch to switches? If you plan to grow, or use your full bandwidth capacity, yes.

Note that you can do full-duplex with some hubs, so a switch may not be needed for that. Ditto modern hubs are auto-detecting on speeds so that as long as the NICs on both ends can handle the speed, the hub doesn’t care.

I have to admit that I’ve never come across a full-duplex hub - how do the NICs distinguish between a collision (TX/RX pairs active at the same time) and FD operation (same thing)? I’d love a link to a product, just for curiousity’s sake.

(Mismatched FD/HD can, annoyingly, kind of sort of work after a fashion, but performance will suck mightily. A FD NIC attached to a HD port will lead to a huge number of collisions.)

And while a hub shouldn’t care whether it runs 10 or 100 Mbps, it shouldn’t be possible for it to mix those two speeds in the same collision domain.

Some ports at 10 and some at 100 (or higher) is switch territory. (Some hubs come with a built-in bridge that’ll handle different speeds, but then they’re hybrids, not proper hubs, again, IMHO.)

Whew! Geek Factor Overload!

What everyone has said so far is spot on correct although it might fly over the heads of our non-geeky readers.

For a hub on your network imagine a bucket with 15 hoses dangling off of it. If you pour water into the bucket water will travel down all 15 hoses. A hub works similarly. Data sent by the server is received by ALL stations hanging off of the hub. Only the station that wants the data responds but you have effectively filled every wire (or hose) with data…even to machines that don’t want it. This effectively reduces the available bandwidth you have to your server…15 people are sharing a single wire in effect (even though it looks like 15 separate wires). This setup also has some security implications since on a network with a hub I could attach a sniffer and see all traffic across that network segment. In simpler terms I can scan for poasswords and data more easily as it all essentially arrives at my PC regardless of its intended destination.

A switch, on the other hand, effectively puts a valve on each of your 15 hoses leaving your bucket. When water pours in the switch knows which hose the water was requested from and only opens that valve. As a result the otehr 14 hoses are empty and those people can send water back up the pipe without waiting for your water to finish being delivered. This in essence gives you full bandwidth to the switch. Your 100Mb pipe is all yours. The only data on that line is data you send or request (actually there is some other info that cruises a network such as advertising protocols but we’ll ignore those for the moment). The switch then gathers all the info it is receiving and routes it down the appropriate pipe. In fact, the line between a router and some of the more advanced switches (Layer-3) is a pretty thin one.

Speaking of that if you REALLY want to geek out look into the Layer-3 switches. They allow fairly deep fiddling with the routing and priority of information within a network although I’d say they are major overkill for a 15 person network.

Bottom line – if it ain’t broke don’t fix it. Hubs are probably fine for a 15 person network unless you have some serious data movement across your network (e.g. large video files). If you notice sluggisheness on your network look for collisions happening on your hub. It probably has a light that flickers for this. It is normal for it to flicker but if it seems to be staying on a lot more than it is off you might consider moving to switches (I once had a NIC go haywire on my network and turn into such a chatty-Cathy that my hub’s collision light was solid on…essentially making the network unavailable for everyone else).

Spiny Norman, did some Googling and while there are indeed several references to hubs that are full duplex, reading further revealed that most such refs. to actual devices are switches and/or routers. I.e., there is no official standards of such terms. And some discussion pages make it clear that people would prefer that “full duplex means it’s a switch” be the adopted terminology. Thanks for clearing that up.