Your laptop, your phone, your printer and your smart TV all share one home network. When your laptop sends something to the printer, how does the printer know it is for it, and how does the TV know to ignore it?
Every message on a local network travels in an Ethernet frame, and every frame starts with two addresses: who it is for, and who sent it. Those addresses are not IP addresses. They are burnt into each network card.
A MAC address
Each network card (Ethernet or Wi-Fi) has a MAC address: 6 bytes, usually written as six pairs of hexadecimal digits, like 02:00:00:00:00:0a. (Hexadecimal counts 0 to 9 then a to f, so one pair is a number from 0 to 255.) The first half traditionally says which company made the card; the second half is the card’s own number.
A MAC address only means something on the local network: the devices you can reach without passing through a router. It names the card, not where the card is. That is why, as you will see in Module 3, a MAC address never travels beyond the first router.
Inside a frame
Here laptop-a, on a switch with three other laptops, pings laptop-b. The very first frame it sends is a question for everyone (you will learn what it asks in Lesson 2.3). The Bytes view shows that frame.
Inside an Ethernet frame
-
laptop-a: ping -c 1 192.168.1.11
Look at the first 6 bytes: ff ff ff ff ff ff. That is the destination. The next 6 bytes are laptop-a's own MAC address, the source. Then 08 06: the EtherType, which says an ARP message is inside.
- Time
- 0 µs
- Cable
- laptop-a eth0 → sw1 1
- Ethernet
- 02:00:00:00:00:0a → ff:ff:ff:ff:ff:ff (broadcast)
- ARP
- who has 192.168.1.11? tell 192.168.1.10
- On the wire
- 64 bytes
- laptop-a ARP cache
- 192.168.1.11: asking (INCOMPLETE)
-
sw1 sends a broadcast out of every other port
sw1 writes down where 02:00:00:00:00:0a is: port 1. The frame is for ff:ff:ff:ff:ff:ff, everyone on the network, so sw1 sends a copy out of every port except the one it came in on (2, 3, 4).
- Time
- 100.512 µs
- Cable
- sw1 2 → laptop-b eth0 (+2 more)
- Ethernet
- 02:00:00:00:00:0a → ff:ff:ff:ff:ff:ff (broadcast)
- ARP
- who has 192.168.1.11? tell 192.168.1.10
- On the wire
- 64 bytes
- sw1 MAC table
- learned 02:00:00:00:00:0a → port 1
-
laptop-b: ARP: 192.168.1.11 is at 02:00:00:00:00:0b
laptop-b answers only the one who asked: 192.168.1.11 is at 02:00:00:00:00:0b. laptop-b saves it in its ARP cache: 192.168.1.10 is at 02:00:00:00:00:0a.
- Time
- 201.024 µs
- Cable
- laptop-b eth0 → sw1 2
- Ethernet
- 02:00:00:00:00:0b → 02:00:00:00:00:0a
- ARP
- 192.168.1.11 is at 02:00:00:00:00:0b
- On the wire
- 64 bytes
- laptop-b ARP cache
- 192.168.1.10 is at 02:00:00:00:00:0a
-
sw1 forwards it out of port 1 only
sw1 writes down where 02:00:00:00:00:0b is: port 2. sw1 knows 02:00:00:00:00:0a is on port 1, so only that port gets the frame.
- Time
- 301.536 µs
- Cable
- sw1 1 → laptop-a eth0
- Ethernet
- 02:00:00:00:00:0b → 02:00:00:00:00:0a
- ARP
- 192.168.1.11 is at 02:00:00:00:00:0b
- On the wire
- 64 bytes
- sw1 MAC table
- learned 02:00:00:00:00:0b → port 2
-
laptop-a: ICMP echo request seq=1 192.168.1.10 → 192.168.1.11
This frame is addressed to one card only: its destination is laptop-b's MAC address, 02:00:00:00:00:0b, and the EtherType 08 00 says an IP packet is inside.
- Time
- 402.048 µs
- Cable
- laptop-a eth0 → sw1 1
- Ethernet
- 02:00:00:00:00:0a → 02:00:00:00:00:0b
- IP
- 192.168.1.10 → 192.168.1.11
- TTL
- 64
- ICMP
- echo request, seq 1
- On the wire
- 102 bytes
- laptop-a ARP cache
- 192.168.1.11 is at 02:00:00:00:00:0b
-
sw1 forwards it out of port 2 only
sw1 knows 02:00:00:00:00:0b is on port 2, so only that port gets the frame.
- Time
- 502.864 µs
- Cable
- sw1 2 → laptop-b eth0
- Ethernet
- 02:00:00:00:00:0a → 02:00:00:00:00:0b
- IP
- 192.168.1.10 → 192.168.1.11
- TTL
- 64
- ICMP
- echo request, seq 1
- On the wire
- 102 bytes
-
laptop-b: ICMP echo reply seq=1 192.168.1.11 → 192.168.1.10
laptop-b answers with an echo reply.
- Time
- 603.68 µs
- Cable
- laptop-b eth0 → sw1 2
- Ethernet
- 02:00:00:00:00:0b → 02:00:00:00:00:0a
- IP
- 192.168.1.11 → 192.168.1.10
- TTL
- 64
- ICMP
- echo reply, seq 1
- On the wire
- 102 bytes
-
sw1 forwards it out of port 1 only
sw1 knows 02:00:00:00:00:0a is on port 1, so only that port gets the frame.
- Time
- 704.496 µs
- Cable
- sw1 1 → laptop-a eth0
- Ethernet
- 02:00:00:00:00:0b → 02:00:00:00:00:0a
- IP
- 192.168.1.11 → 192.168.1.10
- TTL
- 64
- ICMP
- echo reply, seq 1
- On the wire
- 102 bytes
-
laptop-a receives ICMP echo reply seq=1 192.168.1.11 → 192.168.1.10
laptop-a gets the frame. The reply arrived 0.805 ms after the request left: that is the round-trip time. laptop-a prints: rtt min/avg/max/mdev = 0.805/0.805/0.805/0.000 ms
- Time
- 805.312 µs
- Ethernet
- 02:00:00:00:00:0b → 02:00:00:00:00:0a
- IP
- 192.168.1.11 → 192.168.1.10
- TTL
- 64
- ICMP
- echo reply, seq 1
- On the wire
- 102 bytes
An Ethernet frame has four parts:
| Part | Size | What it says |
|---|---|---|
| Destination MAC | 6 bytes | Which card should take this frame |
| Source MAC | 6 bytes | Which card sent it |
| EtherType | 2 bytes | What is inside: 0800 IPv4, 0806 ARP, 86dd IPv6 |
| Payload | 46 to 1,500 bytes | The message, padded with zeros if it is short |
| Frame check sequence (FCS) | 4 bytes | A checksum, so the receiver can spot damaged bits and drop the frame |
When a frame arrives, a network card compares the destination MAC with its own. If they match, it passes the frame up to the computer. If not, it ignores the frame.
Broadcast: a frame for everyone
The destination ff:ff:ff:ff:ff:ff is special. It is the broadcast address, and it means “every card on this network”. Every device takes a broadcast frame and reads it. Switch to the Map view in the lab above and step through: laptop-c and laptop-d both received the first frame (the broadcast), but neither of them received the ping that followed, which was addressed to laptop-b alone.
Broadcasts are how a device asks a question when it does not yet know who to ask. They are also expensive: every device has to stop and read them, so networks keep them rare.
In the real world
Phones, laptops and tablets now usually invent a random MAC address for each Wi-Fi network they join, instead of using the one burnt into the card. A fixed MAC address would let shops, airports and anyone running Wi-Fi recognise the same device wherever it goes. Android, iOS, Windows and macOS all do this by default for Wi-Fi. A random address has the “locally administered” bit set, which is why it often starts with a digit like 2, 6, a or e in its second place, just like the addresses in these labs.
Recap
- Every local message travels in an Ethernet frame: destination MAC, source MAC, EtherType, payload, FCS.
- A MAC address is 6 bytes and names a network card on the local network only.
- A card takes frames addressed to its own MAC and ignores the rest.
ff:ff:ff:ff:ff:ffis broadcast: every device on the network takes it.- The smallest frame is 64 bytes on the wire; short payloads are padded.
Quick check
-
It is the card's own address. It does not say where in the world the card is.
-
That is the broadcast address.
-
Each router puts the packet in a new frame with new MAC addresses, as Module 3 shows.
Join the discussion