Summary: Hubs, switches and routers are all computer networking devices with varying capabilities. Unfortunately the terms are also often misused.
|
What's the difference between a Hub, a Switch and a Router? |
In a word: intelligence.
Hubs, switches, and routers are all devices that let you connect one or more computers to other computers, networked devices, or to other networks. Each has two or more connectors called ports into which you plug in the cables to make the connection. Varying degrees of magic happen inside the device, and therein lies the difference. I often see the terms misused so let's clarify what each one really means.
•
A hub is typically the least expensive, least intelligent, and least complicated of the three. Its job is very simple: anything that comes in one port is sent out to the others. That's it. Every computer connected to the hub "sees" everything that every other computer on the hub sees. The hub itself is blissfully ignorant of the data being transmitted. For years, simple hubs have been quick and easy ways to connect computers in small networks.
A switch does essentially what a hub does but more efficiently. By paying attention to the traffic that comes across it, it can "learn" where particular addresses are. For example, if it sees traffic from machine A coming in on port 2, it now knows that machine A is connected to that port and that traffic to machine A needs to only be sent to that port and not any of the others. The net result of using a switch over a hub is that most of the network traffic only goes where it needs to rather than to every port. On busy networks this can make the network significantly faster.
A router is the smartest and most complicated of the bunch. Routers come in all shapes and sizes from the small four-port broadband routers that are very popular right now to the large industrial strength devices that drive the internet itself. A simple way to think of a router is as a computer that can be programmed to understand, possibly manipulate, and route the data its being asked to handle. For example, broadband routers include the ability to "hide" computers behind a type of firewall which involves slightly modifying the packets of network traffic as they traverse the device. All routers include some kind of user interface for configuring how the router will treat traffic. The really large routers include the equivalent of a full-blown programming language to describe how they should operate as well as the ability to communicate with other routers to describe or determine the best way to get network traffic from point A to point B.
A quick note on one other thing that you'll often see mentioned with these devices and that's network speed. Most devices now are capable of both 10mps (10 mega-bits, or million bits, per second) as well as 100mbs and will automatically detect the speed. If the device is labeled with only one speed then it will only be able to communicate with devices that also support that speed. 1000mbs or "gigabit" devices are starting to slowly become more common as well. Similarly many devices now also include 802.11b or 802.11g wireless transmitters that simply act like additional ports to the device.
Related:
How should I set up my home network? Once you add a second computer to you're faced with setting up a network, at least to share the internet connection. Here are some general guidelines.
Article C1862 - November 19, 2003
I have a friend that has 5 computers in a network. Currently we are using the 2Wire HomePortal 2701HGV to connect 4 computers to each other and the web. My question is how can we connect the 5th with a lan cable to this configuration. Do we need a Switch, or a router? One computer is a file server for Quickbooks so we need all 5 computers to be able to see each other over the network and be able to access the internet independantly of each other. Also it would be good if we could plug a networked printer in the jumble to. so maybe an 8 port switch im thinking but I dont know if that will work. What about if we just used the 2 wire 2071 single port modem, if you plug that to a switch will it work the same????? Any help would be great. Thanks Steve.
Posted by: Steve at March 6, 2009 1:05 AMHi Leo,
I'm a student, i still getting confuse of what is the different between hub, switch and router. i though that i can connect a hub to a router? is it ok to do that? and is a hub is the same as switch?? what i mean is, can i put this hub and switch together???
Posted by: Justin at March 6, 2009 6:19 AMWhat is the key play role of router and a switch ?
Posted by: Moses at March 21, 2009 3:28 AMHi, i have a d-link router and when i try to play my games on line it says that i have a fw (firewall) i have turned off all fw's on my computer and i tried portforwarding. I don't know what to do, do you think it would be easier if i bought a switch? Please advise thanks Brandon
Posted by: Brandon at March 26, 2009 7:25 PM@Steve
Posted by: rg at May 25, 2009 9:48 AMConnect the 2 wire 2071 to a switch. Connect all else to the switch using ethernet cables . All should seamlessly work!
hub is a passive device .
Posted by: Ratnam at June 19, 2009 10:39 PMswitch is actvive device and it is a intellectual device.
Thanks a lot!!This article is a great help n it provides appropiate information....great wrk!!
Posted by: Shrraddha at June 21, 2009 4:40 AMswitch and routers are intellignet device unlike hub. they deal with the data in intelligent way by knowing the IP addresses but the hub is ignorant of that.
Posted by: Malik Muhamamd Mehran at June 22, 2009 3:33 AMQ :hub and routers can be connected?
Posted by: Malik Muhamamd Mehran at June 22, 2009 3:40 AMAns: that right we can connect the hub and the router but purpose of their connectivity is different. if you wanna to connect different computers and wanna to treat them all in this way that no one is prefered or identified so use hub, if you want to transfer data to a single computer that is identified by IP address then i will suggest you router.before router u can use hub.
Q: hub and swith can be connected?
Posted by: Malik Muhamamd Mehran at June 22, 2009 3:44 AMAns: the case of connectivity of the router and the switch with hub is same which is described above.