Ethernet frames & MAC addresses
Read an Ethernet frame and explain unicast, broadcast and multicast MAC addresses.
By Invicly Tech, , in Computer Networking. About 10 minutes to read.
In short
Ethernet is the dominant layer 2 technology for wired LANs. Each frame carries destination and source MAC addresses, a type field saying what is inside, the payload and a checksum. A MAC address is a 48-bit identifier whose first half identifies the manufacturer.
Explained simply
Ethernet is the set of rules for sending data across a local network. It chops data into pieces called frames. Each frame is like an envelope with a destination address, a sender address, a label saying what is inside, the contents, and a small check value at the end to catch damage.
The addresses on Ethernet frames are MAC addresses. A MAC address is 48 bits long and is written as six pairs of hexadecimal digits, like 3c:22:fb:12:34:56. The first half usually tells you who made the network card; the second half is a serial number chosen by that maker.
A frame can be sent to one device (unicast), to every device on the LAN (broadcast, address ff:ff:ff:ff:ff:ff), or to a group of interested devices (multicast). Network cards ignore frames that are not for them, so a laptop does not waste time on traffic meant for the printer.
MAC addresses only matter on the local link. When your data leaves your network through a router, the router puts it in a new frame with new MAC addresses. The IP address is what carries your data across the internet; the MAC address only gets it to the next box.
Press Play on a diagram to walk through it one step at a time.
- 1Destination MAC
6 bytes
- 2Source MAC
6 bytes
- 3EtherType
2 bytes: 0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP
- 4Payload
46 to 1500 bytes
- 5FCS
4-byte CRC checksum
- One receiver
- First byte even, e.g. 3c:22:fb:...
- Switch forwards out one port once learned
- Every host in the VLAN
- ff:ff:ff:ff:ff:ff
- Used by ARP and DHCP discover
- Always flooded
- Hosts that joined a group
- 01:00:5e:... (IPv4), 33:33:... (IPv6)
- Flooded unless IGMP or MLD snooping limits it
In depth
Inside the Ethernet II frame
Before the frame itself, the sender transmits a 7-byte preamble of alternating 1s and 0s and a 1-byte start frame delimiter, so the receiver can lock on to the timing. Then come the 6-byte destination MAC, the 6-byte source MAC and a 2-byte field called EtherType. Destination comes first on purpose: a switch can start deciding where to send the frame after reading only 6 bytes.
The 2-byte field has two meanings. If its value is 0x0600 (1536) or more, it is an EtherType naming the payload: 0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP. If it is 1500 or less, it is a length, and the frame uses the older IEEE 802.3 format with an LLC header, still used by Spanning Tree. A VLAN tag, when present, is inserted right after the source MAC and starts with 0x8100.
- 0x0800 IPv4, 0x86DD IPv6, 0x0806 ARP
- 0x8100 802.1Q VLAN tag, 0x88A8 QinQ outer tag
- 0x88CC LLDP, 0x8847 MPLS
- Value 1500 or below = length field (802.3 frame)
The two special bits in every MAC address
The first byte of a MAC address hides two flags. The lowest bit is the I/G bit: 0 means an individual (unicast) address, 1 means a group (multicast or broadcast) address. So any MAC whose first byte is odd, like 01:00:5e:..., is multicast. The next bit is the U/L bit: 0 means a globally unique address assigned by the maker under its OUI, 1 means a locally administered address chosen by software.
In practice, if the second hex digit is 2, 6, A or E, the address is locally administered unicast. You see these on virtual machines, Docker bridges and on phones and laptops that use random MAC addresses on Wi-Fi for privacy. That is why a vendor lookup on such an address finds nothing: it never came from a vendor.
- Bit 0 (I/G) = 0
- Unicast
- Example: 3c:22:fb:...
- Bit 0 (I/G) = 1
- Multicast or broadcast
- Example: 01:00:5e:..., ff:ff:...
- Bit 1 (U/L) = 0
- Globally unique
- OUI assigned by IEEE
- Bit 1 (U/L) = 1
- Locally administered
- VMs, containers, random Wi-Fi MACs
Multicast MACs and how IP maps onto them
Multicast frames go to a group, and each host joins only the groups it cares about. IPv4 multicast addresses map onto MACs starting 01:00:5e, followed by the low 23 bits of the group IP. For example 224.0.0.251 (mDNS) becomes 01:00:5e:00:00:fb. Because only 23 of the 28 group bits fit, 32 different IP groups share each MAC, and the host's IP layer filters out the extras.
IPv6 multicast uses MACs starting 33:33 followed by the last 32 bits of the IPv6 address, so ff02::1 (all nodes) becomes 33:33:00:00:00:01. Some link-layer protocols have their own reserved multicast MACs: Spanning Tree uses 01:80:c2:00:00:00 and LLDP uses 01:80:c2:00:00:0e. Switches treat these specially and do not forward them like normal traffic.
How the frame check sequence catches damage
The last 4 bytes of a frame are the FCS, a CRC-32 checksum calculated over everything from the destination MAC to the end of the payload. The receiver runs the same calculation; if the result differs, the frame was damaged on the way and is dropped silently. Ethernet never asks for a resend. Recovery, if any, is left to higher layers such as TCP.
The CRC detects all single-bit and double-bit errors and all error bursts up to 32 bits long, which covers most real damage. Frames shorter than the 64-byte minimum are called runts and frames longer than the maximum are giants; both are counted and discarded. Because the FCS is usually checked and removed by the network card, Wireshark often does not show it at all.
Learn it in 4 short steps
About 30m each. Track them with a timer in your plan.
- 1Dissect the Ethernet II frame format~30m
- 2Read MAC address OUI and NIC parts~30m
- 3Distinguish unicast, broadcast and multicast~30m
- 4Explain the frame check sequence~30m
Key points
- ff:ff:ff:ff:ff:ff is the broadcast address, received by every host on the LAN.
- The first 3 bytes are the OUI identifying the vendor.
- Frames with a bad FCS are silently dropped.
- MAC addresses only matter on the local link; they do not cross routers.
Key terms
Tap a card to flip it. 0/4 known
Examples
ip link show eth0 # link/ether shows your MAC
sudo tcpdump -i eth0 -e -nn -c 3 # print MAC headers of framesDecoding a frame by hand
tcpdump -e prints: 3c:22:fb:12:34:56 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42. Step 1: the source MAC starts with 3c, binary 0011 1100. Bit 0 is 0 (unicast) and bit 1 is 0 (globally unique), so it is a real vendor address. Step 2: the destination is all ones: broadcast. Step 3: EtherType 0x0806 means the payload is ARP. Step 4: length 42 is 14 bytes of header plus a 28-byte ARP message. On the wire the card pads it to the 60-byte minimum plus a 4-byte FCS, making 64 bytes.
sudo tcpdump -i eth0 -e -nn -c 5 'ether broadcast'
sudo tcpdump -i eth0 -e -nn 'ether host 3c:22:fb:12:34:56'
sudo tcpdump -i eth0 -e -nn 'ether proto 0x86dd' # IPv6 onlyChanging a MAC address temporarily
A lab network only allows a registered MAC, and you want to test with a spare laptop. Step 1: bring the interface down. Step 2: set a locally administered address, which starts with 02 so it cannot clash with any vendor address. Step 3: bring it up and confirm. Step 4: note that this only lasts until reboot; NetworkManager has its own setting, ethernet.cloned-mac-address, for a permanent change. Remember a MAC is easy to change, so it is not proof of identity.
ip link show eth0 | grep link/ether
sudo ip link set dev eth0 down
sudo ip link set dev eth0 address 02:00:00:aa:bb:01
sudo ip link set dev eth0 up
ip link show eth0 | grep link/etherQuick reference
- Frame: dst MAC 6, src MAC 6, EtherType 2, payload 46-1500, FCS 4 bytes
- Odd first byte = multicast; second hex digit 2, 6, A, E = locally administered
- IPv4 multicast MAC = 01:00:5e + low 23 bits of the group address
- IPv6 multicast MAC = 33:33 + last 32 bits of the address
- Wireshark filters: eth.addr == aa:bb:cc:dd:ee:ff, eth.type == 0x0806
- tcpdump filters: ether host X, ether broadcast, ether multicast
- Bad FCS: frame dropped silently; Ethernet itself never retransmits
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Find the MAC address of your wired or Wi-Fi interface and split it into the OUI and the device-specific part.
- Exercise 2medium
Work out the multicast MAC address for the IPv4 group 239.1.2.3 and for the IPv6 address ff02::1:ff00:5.
- Exercise 3hard
Capture 30 seconds of traffic and count how many frames are broadcast, multicast and unicast. Explain what produces the broadcasts and multicasts.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Is a MAC address unique worldwide?
- Vendor-assigned ones are meant to be, because each vendor gets its own OUI. But software can set any MAC, and random addresses on phones are common, so never treat a MAC as proof of identity.
- Can a MAC address be used to track me on the internet?
- No. Your MAC never leaves your local network; routers replace it at the first hop. Wi-Fi networks you join can see it, which is why phones randomise it.
- What is the difference between Ethernet II and 802.3 frames?
- Ethernet II uses the 2-byte field as an EtherType naming the payload, and carries almost all IP traffic. 802.3 uses it as a length followed by an LLC header, and today mostly carries Spanning Tree BPDUs.