Should I use a network hub or network switch?

10

1

I want to put a networking device on an Ethernet connection between 2 digital devices. The communication will be 1-to-1; there will only be 2 devices connected through the networking device. And I wont need DHCP or firewalling (for now).

I've already got a network hub, but I've heard that a switch is better, since using a hub means risking packet collisions.

Can I use a network hub to connect my 2 devices, or will I need to use a network switch if I want to avoid collisions? And will a hub give me other trouble that are prevented with a switch?

Martin Bøgelund

Posted 2009-07-16T09:57:04.877

Reputation: 827

1Where you can even find hubs nowadays? :) – raspi – 2009-07-16T12:44:10.103

1@raspi - I think you can only find new ones if they are surplus. For the most part, the cost to make a switch dropped so much that hubs aren't being made any more. However, that said, if you have one sitting around, why not use it and save the money? – anonymous – 2009-07-16T13:18:57.340

@raspi, I found one in a box in my shed :-) – Martin Bøgelund – 2009-07-17T10:48:07.303

Answers

12

With just two devices, a hub is sufficient.

When you have just two machines to connect, why the network device? go point-to-point.
I am guessing you want to connect more devices later.
Collisions will matter at that time then (and you cannot go PtP then either).

These days switches and hubs do not have a lot of cost differential.
You might in fact get a switch faster and for about the same price.
Anyway, you have the answer.

nik

Posted 2009-07-16T09:57:04.877

Reputation: 50 788

Yes, you are right in that I might want to connect other devices later. I have the opportunity to get some none-trivial wiring done for free in my house. Splitting it all up with a hub will mean less new wiring at full price in the future, if I choose to extend my network. Thanks for your answer! – Martin Bøgelund – 2009-07-16T10:39:40.267

1@Martin as long as you place the hub in a good location, you should be able to upgrade to a switch at a later date. – Brad Gilbert – 2009-07-16T14:54:22.403

9

I think with just two devices, a cable is sufficient. If none of the devices has Auto-MDIX you'll need a crossover cable.

Ludwig Weinzierl

Posted 2009-07-16T09:57:04.877

Reputation: 7 695

1Auto-MDIX link broken, remove final slash. – hyperslug – 2009-07-16T13:15:23.300

What I find interesting is I have a Linsys switch that apparently supports that, but still has an uplink port. – Brad Gilbert – 2009-07-16T14:56:40.373

4

If you've only got two devices, why not just use a crossover cable? Some ports will even auto-switch Rx & Tx in hardware, meaning you could just use a plain old CAT-5 cable. It's worth trying that first; you may not need to buy anything.

moobaa

Posted 2009-07-16T09:57:04.877

Reputation: 654

I don't need to buy anything if a hub is sufficient, since I've already got an old one lying around. – Martin Bøgelund – 2009-07-17T10:44:36.783

2

Aight, so the problem here is not "use a box vs. use a crossover cable", it's switch vs. hub, and the answer is always switch when you can afford it. A Hub is always half-duplex, and simply acts as a repeater. The resulting packet collisions, even with only 2 devices, will make it slower than simply using a cable, whereas a switch intelligently directs traffic based on the Ethernet address, and is full duplex, resulting in full speed between any devices on the network at the same time.

Jeremy Sturdivant

Posted 2009-07-16T09:57:04.877

Reputation: 2 108

The catch is that it depends upon which direction the traffic is flowing. If you are primary going from A to B then the hub should be fine, even when moving big files. If you are going back and forth between A and B for larger files then the switch is going to save some headaches in terms of the slow network speeds. – anonymous – 2009-07-16T13:11:49.837

I've seen it where if the connection is in half-duplex, that some protocols don't even seem to work. – Brad Gilbert – 2009-07-16T14:57:44.817

2

People are correct in saying a hub is sufficient, but give the minor cost difference I would go with a switch. Switches are more efficient when you have multiple device on the network. You might not see any difference now, but it could help in future.

Jim C

Posted 2009-07-16T09:57:04.877

Reputation: 1 748

1

A switch is necessary if the ethernet ports have different speeds. It's quite likely that the faster port will downgrade to the speed of the slower port, but why take the chance?

Mark Ransom

Posted 2009-07-16T09:57:04.877

Reputation: 2 010