Along came a hub, a switch, and a router....Aren't they the same? - Techist - Tech Forum

Go Back   Techist - Tech Forum > Internet > Computer Networking and Internet Hardware
Click Here to Login
Reply
 
Thread Tools Display Modes
 
Old 10-04-2007, 02:09 AM   #1 (permalink)
True Techie
 
ReikokuKo's Avatar
 
Join Date: Oct 2007
Location: N/A
Posts: 175
Send a message via AIM to ReikokuKo
Default Along came a hub, a switch, and a router....Aren't they the same?

For the computer and networking gurus, this article will probably be a review, but if there is anything you would like to add to it, please do so.

I get the impression that a lot of people do not really know the difference between a hub, a switch, and a router. I will attempt to explain each one from the basic operations to more advanced things.

Hubs
Hubs are by far the cheapest of the three but also the least capable/powerful. If you have an internet connection or a network and you want to plug in more computers or other devices, a hub can provide just that for you. You can have one port and transform it into as many ports as the hub has just by connecting the hub to that one port.

A hub will take the incoming connection and split it up amongst all the devices that are attached. A hub will broadcast all information to all connected devices. Meaning if a computer is going to send information to another computer on the network and its connected to a hub, the hub will send that information to all devices connected to the hub. So what happens when a computer starts receiving information that is not meant to be received by that computer? The computer will read the very beginning portion of what is called a packet and in there, the computer will know whether or not that information is for that computer or another computer. If its not meant for that computer, it will simply discard the packet. Next I will explain the different types of hubs.

Different types of hubs:
A hub is a simple device designed to accomplish a simple task, yet there is more than just a hub. There are three types of hubs today:
Passive hubs - These do not even need to be plugged in to operate. They are the cheapest type of hub but has much less features than the other types of hubs.
Active hubs - These types of hubs actually need to be plugged in. Why? Because an active hub will actually amplify the signal. Information that travels through a cable will start to degrade. The longer its been traveling through the cable, the more it will degrade and it will increase the possibility of corrupting the data. This is known as signal attenuation. An active hub will take that signal and restrengthen it. Perhaps some of you have heard of a device called a repeater. Active hubs are commonly referred as Mulit-port repeaters.
Intellegent hubs - This one needs to be plugged in as well and it actually has a CPU to preform calculations. Intelligent hubs will actually read all the data passing through it and send it to the destination computer only. An intelligent hub can also simulate networks and supports multiple interfaces other than just Ethernet. You will find that a switch and a hub are very similar and virtually the same.
Hubs operate at the first layer of the OSI model. (Physical layer, with the exception of intelligent hubs)

Switches:
Switches are more expensive than hubs and are much smarter and efficient. A switch and a hub are similar in the sense that they both provide more ports in your network. A switch will provide each connected device the amount of bandwidth as the originating line. However, a switch will look at each packet going through it and send in the right direction. This way, all the devices connected to the switch won't have to bothered everytime there is information going across the network and there will be much less congestion in the cables.

How it works: When a switch sees information, it memorizes where it came from, more specifically, it will memorize that computer and what port it is plugged into. Based on this database of computers and their associated ports, the switch can make the decision of where to send the information. This database is known as the switching table.
Scenario: When you first set up a new network, or have a brand new switch, the switching table will be empty right? Or how about when you plug in a new computer to the switch, its information won't be in the switching table.
Solution: Even if the switching table is empty, it will learn on its own what's connected to it. How it goes about doing this is when a computer sends information across the switch, as mentioned earlier, it will memorize the computer and the port in which its connected to. It will then send that information to all the connected devices. This is called a broadcast. When the right computer is found, it will send back a reply and the switch will memorize that computer and its associated port. And from here, it keeps on building its switching table. Very adaptable to changes in the network.
The switch looks at the MAC address ( a supposedly unchangeable address given to a device, in this case, the Network Interface Card) and writes it down in the switching table.

