Switching Basics

How switches forward frames inside a LAN


+ What is a Switch?

A switch is a Layer 2 networking device that connects devices within a local network and forwards data based on MAC addresses.

+ Why do we need a Switch?

Switches reduce collisions, improve performance, and send data only to the intended destination instead of all devices.

+ What is a MAC Address Table?

A MAC address table (CAM table) stores MAC addresses and their associated switch ports. Switches use this table to forward frames efficiently.

+ MAC Address Learning

When a switch receives a frame, it learns the source MAC address and records it in the MAC table with the incoming port.

+ Flooding

If the destination MAC address is unknown, the switch sends the frame out of all ports except the source port.

+ Forwarding

Once the destination MAC address is known, the switch forwards the frame only to the correct port.

+ Collision Domain vs Broadcast Domain
  • Collision Domain: Each switch port is one collision domain
  • Broadcast Domain: All ports belong to one broadcast domain (unless VLANs are used)