Ask Leo! by Leo A. Notenboom

What's the difference between a Hub, a Switch and a Router?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter
Ask Leo! on Facebook

Home » Networking

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.

"Varying degrees of magic happen inside the device, and therein lies the difference."

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.

Article C1862 - November 19, 2003

Was this article helpful? «Yes» «No»

Recent Comments
332 Comments

Prabhu you are gud talking man!!!
but this is the basic info that a fresher engineer needs, if you want more anyhow you can search on google..(may be on Cisco site)
but this is more concise and very basic concept that Leo has defined.. thanx in advance

Posted by: varun at August 2, 2010 4:07 AM

Leo I have one question...
How we can Make our own routers for Project in College.. is it more typical.??
I am last year computer science graduate...

Posted by: varun at August 2, 2010 4:10 AM

1)Hub:-The job of a hub simply is:anything that comes in one port is sent out to the others.
2)Switch:-Pay attention to the traffic that comes across it,ex:sees traffic from mashine A coming in on port 2,it knows now knows that mashie A is connected to that port and that traffic to mashine A needs to only be sent to that port and not to any of the others.
3)Router:-Think of it like a computer that can be programmed to understand,possibly manipulate,and route the dataits being asked to handle

Posted by: George Hassoun at August 25, 2010 1:16 PM

thanks Leo...for the answer..Clarity in the answer helped me to understand the basics.

Posted by: Avinash at August 27, 2010 9:33 PM

mbs = milli bit second
Mbps or Mb/s = mega bits per second

Posted by: Joe at September 3, 2010 8:46 AM

Post a comment on "What's the difference between a Hub, a Switch and a Router?":



(Name will be included when your comment is published.)



(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

  • Read the article at the top of this page. If your comment shows you didn't, it'll be deleted and ignored.

  • Comment only on this article. Use the Google search box at the top of the page if you have a question about something else.

  • Don't include personal information in the comment. No email addresses. No phone numbers. No physical addresses.

  • Don't spam. Excessive links to unrelated sites within a comment or across multiple comments will cause all such comments to be removed.

  • Don't ask me to recover lost passwords or hacked accounts. I can't, and those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...


Question? Ask Leo!