What is a MAC address, and how is it different from an IP address?
A MAC address identifies a piece of hardware on a local network; an IP address identifies a location on the internet. One is fixed to the device, the other describes where the device currently is — which is exactly why both are needed.
The postal analogy that actually works. The IP address is the street address of a building; the MAC address is the name of the person inside it. To deliver, the network first works out which building, then who within it.
The technical roles:
MAC address — 48 bits, usually written as six pairs of hexadecimal digits, assigned by the manufacturer, with the first half identifying the manufacturer. It operates at the data link layer and is used only within a single network segment.
IP address — assigned by the network you join, and changes when you move. It operates at the network layer and is what routing between networks uses.
How they work together. When your laptop sends to another device on the same network, it knows the destination IP and needs the MAC. It broadcasts an ARP request — "who has this address?" — and the owner replies. When sending to something on the internet, it instead uses the router's MAC address, and the router forwards onward. The MAC address changes at every hop; the IP address does not.
What follows practically:
MAC addresses never leave your local network. A website cannot see yours, contrary to a persistent belief.
MAC filtering on a router is weak security, since addresses are easily changed and are visible in the air to anyone listening.
Randomised MAC addresses are now the default on phones when scanning and joining Wi-Fi, specifically to prevent tracking across locations — which is why a device may appear repeatedly as a new device on your network.
Network access control in businesses uses MAC addresses as one factor, never alone.
A duplicate MAC address, occasionally caused by cloning or a manufacturing error, produces an intermittent fault that is genuinely difficult to diagnose.