router, hub, and switch

91.3% uncensored free-for-all (see, no false advertising here)
Post Reply
User avatar
Xtizu
Meat Sock Puppet
Posts: 1174
Joined: Sat Dec 21, 2002 11:57 pm
Contact:

router, hub, and switch

Post by Xtizu »

okay i need some advice. and i know i am in the wrong place to get good advice but hell i'll do it anyway. i need a new hub. what i need to know is wich of the subject items gives bandwidth to the computer that requires it, witch one gives both computers an equal amount of bandwidth and wich is the least expencive.
SHAKEImageSHAKE I has a tubes!
Bahd Zoolander
Grand Inspector Inquisitor Commander
Posts: 2636
Joined: Fri Dec 20, 2002 9:42 pm

Post by Bahd Zoolander »

You want a switch. They're all about the same for a basic cheap one. All you'll need to know is how many ports you want, and if you want a 10/100 or 10/100/1000. If you don't have two devices with gigabit network cards then either will do, and 10/100 is generally cheaper.

If you're not in a super hurry to buy one you can watch http://www.dealnews.com and http://www.bensbargains.net and there's usually a good deal that comes through every few days.
Bahd Zoolander - Transcendent - On Vacation
Bahd Zoolander
Grand Inspector Inquisitor Commander
Posts: 2636
Joined: Fri Dec 20, 2002 9:42 pm

Post by Bahd Zoolander »

Here's a good deal if you don't mind waiting for rebates and have an office depot near you to avoid shipping.

http://dealnews.com/articles/78797.html
Bahd Zoolander - Transcendent - On Vacation
User avatar
Xtizu
Meat Sock Puppet
Posts: 1174
Joined: Sat Dec 21, 2002 11:57 pm
Contact:

Post by Xtizu »

oh sorry, forgot to add the ? at the end.
User avatar
SicTimMitchell
E Pluribus Sputum
Posts: 5153
Joined: Fri Dec 20, 2002 1:05 pm
Location: Minneapolis, MN
Contact:

Post by SicTimMitchell »

Hubs are least expensive. I mean, you can buy hubs in plastic bubbles at Walgreens.

But it depends on what you want to do.

If you want to hook several computers up to a DSL line and other devices, for example, you want a router and a hub (most routers only have 3 or 4 ports.). I don't see why you'd want a switch for something like that.

Actually, someone could explain to me under what circumstances you'd pick a switch over a hub. Seriously, I'm ignorant there.
Bangzoom
94 Ranger of Karana
Veteran Crew, through and through
_______________________________________________________________________________
Klast Brell
Sublime Prince of teh Royal Sekrut Strat
Posts: 4315
Joined: Fri Dec 20, 2002 11:17 am
Location: Minneapolis MN

Post by Klast Brell »

Ddrak
Save a Koala, deport an Australian
Posts: 17517
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Post by Ddrak »

The terminology has become so bastardized lately that it's tough to determine which is which. Technically a router doesn't necessarily come with the line sharing capability but common usage has now warped it into something that does. Many off the shelf hubs are actually switches - I was surprised to find both of the hubs I bought in the last 3 years were. To clear things up, some definitions:

Hub: Your basic ethernet repeater. Anything that goes in one channel gets retransmitted on all the other channels. Usually comes with an "uplink" port to connect to another hub/router/switch with a standard cable rather than having to use an uplink (or crossover) cable to do it. Hubs don't understand TCP/IP - they just see ethernet packets of any sort and send them on.

Switch: Like a hub, but is intelligent enough to know which packets it needs to send to which ports rather than blindly retransmitting everything. Switches also do not understand TCP/IP - they just know which cards are plugged into which ports and work at the ethernet level.

Router: The next step up from a switch. Routers understand TCP/IP (well, just plain IP actually) and intelligently transmit IP packets to the various interfaces based on it's knowledge of the local IP network setup. Commonly, routers these days have functionality built in to allow multiple machines to connect to the internet over a single IP address.

You'd deliberately choose a switch over a hub if you have a bunch of computers that all are using a lot of bandwidth and you don't want the traffic from each one of them to interfere with the others if you really didn't want it to.

You can determine if your hub is really a switch by trying to sniff network traffic between two other computers talking through the device using a program like Ethereal. If you can't see the traffic then it's a switch.

If you are a geek, hubs and switches are layer 2 devices while a router is a layer 3 device.

