IP Address vs MAC Address: What Is the Difference?

Every device on a network has two kinds of address, and they are often confused: the IP address and the MAC address. Both identify a device, but they do very different jobs, live at different layers of the network and behave differently when you move from one Wi-Fi network to another. Understanding the difference makes router settings, DHCP reservations and privacy features much easier to follow.

What is a MAC address?

A MAC address (Media Access Control address) is a 48-bit identifier built into a network interface — the Wi-Fi chip or Ethernet port. It is written as six pairs of hexadecimal digits:

00:1A:2B:3C:4D:5E

The first three pairs are the OUI, which identifies the manufacturer; the rest is assigned by that manufacturer. A MAC address is used only inside the local network (the "link layer") so that devices on the same Wi-Fi or Ethernet segment can deliver frames to each other.

What is an IP address?

An IP address is a logical address given to a device by the network it joins, typically automatically by DHCP. It is what allows routers to move traffic across the internet. If you need a refresher, read what an IP address is. Unlike a MAC address, it changes when you change networks.

Key differences

MAC addressIP address
LayerData link (layer 2)Network (layer 3)
Assigned byThe hardware manufacturer (built in)The network / DHCP server / ISP
Changes when you change networks?No (unless randomised, see below)Yes
Length48 bits32 bits (IPv4) or 128 bits (IPv6)
Where it is usedWithin one local networkAcross the whole internet
Example00:1A:2B:3C:4D:5E192.168.1.20

How the two work together

When your laptop wants to send data to 192.168.1.20 on the same network, it knows the IP address but the Ethernet or Wi-Fi hardware needs a MAC address. It asks the whole network, "Who has 192.168.1.20?" using ARP (Address Resolution Protocol; IPv6 uses a similar mechanism called NDP). The owner replies with its MAC address and the data is delivered.

When the destination is on the internet, your device sends the frame to the MAC address of the router. At each hop the MAC addresses are rewritten for the next link, while the destination IP address stays the same from end to end. This is why the MAC address never travels beyond your local network.

Can websites see my MAC address?

No. A MAC address does not leave your local network, so websites and the servers you connect to only see your public IP address (try it on Show-IP.ir). Your router and other devices on the same Wi-Fi can see your MAC, and so can the Wi-Fi network operator — which is one reason phones now randomise it.

How to find your MAC address

  • Windows: run ipconfig /all and read Physical Address, or run getmac.
  • macOS: System Settings → Wi-Fi → Details → Hardware address (it may show a "Private Wi-Fi address" instead).
  • Linux: run ip link and look at link/ether.
  • Android: Settings → About phone → Status information (or Wi-Fi details) → Wi-Fi MAC address. Menu names vary by manufacturer.
  • iPhone: Settings → General → About → Wi-Fi Address, or the Wi-Fi network's details screen.

Randomised ("private") MAC addresses

Because a fixed MAC address lets a network recognise the same device over time, modern systems create a different, random MAC address for each Wi-Fi network: Private Wi-Fi Address on iPhone, randomised MAC on Android, and Random hardware addresses on Windows. This protects privacy, but it can confuse features that rely on a stable MAC, such as a DHCP reservation or a MAC filter — if a device suddenly gets a new local IP on a network, check this setting.

Where MAC addresses matter in practice

  • DHCP reservation. Your router can be told "always give this MAC address the IP 192.168.1.50". That is the clean way to give a printer, camera or server a fixed local address — see static vs dynamic IP and logging in to your router. It is also a prerequisite for port forwarding.
  • MAC filtering. Some routers can allow only listed MAC addresses. It is a weak control: MAC addresses are sent in the clear on the Wi-Fi network and are easy to copy, so it should never replace a strong Wi-Fi password.
  • Network inventory. The OUI part helps administrators identify unknown devices on a network by manufacturer.

Key takeaways

  • A MAC address identifies a network card inside the local network; an IP address identifies a device on a network and routes traffic across the internet.
  • MAC addresses stay on the local network. Websites only see your public IP.
  • ARP translates an IP address into a MAC address on the local network.
  • Phones and PCs now use random MAC addresses per Wi-Fi network for privacy, which can affect DHCP reservations and MAC filters.
Show-IP.ir
Find your public IP address along with your country, city, ISP, time zone and location on a map. Includes VPN/proxy/Tor detection and a free subnet calculator.
Try it
Back to articles