Home

How do network switches work?

In the early days of networking, wired Ethernet network devices were interconnected through a device called a “hub”, where a wired frame would come in on one port and be broadcast out to all other ports. While relatively simple, this technology caused a lot of noise and consumed a lot of excess capacity on wired networks, as all messages were broadcast to all devices connected to a hub, regardless of their intended destination.

With network switches, each switch port creates a point-to-point link with the device it is connected to. The network switch maintains a database of MAC addresses indicating what devices are connected on individual ports. When a frame enters the switch on a particular port, the switch examines the source MAC address and destination MAC address. The source MAC address is used to update the database to indicate that the client is accessible on that port. If the destination MAC address is already in the database as being connected to a different switch port, the frame is only forwarded out along the indicated port. If the destination MAC address is not in the database, or if is a broadcast message (e.g. DHCP request), the packet is sent out all other ports as is done in a hub.