Dd
Wynnreaver
I am Jack's total lack of ovaries
Posts: 312
Joined: Mon Dec 23, 2002 10:23 am
Location: Sterling, VA
Contact:

Post by Wynnreaver »

I deal with switches every day, and would suggest those for when you're using not only multiple "AS's" but also have your routing split up into different rid/mid's (for frame, for IP, I don't know). Switches are useful for geographically different location hookups, not just WAN's/MAN's. I don't think you'd ever want a "switch" persay for home use, just a hub should do. Check with Ick too, shoot him a pm or something :)
Wynnreaver Kithmare (old school player)
"Drugs have done a lot of good for people, don't believe me? Do me a favor, go home, take all the records and all the tapes and burn them. Why? Because the people that made that music that was so influential to your parent's lives, were reeeeeeaaaal fucking high on drugs"--Bill Hicks
Grygonos Thunderwulf
Druish Princess
Posts: 780
Joined: Fri Dec 20, 2002 3:22 pm

Post by Grygonos Thunderwulf »

Wow Dd..had to pull out my Tanenbaum book to remember which was which. And If there was a device that could understand TCP as well it would layer 4 right? just need to re-read the Tanenbaum sometime :/
Ickhor
Grand Master Architecht
Posts: 406
Joined: Fri Dec 31, 2004 10:11 pm

Post by Ickhor »

Yes,

A router is a layer three device, a switch is a layer two device, a hub is a layer one device.

TCP is a layer four protocol.


Simply put:

The job of a hub is to read an electronic signal, and regenerate it. A hub is a multiport repeater. It cannot tell frames apart, it works completely on electronic signals. (Layer 1: Physical Layer)

The job of a switch is to do basically the same thing as a hub but instead of regenerating the signal everywhere it only regenerates the signal where it needs to go. To accomplish this it parses layer 2 headers and records mac addresses with physical ports. In doing so it has to operate at the Data-Link layer, so therefore it's a layer two device. It does not read electronic signals, it reads frames.

The job of a router is to connect two networks together. So it needs to know more than just mac addresses, it needs to know addresses of networks. (Think of an IP address as an address of a network, thats what it really is for the most part -- An address of the network, and an identifier to tell the machinery at the other end what host inside their network the package is sent for.) Obviously, it has to operate at layer three, and doesn't especially care about layer 2 or 1.
Ickhor
Grand Master Architecht
Posts: 406
Joined: Fri Dec 31, 2004 10:11 pm

Post by Ickhor »

Also, I would reccomend against getting a hub at all costs. Most hubs that you buy nowadays are actually switches, by the way.

Most people believe that the switch was invented for security purposes, so that people could not read each others email, etc. This is simply not true. The switch does slightly help in that regard, but it is by no means a device designed for security, it's designed to optimize bandwidth by preventing collisions. I'll talk more about this after explaining just where the switch came from.

Modern networks have this feature called CSMA/CD, which means "Carrier sensing multiple access with collision detection."

Lets say we have tow devices within the same collision domain meaning that they share a logical medium, a simpler explanation is that they see each others traffic.

What happens when both devices send a signal at the same time? The signal collides on the wire and cannot be read.

This is what CSMA/CD is for. Instead of going into great depth explaining it, the devices sense that their signals have collided, and they both wait a random amount of time, and resend, at hopefully different times.

On a network with a decent amount of traffic, the CSMA/CD overhead is tremendous. Anyone who has had an old hub must remember the collision light constantly blinking. As you add more hosts, you're getting a tremendous decrease in usable bandwidth.


Every computer attached to a hub is in the same Collision Domain.

On a switch, every computer is on its own Collision Domain with themselves and the switch port that they are attached to.

As you add multiple devices and use a reasonable amount of traffic on them, the switch clearly outperforms the hub in every scenario.


On the security thing. The good thing about a switch is that under normal operating conditions you cannot see other peoples traffic. This was not the switches purpose, and the switch has not been designed with security in mind. Basically, in abnormal operating conditions, it breaks down. If the switch is overloaded, and it has to make a choice between continuing operation or protecting privacy of data, it will always choose the first. This happens more often than you think. Switches are also very easy to lie to, and it's easy to trick a switch into sending you other peoples traffic, or even tricking a switch into thinking that you're the router, and routing everyone's traffic through you, so that you can change their traffic to your liking.

