IP Address vs MAC Address - What's the Difference?
IP addresses and MAC addresses are both used to identify devices on networks, but they operate at different layers of the network stack, serve different purposes, and have fundamentally different scopes. Confusing the two is common - This article explains exactly what sets them apart.
Side-by-Side Comparison
| Property | IP Address | MAC Address |
|---|---|---|
| OSI Layer | Layer 3 - Network | Layer 2 - Data Link |
| Format | IPv4: 4 decimal octets (e.g. 192.168.1.1) / IPv6: 8 hex groups | 6 hex octets separated by colons (e.g. 00:1A:2B:3C:4D:5E) |
| Length | IPv4: 32 bits / IPv6: 128 bits | 48 bits (6 bytes) |
| Scope | Global (public IP) or local subnet (private IP) | Local network only - Not routable beyond the local segment |
| Assigned by | ISP (public) or DHCP server/router (private) | Burned into NIC hardware by manufacturer; can be spoofed |
| Changes on reconnect? | Private IP may change (DHCP); public IP set by ISP | Hardcoded unless MAC randomisation is active |
| Visible to the internet? | Yes (public IP) | No - Never leaves the local network segment |
| Used for | Routing packets across networks | Delivering frames within a local network (ARP) |
How They Work Together
When you send a packet to a remote server, your device uses the IP address to route the packet through multiple networks to reach the destination. Within each local network segment, ARP (Address Resolution Protocol) maps IP addresses to MAC addresses so the router knows which physical device to send frames to. The MAC address is stripped and rewritten at each router hop via NAT - Only the IP addresses travel end-to-end.
MAC Randomisation for Privacy
- Modern iOS (14+), Android (8+), and Windows 10+ randomise MAC addresses per Wi-Fi network by default to prevent tracking across locations.
- A fixed MAC address can be used by Wi-Fi access points and ISPs to track your device across sessions, even if your IP changes.
- MAC addresses can be spoofed in software - A process called MAC cloning - Which is legal and sometimes used to bypass MAC-based access controls.
- Your MAC address is never visible to websites you visit - It stays within your local network and is not transmitted in IP packets.