Hub vs. Switch: What’s the Difference?

Written by Coursera Staff • Updated on

Learn about the differences between two common network devices: hubs and switches. Explore features of each, common uses, and how they compare.

[Featured Image] An IT worker looks at his laptop, studying the differences between a hub vs switch.

Network hubs and switches are hardware devices that help build stronger, more robust networks. While they both improve network performance, network switches and hubs have some differences that set them apart. Firstly, when these networking devices receive information, network hubs broadcast the data to all connected devices. In contrast, network switches identify the media access control (MAC) address in the data packet header to transmit the data only to the single device that requested it. While both devices are used in larger networks, switches are slowly replacing hubs in many use cases due to their ability to pinpoint intended destination. 

Advancing your IT career? You can master networking competencies with the experts at IBM while also building in-demand cloud computing skills through the IBM Information Technology and Cloud Fundamentals Specialization. In as little as two months, you could have a new credential for your resume.

What is a hub?

Hubs are simple networking devices with an input Ethernet port that connects to a router and multiple output ports for devices to connect. When a hub receives data, it transmits it to all connected devices, leaving the intended device to recognize the data. Network hubs also only operate in half-duplex, so they cannot send and receive data simultaneously. When devices attempt to transmit at the same time on a half-duplex hub network, a collision event will occur, slowing down speeds by requiring both devices to pause before trying again. Hubs typically operate on layer 1—the physical layer—of the open systems interconnection (OSI) model with other hardware devices. 

Two common types of hubs are:

  • Active hubs: Powered devices that amplify incoming signals to connected devices, extending the distance they can travel 

  • Passive hubs: Bring multiple devices into one network through its Ethernet ports, it does not amplify signals or require a power supply

Read more: The 3 Types of Network Protocols

Uses for an ethernet hub

With limited capabilities, hubs have only one basic function in a modern networking environment: connecting multiple Ethernet ports into a single network. Hubs are a useful, inexpensive solution for small LAN environments that need to connect multiple devices together when the router doesn't have enough Ethernet ports. They are also a cheap cabling option in small environments with low network traffic. 

What is a switch?

A network switch is a hardware connection device that is smarter than a hub. Once a switch knows the routes and ports, it reads data packet headers to determine which device it is supposed to transmit information to via its unique MAC address. Switches operate on the OSI framework's data link layer or layer 2. Unlike hubs, network switches offer a full-duplex function, meaning information being sent and received gets access to the full bandwidth of the network connection. Network switches have three core functions:

  • Edge switches: Direct network traffic flows in and out of the network from devices and access points

  • Distribution switches: Found in the middle of network topology and connect to switches closer to the edge of the network

  • Core switches: The core parts of a network that connect various edge and distribution switches and user devices to a data center or enterprise network 

Read more: Edge Computing vs Cloud Computing: Differences and Use Cases

Uses for a switch

Switches are a core part of a modern enterprise network. Network switches have varying degrees of functionality based on the needs of the network; however, most switches do these core functions: 

  • Control which Ethernet ports are active on the switch 

  • Manage whether a port will run at half or full duplex 

  • Monitor network traffic and the status of the connection

  • Configure quality of service (QoS) for connected devices, which gives priority to high-performance network activity 

Network switches also create a table of MAC address values to route traffic to the device that requested service efficiently. Switches are smarter and more efficient hardware devices than network hubs because they can record information and learn MAC addresses. 

Can you run ethernet through a switch to the router?

Yes, you can wire an ethernet switch to your router directly by plugging it into the ethernet port. This allows you to access the internet directly through your modem.

Placeholder

Network hub vs. switch

Although modern network switches are replacing hubs, each network device has use cases. Consider the technical differences between a switch and a hub so you can make informed decisions about when to use each. 

SwitchHub
Switches function on layer 2 of the OSI framework.Hubs function on layer 1 of the OSI framework.
Switches record MAC addresses in a table to learn which devices to transmit information to.Hubs are less intelligent devices and always send all information to all connected devices.
Switches connect devices to a singular LAN to transmit data from one device to another.Hubs group Ethernet devices on a LAN, broadcasting all data to all devices.
Switches can operate at full duplex or half duplex, using all available bandwidth, creating faster and more efficient networks.Hubs operate at half duplex, making them slower and forcing devices to share bandwidth equally.
Switches send information using data packets.Hubs send information using bits.

Sharpen your networking skills with Coursera

If you're transitioning into an IT role and still building your expertise, consider earning the IBM IT Support Professional Certificate. In as little as three months, you'll gain the skills you need to excel in an entry-level role, as well as a shareable certificate for your resume and LinkedIn.

Or, specialize your IT knowledge in the in-demand field of cloud computing with IBM's Information Technology (IT) and Cloud Fundamentals Specialization, where you'll build computer networking skills and learn how to set up and encrypt mobile devices.

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.