When a switch has to make a choice between confidentiality and availability, it will always, under every scenario, choose availability. This is very easy to exploit. Just sending very many layer two frames to the switch with MAC addresses obtained from multicast sniffing will force it to behave like a hub.
Yenevoc
You can touch it if you'd like.
Posts: 144
Joined: Fri Dec 20, 2002 4:18 pm

Post by Yenevoc »

Ddrak wrote:Router: The next step up from a switch. Routers understand TCP/IP (well, just plain IP actually) and intelligently transmit IP packets to the various interfaces based on it's knowledge of the local IP network setup. Commonly, routers these days have functionality built in to allow multiple machines to connect to the internet over a single IP address.
I have a request for clarification. Typically speaking one can not buy a 'router' at a CompUSA or Circuit City or other retail outlets. The devices typically described as a 'cable router' just plain 'router' are actually switches (or even just hubs) that have built in NAT capabilities (and occasional minimal hardware firewall capabilities) rather than a true 'router' with modifiable tables and intelligent packet routing. Am I correct in this?

Thanks.

Yen.
Yenevoc
Iksar Monk of Brell
You can touch it if you'd like!
Ickhor
Grand Master Architecht
Posts: 406
Joined: Fri Dec 31, 2004 10:11 pm

Post by Ickhor »

Correct.
Beestyall
White Mountain o' Love
Posts: 515
Joined: Fri Dec 20, 2002 11:20 am
Contact:

Post by Beestyall »

They function in some ways like a basic router. It's intelligent enough not to pass all your internal information out to the internet (based on packet information), has an independent OS to allow configurations and retain settings even on a prolonged hard-reset. It's analagous to the routers I worked with about 8 or 9 years ago.
gineeva
Intendant of teh Building
Posts: 214
Joined: Tue Apr 13, 2004 6:34 pm
Location: bored as hell in Bama
Contact:

Post by gineeva »

Beestyall wrote: analagous
A guy happened to bring this word up to me just last night
Gineeva
Oreo Pally of EQ

Ginnah
The evil cleric on Blackburrow - EQ2
Bahd Zoolander
Grand Inspector Inquisitor Commander
Posts: 2636
Joined: Fri Dec 20, 2002 9:42 pm

Post by Bahd Zoolander »

gineeva wrote:
Beestyall wrote: analagous
A guy happened to bring this word up to me just last night
Was he trying to talk you into a sexual act?
Bahd Zoolander - Transcendent - On Vacation
Ddrak
Save a Koala, deport an Australian
Posts: 17517
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Post by Ddrak »

I have a request for clarification. Typically speaking one can not buy a 'router' at a CompUSA or Circuit City or other retail outlets. The devices typically described as a 'cable router' just plain 'router' are actually switches (or even just hubs) that have built in NAT capabilities (and occasional minimal hardware firewall capabilities) rather than a true 'router' with modifiable tables and intelligent packet routing. Am I correct in this?
Kind of correct.

A "router" you see at Best Buy is a hub/switch with a very dumb NAT device stuck in front of them, usually running a boat load of other layer 3-7 stuff as well (DNS server, DHCP server, HTTP server etc). A NAT device couldn't even technically be called a router as it primarily operates at layer 4 by rewriting the entire first 4 layer's headers on packets travelling in both directions. I'm not entirely sure what you call a router that doesn't know anything about routing protocols...

The OSI model is a mess anyway. Protocols don't map particularly cleanly to it anywhere but in theory.

Dd
User avatar
Xtizu
Meat Sock Puppet
Posts: 1174
Joined: Sat Dec 21, 2002 11:57 pm
Contact:

Post by Xtizu »

okay i have two computers i'm trying to hook together and put on the interbutt. one is a winxp, the other is a win98. i had a hub. and i never use more than two slots. and i only have about 50 bucks to spend on a solution.

recomendation?
SHAKEImageSHAKE I has a tubes!
Rsak
Soverign Grand Postmaster General
Posts: 5365
Joined: Mon Mar 17, 2003 9:47 am
Location: Gukta

Post by Rsak »

Had a hub?

What is your internet connection method? (Modem, DSL, CableModem)
End the hypocrisy!

Card's Law:No event has just one cause, no person has just one motive, and no action has just the intended effect.
Ddrak
Save a Koala, deport an Australian
Posts: 17517
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Post by Ddrak »

Assuming Cable/DSL and a limited need for functionality, I recommend the Linksys BEFSR41.

Dd
Post Reply