Ethernet Technology Basics · Topic 1 of 5

Ethernet Frames and Switch Forwarding

Learn Ethernet, CSMA/CD, Ethernet II and IEEE 802.3 frame fields, MAC address types, and how a Huawei switch learns and forwards frames for H12-811.

  • 5 min
In a nutshell
  • A MAC address is 48 bits: 24-bit OUI plus 24 bits from the vendor.
  • If the lowest bit of the first byte is 1 the address is multicast; all ones is broadcast.
  • Ethernet II frame: DMAC 6, SMAC 6, Type 2, Data 46 to 1500, FCS 4 bytes.

What it is

Ethernet is the LAN technology defined by the IEEE 802.3 standards. It defines the cabling and signaling at the physical layer and the frame format and MAC addressing at the data link layer.

An Ethernet frame carries a packet across one link, with source and destination MAC addresses and an error check. An Ethernet switch reads the frame's MAC addresses, learns where each host is, and forwards the frame only out the port that leads to the destination.

Frame arrivesLearn source MACport and VLANLook up destination MACKnownforward out one portUnknown or broadcastflood

How it works

The Ethernet protocol

Early shared Ethernet used a bus or a hub, where all hosts were in one collision domain. Hosts used CSMA/CD (carrier sense multiple access with collision detection): listen before sending, detect a collision, then wait a random time and retry.

Switches gave each port its own collision domain and allowed full duplex, sending and receiving at the same time. CSMA/CD is needed only on half-duplex links. Common standards include 100BASE-TX (Fast Ethernet), 1000BASE-T (Gigabit over twisted pair) and 10GBASE fiber standards.

MAC addresses

A MAC address is 48 bits (6 bytes). The first 24 bits are the OUI, assigned by the IEEE to the vendor, and the last 24 bits are assigned by the vendor. Huawei writes MAC addresses as three groups of four hex digits, for example 00e0-fc12-3456.

TypeHow to recognize itExample
UnicastLowest bit of the first byte is 000e0-fc12-3456
MulticastLowest bit of the first byte is 10100-5e00-0005
BroadcastAll 48 bits are 1ffff-ffff-ffff

A source MAC address is always unicast. The destination can be any of the three.

Ethernet II and IEEE 802.3 frames

FieldSizeMeaning
Destination MAC (DMAC)6 bytesReceiver
Source MAC (SMAC)6 bytesSender
Type (Ethernet II) or Length (802.3)2 bytesUpper protocol, or length of the data
Data46 to 1500 bytesThe payload, padded if shorter than 46
FCS4 bytesCRC check to detect errors

The frame is 64 to 1518 bytes. If the 2-byte field is 0x0600 (1536) or more, it is a Type and the frame is Ethernet II. If it is 1500 or less, it is a Length and the frame is IEEE 802.3, which adds an LLC header (DSAP, SSAP and Control) and, in the SNAP form, an OUI and a Type.

Type valueUpper protocol
0x0800IPv4
0x0806ARP
0x86DDIPv6
0x8100802.1Q VLAN tag follows

IP traffic normally uses Ethernet II. STP BPDUs use the 802.3 format with LLC.

How a switch forwards frames

A switch keeps a MAC address table that maps MAC addresses to ports and VLANs. It learns from every frame, then forwards, floods or discards it.

ActionWhen it happens
LearnRecords the source MAC, the inbound port and the VLAN
ForwardDestination MAC is in the table, so the frame goes out that one port
FloodDestination is broadcast, unknown unicast or unknown multicast, so the frame goes out every port in the VLAN except the inbound one
DiscardDestination MAC is on the same port the frame came in on

Dynamic entries age out if the switch does not see the source again. The default aging time is 300 seconds on Huawei switches. You can view the table with display mac-address.

<SW1> display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID
               VSI/SI                                              MAC-Tunnel
-------------------------------------------------------------------------------
5489-98a1-0001 1           -      -      GE0/0/1         dynamic   0/-
5489-98a1-0002 1           -      -      GE0/0/2         dynamic   0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2

Static entries can be added with mac-address static, and they never age out.

A worked example

PC1 on GE0/0/1 sends a frame to PC2 on GE0/0/2, and the table is empty. The switch learns PC1's MAC on GE0/0/1, cannot find PC2, and floods the frame out every other port in the VLAN, here GE0/0/2 and GE0/0/3.

PC2 replies. The switch learns PC2's MAC on GE0/0/2 and forwards the reply only out GE0/0/1, because PC1 is now known. From then on, traffic between them is not flooded.

How the exam asks about this

  • "A switch receives a unicast frame whose destination MAC is not in its MAC address table. What does it do?" → It floods the frame out all ports in the same VLAN except the inbound port.
  • "What is the default MAC address aging time on a Huawei switch?" → 300 seconds.
  • "A frame has Type 0x0806. What does it carry?" → An ARP message.

What to remember for the exam

  • A MAC address is 48 bits: 24-bit OUI plus 24 bits from the vendor.
  • If the lowest bit of the first byte is 1 the address is multicast; all ones is broadcast.
  • Ethernet II frame: DMAC 6, SMAC 6, Type 2, Data 46 to 1500, FCS 4 bytes.
  • A Type or Length value of 0x0600 or more means Ethernet II.
  • Switches learn source MACs, forward known unicast, and flood broadcast and unknown unicast.
Watch out

A switch learns from the source MAC, never the destination MAC. Questions often describe a frame and ask which entry is added.

Common mistakes

Thinking a switch floods every frame. It floods only broadcast, unknown unicast and unknown multicast frames. Known unicast goes out one port.

Mixing the Type and Length meanings. Below 1500 the field is a Length (802.3). From 0x0600 up it is a Type (Ethernet II).

Forgetting the minimum frame size. The data field must be at least 46 bytes, so short payloads are padded to keep the frame at 64 bytes.

Check yourself

  • Which part of a MAC address identifies the vendor?

    The first 24 bits, the OUI, assigned by the IEEE.

  • What does a switch do with a frame whose destination MAC is on the same port it arrived on?

    It discards the frame, because the destination is already on that segment.

  • Which Ethernet frame field detects transmission errors?

    The 4-byte FCS, a CRC value the receiver recalculates and compares.

Topic 1 of 5 in Ethernet Technology Basics

Test yourself on Ethernet Technology Basics

The full Huawei HCIA-Datacom H12-811 question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Huawei. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.