What is the difference between a router a switch and a hub?

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

Post Reply
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

What is the difference between a router a switch and a hub?

Post by Kozak »

In my house every floor has a router which habitants can plug their network cables into and ultimately connect to the internet.

Now one floor has a router which has to few slots so we want to extend it. Now should we buy another router with more slots or a hub or a switch. I have no idea what the difference is. They both can connect computers so they can share hard drives etc. Can anyone explain it to me?
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

First hit on google with "router switch hub":
http://www.practicallynetworked.com/net ... _types.htm
I think you'd only have to buy a switch since you only need one router to "compress" your LAN into the single connection you're given from your ISP.[/url]
Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post by Andy_J »

Yes, you should only need one router for what you're trying to do. Everything else should be a switch (if you want fast file transfers) or a hub (if you're pressed for cash). Really, switches aren't much more expensive than hubs anymore, so just go get a switch.

For those that are interested, switches only send data to the port the device it's destined for is on. A hub sends all data out on every port.
ImageImage
Image
currahee
Calc Wizard
Posts: 659
Joined: Mon 20 Dec, 2004 4:00 am
Location: My Computer/Someone else's computer
Contact:

Post by currahee »

Hub> Basically something like a router but basically becomes a cluster of computers
Switch> Makes sure data is sent to a specific computer rather than broadcasting data
Router> Basically a Hub, on a more central scale.
"Not long ago, the Black Gate of Armonk swung open. The lights went out, my skin crawled, and dogs began to howl. I asked my neighbor what it was and he said, 'Those are the nazgul. Once they were human, now they are IBM's lawyers.'"
Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post by Andy_J »

No... Routers are MUCH more complicated than hubs. They examine EVERY packet to figure out what to do with it. The ENTIRE packet, not just the data link layer destination MAC. Switches just examine the data link destination. Hubs do NO examination whatsoever.
ImageImage
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Router - Routes traffic based on the information it collects. A router will make quick and effective decisions as to what lines get what data.
Switch - Switches traffic independantly. Basically it gives every line its own turn to avoid collisions.
Hub - Simply expands a single line across more lines. Kind of like a double-adapter for a power outlet. The problem with these is that on high traffic lines collisions can be a problem.

My recomendation is to get a switch. The switch will provide you with more lines and it will be able to organise traffic so that collisions are minimal. Like andy said, you really only need 1 router ... the rest can be switches.

That reminds me, ive been meaning to buy a switch for a while :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Before anybody else goes on with even more refined explanations, just visit the posted link.
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post by leofox »

routers are for networks without server (the internet connection goes to every computer through the router)
switches are for networks with server (the server is connected to the internet, and passes it through to the other comps)

hubs are crap devices from 10 years ago which you shouldn't use. Most shops don't sell them anyway.
Image
Image
Shawshank87
New Member
Posts: 36
Joined: Thu 30 Dec, 2004 5:43 pm
Location: Roanoke, Virginia
Contact:

Post by Shawshank87 »

hub - Simpe network devide that sends incomming data out every port. Because of this, they are the cheapest to make, and the fastest of all of the networking devices. However, since no logical decisions are made, it is possible for the data signals to collide, creating a small delay while spanning tree protocol cleans the wire.

switch - makes decisions based on the MAC address. This is the physical address that all devices connected to a network have (on the computer it is usually a NIC). Since this device makes decisions based on addresses it takes a very slight bit more time. However it still makes decisions using hardware, meaning nothing is really interpretted other than the address. It is capable of creating virtual LANs which allow collisions to be eliminated nearly completely (unlike hubs.)

router - programmed to make decisions based on IP addresses. Because of this it is MUCH slower than the previous two. It uses SOFTWARE to make decisions, meaning (as posted earlier) it examines much more of the data (though not all the data.) Should be used only on the border of a network to keep unnecissary network traffic and to allow multiple protocols to be used.

My advice is to put your esisting router at your primary connection (to use as a firewall to the internet) and then connect that to a switch. Then connect all of your computers to a switch. This will give you a secure network with few collisions and high transfer speeds. if you connect computers directly to a router, it is a waste of money and speed. Your house shouldnt need more than one router, so just sell me one : ). I'm a certified CISCO networker by the way. Sorry if I come of arrogant, but it's what i do :).
Try your hand at turn based war strategy on your TI-83/Ti-83+ with Catch 22. Download now:
http://www.ticalc.org/archives/files/fi ... 35508.html

Project Cartel Details:
http://calcwebzine.com/index.php?option ... mid=0&id=8
Post Reply