Example: A 12 port switch, 12 computers connected to it, and an empty switching table.
Computer A on port 1 wants to send information to Computer D on port 4. The switch writes down that Computer A is connected to port 1, it then sends that information to all the other 11 computers.
Computer D on port 4 responds while all the other computers simply ignore the data.
Now the switch knows that Computer A is on port 1 and Computer D is on port 4.
Then, say Computer B on port 2 sends information to Computer D on port 4. The switch writes down Computer B as connected to port 2 and it already knows where Computer D is located, so it forwards data straight to port 4 without bothering any of the other computers. There are different types of switching methods (how the switch forwards information):
Store-and-forward - The switch will store the entire frame being transmitted and check it for errors such as corruption. If errors are found, then the switch will discard the information. If no errors are found, the switch will continue on and send it to the right destination. As you can imagine, this can take time and using this method can increase reliability, but also increase latency (the time it takes for the switch to process the information)
Fragment free - The switch will only look at the first 64 bytes of information and check for errors.
Cut through - The switch will not even look at the information passing through it. Latency is lot faster, but puts the network at risk of transferring corrupted information.
VLANs:
One of the most powerful features of a switch is the ability to create VLANs (Virtual Local Area Network). When a lot of computers are connected to a switch or a hub, it is assumed that they are all part of the same network. But a switch can simulate smaller networks within itself. For example, normally, all 12 computers connected to a 12 port switch is one network, they can all communicate with themselves, and when a switch broadcasts information, all 12 computers receive it. When a VLAN is put in place, you can group together ports to be on separate VLANs where they will act like a separate network.

I.E. Ports 1-3 are assigned to VLAN 1, and ports 4-6 are assigned to VLAN 2. When a computer connected to port 5 sends information that is not in the switching table, the switch will only broadcast that information to VLAN 2, which includes ports 4-6. Even though physically computers connected through ports 1-6 are all connected to the same one switch, it is as if they are on separate networks.

Trunking:
Switches have two special ports where a higher capacity cable can be plugged in. Plugging a cable into this port and into another port of another switch you can make the two switches act as one switch. So a computer connected to port 1 of Switch A can send information to another computer connected to port 8 of Switch B.

Switches operate at the 2nd layer of the OSI model (Data Link layer).

Routers:
A router is the most expensive on the list and the most powerful. A router separates entire networks from each other. Similar to a switch, it is on a much larger scale. If a computer wants to send information through a typical network, it will go through the switch, and the switch will be connected to the router. When the switch doesn't know where to send the information, it broadcasts it and even the router will hear about it. The router can determine if the destination is even a part of the same network, if it is, then it will send it back. If it is not a part of the network, then it will send it outside the network. Generally, networks are all connected together by routers. So if you send information to another computer on a different network, it will go through the router of your network (commonly known as the gateway) and the router will read it and send it to the right network. Routers are much more complicated and harder to configure.

If I went into all the different protocols that routers are capable of, I will be here for days. You may be thinking, "Routers can't be that hard, I have one at home.." Home and office routers come all configured with what routing protocols to use and everything you need for a small network.

Routers operate at the 3rd layer of the OSI model. (the transport layer)
__________________

ReikokuKo is offline   Reply With Quote
Old 10-04-2007, 09:54 AM   #2 (permalink)
Retired.
 
peterhuang913's Avatar
 
Join Date: Dec 2005
Location: Los Angeles, California
Posts: 8,076
Send a message via AIM to peterhuang913
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

Nice writeup, hope this gets stickied.
__________________

__________________


My computer uses 1.5A-load, .8A-idle, .65A-standby, .05A-turned off on 125V.
"The spaces between your fingers were created so that another's could fill them in."
Quote:
Originally Posted by Norcent View Post
I need to stop using the internet.
peterhuang913 is offline   Reply With Quote
Old 10-04-2007, 10:07 AM   #3 (permalink)
True Techie
 
TuNiX's Avatar
 
Join Date: Sep 2007
Posts: 153
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

This needs to get stickied, MAJOR PROPS. well done 10/10
__________________
http://i169.photobucket.com/albums/u...4/ForumTag.gif
http://www.sloganizer.net/en/image,T...hite,black.png
CPU Type: DualCore Intel Pentium D 820, 2800 MHz (14 x 200)
Motherboard Chipset: Intel Lakeport-G i945G
System Memory: 1024 MB (DDR2-533 DDR2 SDRAM)
Video Adapter: Radeon X1300 Series (256 MB)
Audio Adapter: Intel 82801GB ICH7 - High Definition Audio Controller [A-1]
Disk Drive: WDC WD2500JS-22MHB0 (232 GB, IDE)
Disk Drive: WDC WD1600JS-00SGB0 (149 GB, IDE)
TuNiX is offline   Reply With Quote
Old 10-04-2007, 01:56 PM   #4 (permalink)
True Techie
 
