MAC Address vs IP Address

Updated February 17, 2026 · 5 min read

MAC addresses and IP addresses both identify devices on a network, but they work at completely different levels and serve different purposes. Understanding the difference is fundamental to understanding how networking works.

The Quick Comparison

MAC AddressIP Address
Full NameMedia Access ControlInternet Protocol
OSI LayerLayer 2 (Data Link)Layer 3 (Network)
ScopeLocal network onlyGlobal (across the internet)
Assigned ByManufacturer (hardware)Network/ISP (software)
Format48 bits (e.g., 00:1A:2B:3C:4D:5E)32 or 128 bits (e.g., 192.168.1.5)
Changes?Fixed in hardware (but can be spoofed)Changes with network connection
Used ForDelivering frames on local networkRouting packets across networks

How They Work Together

Here's what actually happens when you visit a website — and how both addresses are involved:

1. Your device needs to reach the router

Your computer has the router's IP address (your default gateway, like 192.168.1.1). But to actually send data on the local Ethernet or Wi-Fi network, it needs the router's MAC address. It uses ARP (Address Resolution Protocol) to ask: "Who has IP 192.168.1.1? Tell me your MAC address."

2. The Ethernet frame is built

Your device wraps the data in an Ethernet frame with:

  • Source MAC: Your device's MAC address
  • Destination MAC: The router's MAC address
  • Payload: An IP packet with source IP (your device) and destination IP (the website)

3. The router forwards it

The router receives the frame, strips the MAC header, and looks at the IP destination. It then creates a new Ethernet frame with its own MAC as the source and the next hop's MAC as the destination. Your original MAC address is gone — replaced at every hop.

💡 The Postal Analogy: Think of a MAC address as the name on a mailbox (used by the local mail carrier to deliver to the right house on the street), and an IP address as the full mailing address (used by the postal system to route mail across the country). Both are needed, but they work at different scales.

Key Differences Explained

Scope: Local vs Global

This is the most important difference. A MAC address is only meaningful on the local network segment — your home Wi-Fi, an office Ethernet switch, a data center VLAN. Once a packet passes through a router, the original MAC addresses are discarded.

An IP address, on the other hand, persists across the entire route from source to destination. It's how routers know where to forward packets across the internet.

Assignment: Hardware vs Software

MAC addresses are burned into network hardware by the manufacturer. Your laptop's Wi-Fi chip left the factory with a specific MAC address. (Though as we explain in our MAC spoofing article, you can override it in software.)

IP addresses are assigned dynamically by the network you connect to — usually via DHCP. Connect to a different Wi-Fi network and you'll get a different IP address. Your MAC address stays the same.

Uniqueness

MAC addresses are supposed to be globally unique — no two devices should have the same one. In practice, collisions can happen (especially with cheap hardware or spoofing), but it's rare.

IP addresses are unique within their scope — no two devices on the same network should share an IP. But the same private IP range (like 192.168.x.x) is reused on millions of networks worldwide. NAT (Network Address Translation) handles the overlap.

IPv4 vs IPv6 — And MAC's Role

IPv6 has an interesting connection to MAC addresses. The SLAAC (Stateless Address Autoconfiguration) method originally derived part of the IPv6 address directly from the device's MAC address using EUI-64 format. This created a privacy concern — your MAC address was essentially embedded in your IPv6 address and visible to every server you connected to.

Modern systems now use privacy extensions (RFC 4941) that generate random interface identifiers instead, solving this problem.

When Each One Matters

  • Network troubleshooting: MAC addresses help identify specific devices on a switch. IP addresses help trace routing issues across networks.
  • Access control: MAC filtering controls who can connect to a local network. IP-based firewalls control traffic flow across networks.
  • Device identification: MAC addresses can identify the device manufacturer. IP addresses can identify the ISP or geographic region (roughly).
  • Security: Neither MAC nor IP addresses should be used as sole authentication factors — both can be spoofed.