Why do we need MAC addresses?

https://news.ycombinator.com/rss Hits: 2
Summary

Why do we need MAC addresses?Date: 2025-09-17 09:38Tags: networking, explained Everyone who's ever looked into computer networks in detail has asked, at some point in their life, "why we need MAC addresses if we already have IP addresses?" A typical packet found on a typical network has a structure like this: Ethernet preamble and sync bit (not normally considered part of packet data) 6 bytesDestination MAC address 6 bytesSource MAC address 2 bytesEtherType 0x86DD (indicates this is an IP packet) IP (payload of Ethernet) 4 bytesIP version, traffic class, flow label (in various bitfields) 2 bytesPayload length 1 byteNext header type (6 for TCP) 1 byteHop limit 16 bytesSource IP address 16 bytesDestination IP address TCP (payload of IP)2 bytesSource port 2 bytesDestination port 16+ bytesUninteresting stuff that makes TCP work 0+ bytesPayload of TCP 4 bytesCRC (not normally considered part of packet data) There's a destination IP address, but there's also a destination MAC address. A very common question is: What's that for? Why are there two sets of addresses? Why can't there just be IP addresses? If you search the Internet, you might find answers like "IP addresses are logical while MAC addresses are physical" or "a MAC address is the only way to uniquely identify a device". These "explanations" are nonsensical—probably having originated from people who knew what they were talking about, but being filtered through many layers of the telephone game. You may also hear "MAC addresses are for layer 2 and IP addresses are for layer 3" which is true, but not an adequate explanation. Therefore I've decided to explain it here. The correct answer is simple: The Internet doesn't use MAC addresses, and Internet packets don't have MAC addresses. At all. If they're not for the Internet, what are they for? Recall that IP — Internet Protocol — is intended to be used when you connect together a bunch of separate networks to form a single larger network — an inter-net. And that means...

First seen: 2025-10-08 03:12

Last seen: 2025-10-08 04:12