ReikokuKo's Avatar
 
Join Date: Oct 2007
Location: N/A
Posts: 175
Send a message via AIM to ReikokuKo
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

I actually had more written, but apparently there is a 10,000 character limit on posts so I had to carefully edit out things.
ReikokuKo is offline   Reply With Quote
Old 10-04-2007, 06:02 PM   #5 (permalink)
Retired.
 
peterhuang913's Avatar
 
Join Date: Dec 2005
Location: Los Angeles, California
Posts: 8,076
Send a message via AIM to peterhuang913
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

You can post like 3 or 4 times to make it longer.
__________________


My computer uses 1.5A-load, .8A-idle, .65A-standby, .05A-turned off on 125V.
"The spaces between your fingers were created so that another's could fill them in."
Quote:
Originally Posted by Norcent View Post
I need to stop using the internet.
peterhuang913 is offline   Reply With Quote
Old 10-05-2007, 04:11 AM   #6 (permalink)
True Techie
 
ReikokuKo's Avatar
 
Join Date: Oct 2007
Location: N/A
Posts: 175
Send a message via AIM to ReikokuKo
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

Haha, too late now unless I can get a mod to move my posts up right beneath the first one.
ReikokuKo is offline   Reply With Quote
Old 10-05-2007, 04:37 AM   #7 (permalink)
HONK if you route packets
 
mikesgroovin's Avatar
 
Join Date: Sep 2003
Location: MD
Posts: 4,715
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

Network Troubleshooting 101... Give me 1 valid "IT practical" reason why are hubs still being sold? If you answer this, I'll sticky your post lol

BTW, extremely wonderful write up. Thanks for the info
mikesgroovin is offline   Reply With Quote
Old 10-05-2007, 06:03 AM   #8 (permalink)
True Techie
 
ReikokuKo's Avatar
 
Join Date: Oct 2007
Location: N/A
Posts: 175
Send a message via AIM to ReikokuKo
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

Other than the obvious difference in cost and simplicity of its configurability, I can only take wild guesses.

A hub plays a major role in a star topology which are still quite common today, latency through a hub is much lower than routers and switches. A hub can be used to distribute the backbone, if a switch malfunctions in a network, a major part of the network or the whole network will go down whereas if a hub crashes, the network will not crash with it.

As for diagnostics, if you plug in a network analyzer into a switch, you won't be able to see all the traffic whereas if you were using a hub, you can see all the traffic.

If I didn't give the answer you were looking for...PLEASE TELL ME!!! I WILL lose sleep over this and I treasure my sleep.
ReikokuKo is offline   Reply With Quote
Old 10-05-2007, 06:59 AM   #9 (permalink)
HONK if you route packets
 
mikesgroovin's Avatar
 
Join Date: Sep 2003
Location: MD
Posts: 4,715
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

Quote:
Originally Posted by ReikokuKo View Post
As for diagnostics, if you plug in a network analyzer into a switch, you won't be able to see all the traffic whereas if you were using a hub, you can see all the traffic.
Bingo, my friend That's what I was looking for.
mikesgroovin is offline   Reply With Quote
Old 10-05-2007, 08:40 PM   #10 (permalink)
Techie Beyond Description
 
veg1992's Avatar
 
Join Date: Dec 2006
Posts: 19,993
Default Re: Along came a hub, a switch, and a router....Aren't they the same?

very nice... i think you maybe the newest techie (by post count) to get a sticky
__________________

__________________
I do not accept help requests and/or deleted threads/complaints by PM, Profile or IM/Email. Just ask on the forums! Also, I do have Lockerz invites if you want them, feel free to PM me your email if you want one :0

If I help you, or you just like what I said, rep me by clicking the
or under my avatar; it helps me know that my advice actually helped you.


.. But things don't go according to plan! My Actual Rig, 2009:
veg1992 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
installing switch project madman1391 Overclocking and Modding 7 08-23-2007 10:21 PM
New Router yaminohaka Computer Networking and Internet Hardware 11 07-27-2007 07:51 AM
RECOMMENDATION? Wireless router long range computer retard Computer Networking and Internet Hardware 4 06-20-2007 10:14 PM
Boosting range of wireless router with a second unit. Jlagreca Computer Networking and Internet Hardware 2 06-16-2007 06:17 PM
Cannot ping when server & pc on same switch htcs Computer Networking and Internet Hardware 7 04-05-2007 11:31 AM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.