≡ Menu

Hubs vs Switches vs Routers – Networking Device Fundamentals

Most of the systems you are working on might be connected to a hub, or switch, or router. Probably you never thought about those networking devices, how they work, and the differences between them.

In this article, we’ll explain the core technical differences between these networking devices.

To understand these, it is also helpful if you have some basic knowledge of different layers in OSI model of communication.


  • Hubs, also known as repeaters, are network devices that can operate on layer-1 (I.e. the physical layer) to connect network devices for communication.
  • Hubs cannot process layer-2 or layer-3 traffic. Layer-2 deals with hardware addresses and layer-3 deals with logical (IP) addresses. So, hubs cannot process information based on MAC or IP addresses.
  • Hubs cannot even process data based on whether it is a uni-cast, broadcast or multi-cast data.
  • All that a hub does is that it transfers data to every port excluding the port from where data was generated.
  • Hubs work only in half duplex mode I.e. a device connected to a hub can either send or receive data at a given time.
  • If more than one device sends out data simultaneously then data collisions happen.
  • In case of a collision, a hub rejects data from all the devices and signals them to send data again. Usually devices follow a random timer after which data is sent again to hub.
  • Hubs are prone to collisions and as more and more devices are added to set up of multiple hubs, the chances of collisions will increase and hence the overall performance of network will go down.


  • Switches are network devices that operate on layer-2 of OSI model of communication.
  • Switches are also known as intelligent hubs.
  • Switches operate on hardware addresses to transfer data across devices connected to them.
  • The reason switches are known as intelligent hubs is because they build address table in hardware to keep track of different hardware addresses and the port to which each hardware address is associated.
  • The reason why they are compared to hubs because a switch, when started fresh, acts just like a hub. Suppose there are 3 devices connected to a switch. Lets call these devices as deviceA, deviceB and deviceC. Now, after a fresh start, if deviceA sends out a message to deviceB then just like a hub, switch will send it out to each port. But, it will store the hardware address and corresponding port in its hardware table. This means that whenever any other device will send any packet destined to deviceA then switch will act intelligently and send it to the correct port and not to all the ports. This way as more and more interaction takes place, the hardware table of switch grows and after a certain period of time switch becomes full blown intelligent version of a hub.
  • Switches are often confused with bridges. Though both of them are mostly similar with major difference being that a switch forwards data at wire speed as it uses special hardware circuits known as ASICs.
  • Switches, unlike hubs, support full duplex data transfer communication for each connected device.
  • As layer 2 protocols headers have no information about network of data packet so switches cannot forward data based or networks and that is the reason switches cannot be used with large networks that are divided in sub networks.
  • Switches can avoid loops through the use of spanning tree protocol.


  • Routers are the network devices that operate at Layer-3 of OSI model of communication.
  • As layer-3 protocols have access to logical address (IP addresses) so routers have the capability to forward data across networks.
  • Sometimes routers are also known as layer-3 switches.
  • Routers are far more feature rich as compared to switches.
  • Routers maintain routing table for data forwarding.
  • Earlier, routing was slower as compared to switching. This was because of the fact that routing table lookup time was considerably high. The reason for this was that the complete packet was fetched into software buffers and then further operations were carried on it.
  • Today, operations are done in hardware which has reduced the latency a lot and hence routers are not considered slower than switches today.
  • Routers have lesser port densities as compared to switches.
  • Routers are usually used as a forwarding network elements in Wide Area Networks.

If you are new to networking, it is also important for you to understand the journey of a data packet in Internet and TCP/IP fundamentals.

Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Anonymous September 5, 2013, 9:29 am

    Excellent article!! I wished I had read this article 15 years ago, would have provided me a solid foundation in networking concepts

  • Walter September 5, 2013, 9:51 am

    Short and sweet. Thanks

  • siniranji September 5, 2013, 10:54 am

    Lovely, many of the network administrator need to know this, need of the hour

  • J.O. September 5, 2013, 12:50 pm

    An interesting artifact of switches is that if you do an arp flood of the switch it will fall over and become a hub. I don’t know how long the switch stays a hub after the flood is turned off. (That makes it easy to be the “man-in-the-middle”).

  • Mitra September 5, 2013, 12:52 pm

    Very good one. Simple and Sweet !

  • Bob September 5, 2013, 12:59 pm

    Useful refresher. Thanks

  • kpinzou September 5, 2013, 1:03 pm

    thanks for keeping up the awesome work. many thanks

  • Jalal Hajigholamali September 5, 2013, 9:52 pm

    Short and very useful article


  • Kane September 6, 2013, 6:56 am

    Love these articles. I send them out to my new network engineers for easy training!!

    Keep’em coming!

  • Anonymous September 6, 2013, 10:24 am

    Hubs operate at L2 they deal with collisions (L2 – access control layer) They implement the CSMA-CD protocol

  • Ashish September 7, 2013, 11:19 am

    informative terms

  • ömer faruk September 16, 2013, 6:18 am

    Thanks…very explanatory and useful.

  • Adam K October 1, 2013, 5:50 am

    Short and useful, very nice.

  • sl0j0n October 8, 2013, 9:38 am

    Thanks to Natarajan & Arora.
    Very good to see the basics here for those that haven’t gotten that far yet.
    Now, *if* there was a [*very*] basic setup page for adding a client, etc., & the other basics, this would be the site to send newbs to for the ‘help’ they all seem to ‘need’ so much.
    Just like it is already the ‘send them to site for some Linux & programming helps.
    Have a GREAT day, neighbors!

  • zug October 9, 2013, 10:33 pm

    Enlightened, thanks.

  • zhiming October 17, 2013, 3:40 am

    The best ever such eductaion.

  • sreeram August 24, 2015, 5:07 am


  • Sarfaraz October 16, 2015, 12:59 am

    Brief and useful article

  • Anonymous November 3, 2015, 10:56 am

    This is an educative post. thanks.

  • Rhunel April 27, 2016, 6:44 am

    Excellent. And now, I fully understand the difference of the three.