MAC vs IP
Why we need two different addresses — and what each one is really for
A natural question: if every device already has an IP, why does it also need a MAC? They seem redundant. They are not. This chapter compares them head-to-head and shows why both are indispensable — one gets you across the internet, the other delivers to the exact machine.
Side by side
The quickest way to see the difference is a direct comparison across a few properties: size, format, whether it changes, whether it can repeat, and its role.
- IP
- 32-bit · dotted · can change · can repeat across networks · logical (routable).
- MAC
- 48-bit · colon/dash · fixed by maker · globally unique · physical (local delivery).
How they look
An IP is 32 bits, four decimal octets separated by dots (192.168.1.4). A MAC is 48 bits, six hex bytes separated by colons or dashes (FA:34:AF:09:00:BA). Different lengths, different notation.
Changeable vs fixed
An IP can change — the router may hand your device a different one each time it connects. A MAC is hardcoded onto the NIC by the manufacturer and stays constant.
Caveat: A MAC can be spoofed at the OS level, but normally it is fixed. IPs, by contrast, routinely change.
Reusable vs universally unique
The same IP can be reused in different networks. Two different homes, two separate isolated networks — both can have a device at 192.168.1.4, and that is fine because the networks never mix. A MAC, however, is globally unique: no two interfaces in the world share one. Even two NICs in the same laptop have different MACs.
IP has logical meaning (routing)
Say you request an EC2 instance by its public IP. Your subnet-mask check shows it is not local, so it goes to your gateway. That router checks whether the IP is in a network it knows; if not, it forwards to the next router (its own gateway), and so on — hop after hop — until it reaches the AWS data center.
The point: At every hop the IP is used to make a routing decision. IP has logical significance — you can compute where to send next from it.
MAC is for physical delivery
A MAC address is essentially random — there is no logic in it to route by. But once the packet finally reaches the destination’s local network, the MAC is exactly what is needed to hand the data to the one specific machine whose interface matches.
Scope: MAC only matters inside the local network — for the last step of delivery to the exact device.
The division of labour
Put simply: IP is globally significant and gets your data across the internet to the right local network. MAC works only inside that local network to reach the exact device. Neither can do the other’s job — which is why we need both.