Professional Learning | Empower Educators

5 Network Hardware: Switches vs Routers


While routers are the gateway between your LAN and a larger WAN (like your ISP), switches control traffic within your LAN. Switches have multiple ports that allow different configurations for connecting all of your devices to your network. Switches play a major role in managing traffic on your network, forwarding data packets, and can help increase bandwidth within your LAN.

This is a basic introduction to Network Hardware: Switches and Routers.  To learn more, explore the following sub-topics:

  1. VLANS
  2. Common CLI Commands for Switches
  3. Assigning an IP to a Switch
  4. Network Hardware: Routers

You should know the following terms:

  • Switch
  • MAC address
  • MAC address table
  • Layer 2 versus Layer 3 switch
  • Unmanaged switch
  • Managed switch

Switches are used to move data packets within the same local network. Most switches operate at the OSI Layer 2 (data link layer). To move data packets at this layer, the switch has to know the MAC addresses of the devices on its local network. All of the devices on the local network are connected to one of the ports on a switch. Through those connections, a switch can learn the MAC addresses of every device that connects to it and stores those addresses in a MAC address table. A switch’s ability to learn and update the MAC address table is incredibly important as devices might be removed and replaced by others on a network, and those would, of course, have a different MAC address. Switches can track which devices are connected to your network in real time.

When a host device sends a data package to a switch that is intended for another host device, it includes its MAC address. The switch checks to see if the MAC address it received is the same in its MAC Address Table, and if it is not, it first updates the information for that port in its MAC Address table. If it knows the MAC address of the intended device, it forwards the data packet on.

When a switch receives a data package but does not have the desired recipient’s MAC address in its MAC address table, it will flood the network by sending the data package to the rest of the network through a broadcast message. Those devices for which the data package was not intended will discard it. The intended device accepts the data package and sends a response back to the switch to confirm to the original sender that the data was received. When the switch receives that response message, it can then update its MAC Address Table with the recipient host’s MAC Address. With an updated MAC address table, a switch can then transfer data between those two devices directly without having to flood the network unless one of those devices is removed from the local network.

A Layer 3 switch has routing capabilities. Most switches on your network are likely to operate at Layer 2, and if you only have Layer 2 switches on your LAN, you can go with additional Layer 2 switches if you need to add more. If you need a switch to handle inter-VLAN routing, you’ll need a Layer 3 switch. When data has to be transferred beyond your LAN to your ISP or the Internet, a router will do the job.

Managed versus Unmanaged Switches

An unmanaged switch makes it easy for people to connect devices to your network and take advantage of that access. They are more reasonable in cost but have limitations compared to managed switches. At their most basic, you can connect an unmanaged switch to a power supply and then to your network through an ethernet cable. You can then add devices to the open ports through more ethernet cables. 

A managed switch gives you more control over the network traffic on your LAN but may require an administrator with advanced network skills to deploy and support them. You can prioritize certain channels or create new virtual groups to keep some devices segregated. This can improve the performance of your network. Managed switches become more important as the number of devices on your network increases and may be necessary for securing highly sensitive data, such as employee or student records. 

Unmanaged switches also have basic security compared to managed switches. A managed switch has the benefits of being able to monitor and control network traffic, shutting down active threats, and protection for data control, often through a command-line or web interface that you can access from different locations. The features for managed switches vary. 

Here are additional resources you may find useful:

Complete the following task or self-assessment:

Find the documentation for the switches on your network.

  • Do you have all Layer 2 switches or does the network include Layer 3 switches.
  • Which switches are managed versus unmanaged?
  • If you have managed switches, determine who has access to manage the switches on your network to review how they are configured.