Packet Routing & MAC Addresses
Every network interface card (NIC) has a unique MAC address burned into it at manufacture. When data travels across a network, routers and switches use MAC addresses to deliver packets to the correct device on the local network.
Learning Objectives
- 12.6.2.2 Describe the role of MAC addresses in packet routing
- 12.6.2.3 Identify the MAC address of a computer
Conceptual Anchor
The Postal System
Think of an IP address like a postal address (city + street + house number) — it gets the packet to the right network. A MAC address is like the name on the door — it identifies the exact device within that local network. A router uses IP to find the right network; a switch uses MAC to find the right device.
Rules & Theory
What is a MAC Address?
| Property | Detail |
|---|---|
| Full name | Media Access Control address |
| Length | 48 bits (6 bytes), written as 12 hex digits |
| Format | AA:BB:CC:DD:EE:FF or AA-BB-CC-DD-EE-FF |
| Uniqueness | Globally unique — assigned by the manufacturer |
| Structure | First 3 bytes = OUI (manufacturer ID), last 3 bytes = device ID |
| Layer | Data Link Layer (Layer 2 of OSI model) |
MAC vs IP Address
| Feature | MAC Address | IP Address |
|---|---|---|
| Layer | Data Link (Layer 2) | Network (Layer 3) |
| Assigned by | Manufacturer (hardware) | Network (DHCP/manual) |
| Changes? | Permanent (burned in) | Can change when moving networks |
| Scope | Local network only | Internet-wide |
| Format | 48-bit hex (AA:BB:CC:DD:EE:FF) | 32-bit decimal (192.168.1.10) |
How ARP Works
1 Address Resolution Protocol (ARP)
ARP converts an IP address to a MAC address within a local network.
Scenario: Computer A (192.168.1.10) wants to send data
to Computer B (192.168.1.20) on the same LAN.
Step 1: A broadcasts an ARP request:
"Who has 192.168.1.20? Tell 192.168.1.10"
→ Sent to ALL devices (broadcast MAC: FF:FF:FF:FF:FF:FF)
Step 2: Computer B recognises its IP and replies:
"I am 192.168.1.20, my MAC is AA:BB:CC:11:22:33"
Step 3: A stores the mapping in its ARP cache:
192.168.1.20 → AA:BB:CC:11:22:33
Step 4: A sends the data frame with B's MAC address
as the destination.Finding Your MAC Address
2 Commands by OS
Windows: ipconfig /all
→ Look for "Physical Address"
macOS: ifconfig en0 | grep ether
→ Look for "ether" line
Linux: ip link show
→ Look for "link/ether"
Example output:
Physical Address: A4-5E-60-B8-3C-F7Common Pitfalls
Thinking MAC Addresses Work Across the Internet
MAC addresses work only within a local network. When a packet crosses a router to another network, the MAC address is replaced with the router's MAC. IP addresses carry the packet across networks; MAC addresses deliver within a network.
Confusing Router and Switch Roles
A switch uses MAC addresses to forward frames within a LAN. A router uses IP addresses to forward packets between networks. They work at different layers.
Tasks
State what MAC stands for and describe the format of a MAC address.
Explain the difference between a MAC address and an IP address.
Find the MAC address of your own computer using the appropriate command for your OS. Screenshot the result.
Describe step-by-step what happens when Computer A sends a message to Computer B on the same LAN for the first time (include ARP).
Self-Check Quiz
Q1: How many bits is a MAC address?
Q2: What does ARP do?
Q3: Can a MAC address change when you move to a different Wi-Fi network?