Layer 2 devices (like switches) examine the destination MAC address in the Ethernet frame header to decide where to forward the frame.

Quick Scoop: What the Switch Actually Looks At

When an Ethernet frame arrives at a Layer 2 device, it does not care about IP addresses at all. It focuses on Layer 2 information, especially MAC addresses.

Key header fields in a typical Ethernet frame include:

  • Destination MAC address
  • Source MAC address
  • EtherType (or length)
  • Optional VLAN tag (802.1Q)
  • Payload and FCS (trailer, for error checking)

But for forwarding the frame onward, one field is the star of the show.

The One Field That Matters for Forwarding

Layer 2 switching is all about “where should I send this frame next on the LAN?”

To answer that, the device uses:

  • Destination MAC address
    • The switch looks up this address in its MAC address table to see which port it’s associated with.
* If there’s a match, it forwards the frame out that specific port.
* If there’s no entry, it typically floods the frame out all ports (except the one it came in on).

The source MAC address is also examined, but for a different reason: the switch learns which MAC lives on which port and updates its MAC address table. It’s not the key field for deciding the outbound port for that particular frame.

Why Not IP Addresses or EtherType?

The question often includes distractors like “source IP,” “destination IP,” or “Ethernet type.”

  • IP addresses (source/destination IP)
    • These live in the Layer 3 packet, inside the frame payload, not in the Ethernet header itself.
* They are used by routers (Layer 3 devices), not by pure Layer 2 switches for forwarding.
  • EtherType field
    • Indicates what protocol is encapsulated (e.g., IPv4, IPv6, ARP).
* Useful for identifying the upper-layer protocol, but not what determines which switch port the frame leaves on.

So if you’re choosing from options like:

  • source MAC address
  • source IP address
  • destination MAC address
  • Ethernet type
  • destination IP address

…the correct choice for forwarding the data onward at Layer 2 is:

destination MAC address.

Mini Example Story

Imagine a small office switch with three devices: PC-A, PC-B, and a printer.

  1. PC-A sends a frame to the printer. The frame’s Ethernet header has:
    • Source MAC = PC-A
    • Destination MAC = Printer
  1. The switch:
    • Learns “PC-A’s MAC is on port 1” from the source MAC.
 * Looks up the **destination MAC** (printer) in its MAC address table.
  1. If the printer MAC is mapped to port 3, the switch forwards the frame out only port 3.

Everything about that forwarding choice comes down to the destination MAC address in the Ethernet frame header.

Information gathered from public forums or data available on the internet and portrayed here.