How a Network Switch Forwards Frames

The Switch's Job: Forward Frames Intelligently

A network switch connects multiple devices on a local network and decides exactly which port to forward each incoming frame out of, based on its destination MAC address - rather than blindly repeating every frame out of every port.

Building the MAC Address Table

A switch learns which device is connected to which port by watching the source MAC address of every frame it receives.

MAC Address Table
Port 1  ->  AA:BB:CC:11:22:33
Port 2  ->  AA:BB:CC:44:55:66
Port 3  ->  AA:BB:CC:77:88:99

How a Forwarding Decision Is Made

  1. A frame arrives with a destination MAC address.
  2. The switch checks its MAC address table for that destination.
  3. If found, the frame is forwarded only out that specific port.
  4. If not found (an unknown destination), the frame is flooded out every port except the one it arrived on - this is the only time a switch behaves like a simple repeater.

Why This Beats an Old-Fashioned Hub

A hub has no intelligence at all - it repeats every incoming signal out of every other port, regardless of destination, creating unnecessary traffic and even collisions when two devices send at the same time. A switch's learned forwarding table means each device generally only receives traffic actually meant for it, making switched networks far more efficient and scalable.

The One Case Switches Still Flood: Broadcasts

Frames addressed to the special broadcast MAC address are always sent out every port, since a broadcast is explicitly meant for every device on the network - this is a deliberate exception, not a failure to learn the destination.

Written by Lorens Mishra

Software Engineer Notes Management System Administrator

Discussion

0 comments
Sign in to join the discussion.

No comments yet. Be the first to say something.