BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › CCNA › 1. Network Fundamentals

Ethernet Switching 1

Written reference: Analyze the Ethernet frame format, MAC address structure, hexadecimal notation, and the switch MAC address learning and forwarding process.

About 12 minutes

Why it matters

A switch that cannot learn addresses floods every frame out of every port. Understanding the learning process explains both normal forwarding and odd traffic.

How Switches Forward Ethernet Frames

A standard Ethernet frame has a minimum size of 64 bytes and a maximum of 1518 bytes.

MAC addresses are 48 bits (6 bytes) long, represented as 12 hexadecimal characters.

Switches dynamically learn MAC addresses by inspecting the Source MAC of incoming frames.

When a switch receives a frame destined for an unknown MAC, it floods the frame out all ports except the receiving port.

The Ethernet Frame Layout

Ethernet frames encapsulate Layer 3 packets for transmission over physical media: • Minimum size: 64 bytes (header + payload + trailer) • Maximum size: 1518 bytes • Minimum payload: 46 bytes (if smaller, zeroes are added as padding). • FCS / CRC: When a switch receives a frame, it computes a mathematical CRC value and checks it against the FCS in the trailer. If corrupted, the frame is silently dropped.

MAC Address Anatomy

A MAC address is a 48-bit (6-byte) identifier assigned to a network interface card (NIC): • First 3 bytes (24 bits): Organizationally Unique Identifier (OUI) identifying the vendor (e.g. Cisco, Intel). • Last 3 bytes (24 bits): Vendor-assigned unique identifier for that specific chip. • Formats: Cisco uses xxxx.xxxx.xxxx (e.g. 0001.42a1.5b23), IEEE uses xx:xx:xx:xx:xx:xx.

Switch Forwarding Logic (Flooding & Learning)

When a frame enters a switchport: 1. Learning: The switch inspects the SOURCE MAC address. It records the MAC address and the receiving port into its MAC address table (CAM table) with a 5-minute aging timer. 2. Forwarding Decision: The switch inspects the DESTINATION MAC address: • If the destination is a Broadcast (FFFF.FFFF.FFFF), it floods the frame out all other ports in that VLAN. • If the destination is a Known Unicast (found in MAC table), it forwards the frame only out that specific port. • If the destination is an Unknown Unicast (not in table), it floods the frame out all other ports in the VLAN.

Ethernet Frame Structure Fields

Field: Preamble · Size: 7 bytes · Purpose: Clock synchronization (pattern 10101010 * 7)

Field: SFD (Start Frame Delimiter) · Size: 1 byte · Purpose: Marks the end of preamble and start of frame (10101011)

Field: Destination MAC · Size: 6 bytes · Purpose: Hardware address of receiving device or broadcast/multicast

Field: Source MAC · Size: 6 bytes · Purpose: Hardware address of transmitting device

Field: Type / Length · Size: 2 bytes · Purpose: Identifies Layer 3 protocol (0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP)

Field: Payload (Data) · Size: 46 - 1500 bytes · Purpose: Encapsulated packet (padded to 46 bytes if smaller)

Field: FCS (Frame Check Sequence) · Size: 4 bytes · Purpose: CRC checksum trailer to detect transmission errors

Hexadecimal to Decimal Reference

Hex: 0 · Binary: 0000 · Decimal: 0 · Hex: 8 · Binary: 1000 · Decimal: 8

Hex: 1 · Binary: 0001 · Decimal: 1 · Hex: 9 · Binary: 1001 · Decimal: 9

Hex: 2 · Binary: 0010 · Decimal: 2 · Hex: A · Binary: 1010 · Decimal: 10

Hex: 3 · Binary: 0011 · Decimal: 3 · Hex: B · Binary: 1011 · Decimal: 11

Hex: 4 · Binary: 0100 · Decimal: 4 · Hex: C · Binary: 1100 · Decimal: 12

Hex: 5 · Binary: 0101 · Decimal: 5 · Hex: D · Binary: 1101 · Decimal: 13

Hex: 6 · Binary: 0110 · Decimal: 6 · Hex: E · Binary: 1110 · Decimal: 14

Hex: 7 · Binary: 0111 · Decimal: 7 · Hex: F · Binary: 1111 · Decimal: 15

The words you need

Ethernet Frame — The Layer 2 PDU used to encapsulate and transmit data over an Ethernet network.

Preamble & SFD — 7 bytes of alternating 10101010 plus 1 byte of SFD (10101011) that alert the receiving NIC that a frame is arriving and synchronize timing.

Type / Length Field — 2-byte field in the Ethernet header. If value is >= 1536 (0x0600), it indicates the Layer 3 protocol (0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP).

FCS (Frame Check Sequence) — 4-byte trailer at the end of the frame containing a Cyclic Redundancy Check (CRC) used to detect corrupted data.

MAC Address — 48-bit (6-byte) physical hardware address burned into the NIC. Format: 24-bit OUI (vendor identifier) + 24-bit vendor-assigned device ID.

OUI — Organizationally Unique Identifier. The first 3 bytes (24 bits) of a MAC address assigned to the hardware manufacturer by the IEEE.

Known Unicast — A frame destined for a single device whose MAC address already exists in the switch's MAC address table; forwarded directly out one port.

Unknown Unicast — A frame destined for a unicast MAC address not yet in the switch's MAC address table; the switch floods it out all ports except the arrival port.

Aging — The process of removing dynamic entries from the switch MAC table after an inactivity timer (default 300 seconds / 5 minutes).

Ethernet forwarding: learn the source, look up the destination — Understand the mechanism

A switch learns a source MAC address against the receiving port and VLAN. It uses the destination MAC to choose the forwarding action. These are separate operations: learning a sender does not mean the destination is already known.

For ordinary learning and forwarding, a known unicast destination selects its eligible egress port. An unknown unicast is flooded to eligible forwarding ports in the same VLAN, excluding the receiving port. Flooding does not change the frame destination into the broadcast address.

Ethernet forwarding: learn the source, look up the destination — Worked example: follow the frame

A sends from port1 to B on port2 in VLAN 10. With no B entry, the first frame may be flooded in VLAN 10 while A is learned on port1. When B replies, the switch learns B on port2 and can forward later A-to-B frames directly.

A learned address records where a source was observed, not a user identity. Dynamic entries can age out or move after topology changes. A stale cable map and a current learning table can therefore disagree without the destination IP address changing.

Ethernet forwarding: learn the source, look up the destination — Verify the result and avoid the trap

Observe the intended VLAN and both source/destination MACs. Send bounded traffic, compare the learning table and port state, then check the peer. Keep VLAN membership, STP forwarding state and actual traffic observations together; an unrelated MAC entry does not prove this path.

Takeaways

Next: Ethernet Switching 2

More free lessons in 1. Network Fundamentals