A hub repeats incoming electrical signals out multiple ports. A learning Ethernet switch instead builds a table that maps source MAC addresses to ports and forwards a known destination only toward the appropriate port. VLANs then let one physical switch infrastructure host multiple logical broadcast domains.
Remember the shape, not the sentence
“A hub is like yelling an announcement through every hostel room. A switch is a receptionist who learns who is in which room and forwards the note only where it belongs.”
MAC learning
When a frame arrives on port 7 with source MAC AA:AA, the switch records AA:AA → port 7. Later traffic addressed to AA:AA can be forwarded specifically to port 7.
Unknown destination behavior
If the destination MAC is unknown, the switch floods within the same VLAN, except back out the ingress port. Once the switch learns the destination, forwarding becomes selective.
VLANs change broadcast scope
A VLAN creates a separate Layer 2 broadcast domain. Communication between VLANs requires a Layer 3 function such as a router or Layer 3 switch.
See the mechanism before you memorize it
One diagram, one causal story, one reconstruction task.
Switches, VLANs, and why hubs died — causal map
Learn
Observe source MAC → ingress port.
Lookup
Search the destination MAC in the CAM/MAC table.
Forward
Send only through the destination port when known.
Flood
If unknown/broadcast, flood inside the relevant VLAN.
Draw the idea yourself
Rebuild the core flow on a real canvas before moving to the worked walkthrough.
Walk the system
Learn
Observe source MAC → ingress port.
Lookup
Search the destination MAC in the CAM/MAC table.
Forward
Send only through the destination port when known.
Flood
If unknown/broadcast, flood inside the relevant VLAN.
Segment
Use VLANs to isolate broadcast domains and policy boundaries.
Tiny MAC table
A switch's forwarding database is state learned from traffic. It is not a static list written by humans for every endpoint.
VLAN 10
AA:AA:AA → Gi1/0/1
BB:BB:BB → Gi1/0/7
CC:CC:CC → Gi1/0/12What usually goes wrong
Close the tab. Rebuild it from memory.
Read the question, answer aloud, then reveal.
What field teaches a switch where a host lives?Reveal answer
The source MAC address of an incoming frame, paired with the ingress port and VLAN.
Why are VLANs useful?Reveal answer
They provide logical separation of Layer 2 broadcast domains and can enforce segmentation without requiring a separate physical switch for every group.
What device is required for inter-VLAN routing?Reveal answer
A Layer 3 function such as a router or multilayer switch.
Make this idea travel.
Connect it next to: frame-trace • ipv4-cidr • routing.