switch

term

networking

A device that forwards frames within a network by learning which addresses live on which port.

It learns by watching: every frame that arrives teaches it where the sender is, and anything it has not learned yet is flooded to every port. That single behaviour explains most of what operators see - a network that works before the table populates, traffic appearing where it should not during a topology change, and the reason a loop is catastrophic rather than merely wasteful, since flooded frames multiply with nothing to stop them.

Everything a switch does follows from one table and three habits. It reads the source address of each arriving frame and records the port it came in on (learning); it sends a frame for an address it has not learned out of every other port (flooding); and it forgets an entry that has gone quiet, after 300 seconds by default on a Linux bridge (ageing). With VLANs the table takes two keys, the address and the VLAN, so one switch holds several separate Layer 2 networks.

Those habits explain the failures. A table that has just been cleared floods everything until it relearns, which is why a topology change briefly puts traffic on the wrong ports. A loop is lethal because a flooded frame carries no hop count and circulates until something breaks the loop, which is the job spanning tree does. And a table deliberately overfilled with fake source addresses leaves the switch flooding like a hub to anyone listening, which is what port security exists to stop.

Also known as: layer 2 switch

← All glossary entries