What is a network switch?

A network switch is a device that connects devices together on a LAN. A switch is essentially a multiport network bridge and performs the same basic functions as a bridge, but at much faster speeds and with many additional features. Each port on a switch is in a separate collision domain and can run in the full duplex mode, which means that hosts connected to a switch port can transmit to the switch at the same time that the switch transmits to them.

An Ethernet switch usually works at the Data link layer of the OSI model (Layer 2). It manages the flow of data across a network by inspecting the incoming frame’s destination MAC address and forwarding the frame only to the host for which the message was intended. Each switch has a dynamic table (called the MAC address table) that maps MAC addresses to ports. With this information, a switch can identify which system is sitting on which port and where to send the received frame.

To better understand how a switch works, consider the following example:

network switch

Host A is trying to communicate with Host C and sends a packet with the Host C’s destination MAC address. The packet arrives at the switch, which looks at the destination MAC address. The switch then searches that MAC address in its MAC address table. If the MAC address is found, the switch then forwards the packet only out the port connected to the frame’s destination. Hosts connected to other ports will not receive the frame.

Geek University 2022