NetwNETW
/EXPLORE

Every box has a job

Pick a device or protocol. See what it does, how it does it, and what it is like in real life.

Switch

Layer 2

A switch connects devices inside one local network and sends each frame only to the port that needs it.

Like: A receptionist who learns which room each person is in and sends visitors straight there.
How it works
  1. 01Reads the source MAC and remembers which port it came from.
  2. 02Looks up the destination MAC in its table.
  3. 03Forwards to one port, or floods if the destination is unknown.

How a switch really works

Watch the MAC table build itself. Pick a source and a destination, then send a frame.

Loading the switch scene…
MAC address table
PortMACDevice
1—PC 1
2—PC 2
3—PC 3
4—PC 4
Pick two PCs and send a frame. The switch starts with an empty table.

A switch reads the source MAC of every incoming frame and remembers which port it arrived on. That is MAC learning.

If the destination MAC is known, the frame goes only to that port. If it is unknown, the switch floods it to every port except the one it arrived on.

A hub does none of this. It sends every frame to every port, which wastes bandwidth and creates one big collision domain.