# Switch vs Router vs Hub



## Shappyss (Jun 26, 2004)

Does anyone know what is the main differences between a switch, router, and a hub?


----------



## SimpleSimon (Jan 15, 2004)

A hub is a very simple, dumb way to combine multiple ethernet ports. Every bit from every port is sent to every other port.

A switch is a smarter form of hub that doesn't send every packet everywhere - when it knows it doesn't need to, strictly by hardware recognition of what's where - no programming.

A router is a lot smarter - some more than others. Most can also perform functions other than simply passing traffic.


----------



## Steve Mehs (Mar 21, 2002)

And then if you throw bridges in there, it can get confusing. 

For definitions, explanations and third party resources on things, I've found the information and links provided by webopedia.com to be excellent. If you want to learn more on any of those devices, type in the word and see the related links section.


----------



## Guest (Oct 2, 2004)

Shappyss said:


> Does anyone know what is the main differences between a switch, router, and a hub?


..a hub is a layer 1 device and does not route traffic, a switch works at layer 2 and routes traffic based on mac addresses, a router is a layer 3 device that routes traffic based on ip addresses and mac addresses..layer 1 is the physical layer, layer 2 is the data link layer, layer 3 is the network(ip) layer


----------



## cdru (Dec 4, 2003)

A hub is like an old telephone party line. Anybody listening can hear the conversation. However, when you start getting a lot of people talking at the same time, no one can understand anything. When a bunch of computers all start sending data at the same time, a collision occurs requiring the packets to be resent. For a basic network a hub usually works ok...but if the network starts to go our become congested, then you have problems.

Switches act more like how phones work these days. If I want to talk to Simon, we can talk privately. At the same time, Ler could talk to you. If I also wanted to talk to you, I could start up a 2nd conversation and go at it as well and everyone would be able to understand everything.

A router allows my network to talk to your network only sending the data that needs to be sent. Your network doesn't care about my broadcast packets likewise I don't care about yours. A router also has information as to how to contact other networks. For a basic home network, it usually has only one entry in it, the default gateway. This basically forwards all packets that the router doesn't know where to send out to the the ISP destined to the internet. The ISPs routers then decide where that packet should be routed to.

Most consumer routers are actually separate devices, a stand alone router and a stand alone switch, wrapped up into one package.


----------



## RichW (Mar 29, 2002)

Another big difference is that hubs and switches will pass several protocols while routere routers generally route only one or two, such as TCP/IP. 

And while it is true that switches do lessen the traffic on a network, if there are still "promiscuous" protocols such as NETBEUI or Appletalk, the advantage of switches over hubs are not as great, because such protcols "broadcast" to all network nodes.

The best network design, in my opinion, is one using switches and a only TCP/IP as the protocol.


----------



## SimpleSimon (Jan 15, 2004)

RichW said:


> The best network design, in my opinion, is one using switches and a only TCP/IP as the protocol.


That is an ideal, but not particularly practical in most cases.

And most routers can pass as many protocol types as you need - although TCP/IP is the ONLY one you want "leaving the building".


----------



## MikeSoltis (Aug 1, 2003)

SimpleSimon said:


> ...although TCP/IP is the ONLY one you want "leaving the building".


I worked hard for my TCP/IP, and I don't want to share it, so it can't leave 

Typical routers are often used as gateways also, many have built-in hardware firewalls, or at least a 'firmware' firewall. They could be used between your modem (cable, dsl, etc) and your network to provide some degree of protection for your computers.

Switches are generally better for larger networks, as they will keep collisions from happening as much. Collisions happen on hubs, as the 'party line' reference above. 
Switches used to be much more expensive than hubs, but the price difference has fallen so far as to be negligible.

BTW, if I gave Viagra to a 'firmware' firewall, would it become (at least temporarily) 'hardware' ? ? ?


----------



## Orcatek (May 1, 2003)

MikeSoltis said:


> BTW, if I gave Viagra to a 'firmware' firewall, would it become (at least temporarily) 'hardware' ? ? ?


Yes - but all your data would turn blue.


----------



## HappyGoLucky (Jan 11, 2004)

RichW said:


> And while it is true that switches do lessen the traffic on a network, if there are still "promiscuous" protocols such as NETBEUI or Appletalk, the advantage of switches over hubs are not as great, because such protcols "broadcast" to all network nodes.
> 
> The best network design, in my opinion, is one using switches and a only TCP/IP as the protocol.


Not necessarily. I've found that for a home network, the "safest" way to network several computers and share a broadband connection is to use a router/switch and the NETBEUI protocol. Bind the "File and Printer Sharing" and "Client for Microsoft Networks" to the NETBEUI protocol ONLY. Disable all "NETBios over TCP/IP". Since NETBEUI is non-routable, there is no way your internal network will then be accessible beyond your router, meaning no outside hackers having access to your files. Granted you should still run a firewall and anti-virus, but it's just another level of security that doesn't hurt.


----------



## SimpleSimon (Jan 15, 2004)

Finally! Something HGL and I can agree on! 

Between what he said and NAT, you'll be pretty safe from outside attacks.


----------



## Nick (Apr 23, 2002)

MikeSoltis said:


> ...BTW, if I gave Viagra to a 'firmware' firewall, would it become (at least temporarily) 'hardware' ? ? ?


Be aware that when "software" or "firmware" is temporarily converted to "hardware", and the period of conversion lasts longer than necessary, an error called "priapism" can occcur.

If the interval of the error exceeds 240 minutes, you will need to refer the case to an emergency technician or your hardware could be permanently damaged.


----------



## RichW (Mar 29, 2002)

HappyGoLucky said:


> Not necessarily. I've found that for a home network, the "safest" way to network several computers and share a broadband connection is to use a router/switch and the NETBEUI protocol. Bind the "File and Printer Sharing" and "Client for Microsoft Networks" to the NETBEUI protocol ONLY. Disable all "NETBios over TCP/IP". Since NETBEUI is non-routable, there is no way your internal network will then be accessible beyond your router, meaning no outside hackers having access to your files. Granted you should still run a firewall and anti-virus, but it's just another level of security that doesn't hurt.


Agreed!

I was addressing more the requirements of a corporate network with a hundred or more nodes. Native NETBEUI causes excessive traffic and in fact isn't even implemented on Windows XP unless you manually install it.

After the blaster virus got through our firewall (via an email attachment), I have also become a proponent of personal firewall software on each and every workstation. I also discourage my users from sharing files or printers on workstations, setting them up on servers instead.


----------



## HappyGoLucky (Jan 11, 2004)

RichW said:


> Agreed!
> 
> I was addressing more the requirements of a corporate network with a hundred or more nodes. Native NETBEUI causes excessive traffic and in fact isn't even implemented on Windows XP unless you manually install it.
> 
> After the blaster virus got through our firewall (via an email attachment), I have also become a proponent of personal firewall software on each and every workstation. I also discourage my users from sharing files or printers on workstations, setting them up on servers instead.


Definitely. On a large network, NetBEUI would be terribly inefficient, with TCP/IP being far better. But for a two, three, or four node home system, it works great and is hardly noticeable, little overhead.

The NetBEUI protocol is shipped with Windows XP, it is on the install CD, but it doesn't install automatically, you must manually find it and copy the files to the installation. But there is a text file that explains which files to copy and to where, it is very simple.


----------

