Hubs versus switches

rw120555

Golden Member
Jun 13, 2001
1,263
0
0
Ok, here is an incredibly dumb question: I've read the Anandtech FAQ on Hubs, routers, switches, DSL, LANs, WANs...? But, I'm still unclear on the difference between a hub and a switch. The FAQ says

"Hub is a simple device, it has no differentiation capacity, and it is running all the info to all computers. To make the Hub more efficient a Switch was "invented". Switch is like a Hub that can organize the traffic between the computers, it sends the info only to the Intended computer. The result is more efficient network traffic."

Ok, so how exactly does this work in practice? For a small home network with 5 or 6 machines, are we talking about a switch saving a few microseconds here and there, or is it more substantial than that? Is a switch always at least as good as a hub (other than cost) or are there situations (besides cost) where I would want a hub instead? If the hub or switch will plug into a router, will the switch still provide any added benefit?

One possibility I envision is running a cable from my router to a hub/switch which then connects a wireless access point and a regular computer and/or a print server. I want the WAP for a new laptop while keeping my other computers cabled, and right now my router is at least one port short of being able to hook up everything I would like. Thanks. RW
 

sohcrates

Diamond Member
Sep 19, 2000
7,949
0
0
i can't think of a good reason why you'd want a hub instead of a switch off the top of my head

hubs have a problem with "packet collision"

yes, it's probably "microseconds" of difference, but it *does* add up

and with switch prices being so cheap these days, it's really silly to get a hub
 

Pheran

Diamond Member
Apr 26, 2001
5,740
35
91
A hub is essentially a fancy wire, and all the computers plugged into it are connected to this wire. Whenever any computer plugged into a hub transmits anything, it is immediately sent to all ports on the hub. Needless to say this sucks up everyone's bandwidth and can cause "collisions" when two systems are trying to transmit at the same time. When that happens both systems end up having to retransmit.

A switch is much smarter, it keeps track of which MAC addresses are plugged into which ports, and when one system transmits data destined for a certain address, it only forwards the data to the appropriate port. Of course broadcasts (ARP requests, DHCP requests, etc.) are still sent to every port. In addition, switches support full duplex operation which completely eliminates collisions, and potentially doubles you available bandwidth.

With the low price of switches these days, it really doesn't make any sense to purchase a hub. There is one case where a hub comes in handy. If you are trying to sniff traffic off the ethernet to troubleshoot something or analyze a protocol, a hub is nice because all the traffic gets sent to every port, so it's easy to sniff. A switch makes sniffing difficult, though some switches support "port mirroring" to alleviate that problem.
 

neopipil

Member
Feb 15, 2002
29
0
0
rw120555,

In a home network, using a hub as oppossed to a switch does not make much of a difference. It does make a difference in a large corporate or school network.

A hub is a dumb devise in that it doesn't know much about the network. For example: in a network of 4 computer, if you want to send data from computer A to computer B, that hub will send the data to all the computer on the network. The computer that the data is destined for will accept the data and all other computers will discard it.

A switch on the other hand knows the direct route between computer A and B. So, if you need to send data from computer A to computer B, the data will only be sent to computer B. A switch keeps tabs on the IPs for each computer, so it knows how to send the data directly to the computer it is destined for.

But as sohcrates wrote, switch prices are so cheap that you might as well go with the switch from the start. Recently, I purchased an 8 port Netgear switch for $40.00 after rebate.

I hope this helps.

neopipil

<EDIT>

Pheran has a better explanation of the differences between a switch and a hub.

</EDIT>





 

rw120555

Golden Member
Jun 13, 2001
1,263
0
0
Thanks everybody, this is extremely helpful. I probably would have just bought a hub not knowing any better. But now, I'll definitely go the switch route, when/if I get around to expanding my current network. I've actually got a HomePNA setup with a Netgear rp334 router, but the machines in the same room as the router could be easily switched to ethernet, plus I may want to get some more equipment. HomePNA is pretty good but I think ethernet would be at least a little better where I can use it. RW
 

