MAC Addresses Versus IP Addresses: Why You Need Both
People new to networking often ask why IP addresses are needed at all if every device already has a unique MAC address. The reverse question is just as common: if an IP address can locate any host on the internet, what is a MAC address for? The answer is that the two solve problems at different layers.
An analogy
Think of delivering a packet as shipping a parcel. The IP address is the delivery address, with country, city, street and number narrowing down step by step, so any transit hub can glance at it and know which direction to send the parcel. The MAC address is the name of the next person taking custody on this particular leg. A parcel travelling across a country passes through several depots, and who takes it next differs each time, but the delivery address never changes.
Concrete differences
| MAC address | IP address | |
|---|---|---|
| Layer | Data link (layer 2) | Network (layer 3) |
| Length | 48 bits | 32 bits for IPv4, 128 for IPv6 |
| Assigned by | Burned in at manufacture, prefix from the IEEE | Administrator or DHCP |
| Scope | One broadcast domain | Routable across the internet |
| Changes with location | No, except under randomisation | Yes, a new network means a new address |
| Structure | Flat, carries no location information | Hierarchical, prefix encodes network position |
The deepest difference is flat versus hierarchical. A MAC address encodes no location. 40:6C:8F tells you the device is an Apple product, not which country it sits in. Forwarding globally on MAC addresses would require every router to know the location of every network adapter in the world, which is plainly unworkable. The hierarchy in IP addressing lets a router remember only which interface leads toward a given prefix, which is what keeps routing tables to a manageable size.
So why not use IP alone? Because link technologies such as Ethernet and WiFi need a link-layer identifier to distinguish devices sharing the same medium, and a link technology should not depend on an upper-layer protocol. The same Ethernet cable can carry IP or something else entirely, so layer 2 addressing has to stand on its own.
How the two work together
Sending a packet on a local network goes roughly like this:
- The host compares the destination IP with its own subnet. Same subnet means direct delivery; a different one means hand it to the gateway.
- Once the next-hop IP is known, its MAC address is needed. ARP does that job, described in how the ARP protocol works.
- The frame's destination MAC is the next hop, while the destination IP still holds the final target.
- At every router the MAC addresses are rewritten and the IP addresses are not.
Point four is the key to the whole model. If a capture shows a source MAC belonging to your local router alongside a source IP from another continent, nothing is wrong. That is simply what forwarding looks like. To verify it yourself, see filtering captures by MAC address in Wireshark.
Why this matters for lookups
Because a MAC address does not change with location, it can serve as a clue to device identity and be traced to a manufacturer. Entering an address on the lookup page tells you who built that adapter, regardless of which network it happens to be attached to today.