How a Network Switch Forwards Frames
- Networking Fundamentals & OSI Model
- TCP/IP Model
- Network Topologies
- IP Addressing & Subnetting
- Routing Algorithms & Protocols
- Switching Concepts
- Transport Layer Protocols (TCP & UDP)
- Application Layer Protocols
- Network Security & Firewalls
- Wireless Networking & Wi-Fi
- Network Address Translation (NAT)
- DNS Deep Dive
- Congestion Control & Flow Control
- Error Detection & Correction
- Network Devices
- VPN & Tunneling
- Load Balancing & CDN Networking
- Socket Programming
- Network Troubleshooting Tools
- Physical Layer & Transmission Media
- Data Link Layer & MAC Addressing
- Ethernet Protocol
- ARP (Address Resolution Protocol)
- ICMP Protocol
- Unicast, Multicast, Broadcast and Anycast
- Proxy Servers
- Port Numbers Reference
- Network Performance Metrics
- Quality of Service (QoS)
- Software-Defined Networking (SDN)
- HTTP/2 and HTTP/3 Overview
- 5G and Mobile Networks
- IoT Networking Basics
- VoIP Networking Basics
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:99How a Forwarding Decision Is Made
- A frame arrives with a destination MAC address.
- The switch checks its MAC address table for that destination.
- If found, the frame is forwarded only out that specific port.
- 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.