chrisgm

Junior Member
Jun 7, 2002
3
0
0
I guess it is pretty clear switches are superior to hubs.
Only reason to use hubs today if you want to do sniffing on network. Hubs are brodcasting on every port what they recive, switches first look up the destination MAC and sends it only to that port. Simplified.
Cheers
 

GigaCluster

Golden Member
Aug 12, 2001
1,762
0
0
Originally posted by: neopipil
A switch keeps tabs on the IPs for each computer, so it knows how to send the data directly to the computer it is destined for.

I don't know if this was a temporary "brainfart"/typo or if you really think that, but I have to correct it: a switch does not use IP addresses to keep track of computers. It uses MAC addresses. A router is the one to use IP addresses to keep track of computers.
 

L3Guy

Senior member
Apr 19, 2001
282
0
0
I agree that switches are "good", no one has brought the hubs strengths to the party.

Hub Pro's.
Hubs have less latency than switches.
Collision detection forms a degree of flow control with a 2 to 1 situation.
Hubs are still cheaper than switches.

Switch Pro's.
Switches can be full duplex.
Switches have higher transfer rates in 2 to 2, 3 to 3 situations.

For a LAN party, switches are the best choice.
For 2 or 3 computers sharing an internet connection, its really a tossup.

Check out scottmac.net for some tests that Scott and I ran.

Doug
 

PeeluckyDuckee

Diamond Member
Feb 21, 2001
4,464
0
0
Switches provide an overall marginal benefit over hubs, depending on what kind of environment its put to use, and the network usage pattern. The more users/computers there are on the network, the more sense it makes to move over to a switch.

When there's lots of file sharing/transfers going on in the LAN, internet, online gaming and whatnot, a hub is not the best choice. Since the hub broadcasts the packets to everybody, with that much activity, there's due to be noticeable network performance degradation due to the amount of data broadcasting, collisions, and wait time in between going on. Is that a correct guess?

Sure there's a price difference between consumer grade hubs and switches, but the difference can be easily overlooked considering the benefits one gets out of a switch over a simple hub.

As I was taught, switches determine where to forward based on the MAC address and not the IP address, I believe that's what the router uses
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
Ideally, a switch would be used in a many-to-many (Clients / Resources) scenario, where the multiple concurrent connections between communicating pairs have the effect of (apparently) multiplying the bandwidth by giving each communicating pair a discreet, full-bandwidth circuit.

OR

The aggregate ingress bandwidth is equal to, or less than, the egress bandwidth (some statistical oversubscription may be acceptable). If you have two or more systems contending for the same "exit port," then the bandwidth of that port is essentially divided, just like a hub. If the "gozinta" bandwidth is the same or less than the "gozoutta" port, then there is no bottleneck. SO multiple 10meg connections in, with a 100meg port going out, is OK: several 100meg ports coming in, and one 100 meg port going out, no advantage. There may even be a negative thing here: if the switch accepted the packet to a buffer, and takes long enough to get through the switch, it may time-out and be dropped (so it gets sent again, just like a hub after a collision).

Many-to-many, or many (smaller) pipes in, one (or more) large pipes out: from a bandwidth efficiency perspective, these are the only scenarios where a switch outperforms the hub.

Remember, it wasn't THAT long ago (well, last century) that companies were feeding tens-to-hundreds of clients on a HUB running 10BASE-T (ala Bay 5000, 'Tron MMac, 3COM something-or-other....). USUALLY, the hub was segmented, and the segments ran through a switch or router....but i've seen companies with entire chassis-based hubs running all users from one segment (acknowledged: bad idea, but not uncommon).

For the vast majority of home users, none would be able to tell if they were running on a switch or hub. Switches make for better marketing...they sound so much "techier" than hubs....toss in a little marketing math (!!! 200MegaBits of bandwidth !!!) ...it's an easy sale.

Smart people are the easiest to sucker...ask any magician or con man (or marketing person, for that matter)...

FWIW

Scott

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |