MAC Address vs. IP Address: Which Changes at a Router?
A MAC address identifies an interface on the local link; an IP address identifies a host across networks. See which one changes at each hop of a trace.
A MAC address (for example 00:00:5e:00:53:0a) is a 48-bit hardware identifier used to deliver frames on the local network. An IP address (for example 192.0.2.10) is a logical address used to route packets between networks. As a packet crosses routers, its MAC addresses change at every hop while its IP addresses stay the same, unless a NAT device rewrites them.
Comparison
| MAC address | IP address | |
|---|---|---|
| Layer | data link (2) | network (3) |
| Length | 48 bits, 6 hex bytes | 32 bits (IPv4) or 128 bits (IPv6) |
| Example | 00:00:5e:00:53:0a | 192.0.2.10 / 2001:db8::10 |
| Assigned by | the manufacturer (often randomized per network today) | DHCP, SLAAC or manual configuration |
| Scope | one link or LAN | end to end across the internet |
| Changes when | you swap the network card or randomization rotates it | you join a different network |
| Used by | switches | routers |
The first three bytes of a manufacturer-assigned MAC are an OUI, a vendor prefix registered with the IEEE. Modern phones and laptops often use a randomized MAC per Wi-Fi network for privacy; the locally-administered bit (second-least-significant bit of the first byte) is then set.
Headers at each hop
IllustrativeA laptop at home fetches a page from a web server two routers away.
Highlighted rows changed since the previous hop. Two patterns stand out: the destination MAC always names the next device on this link, and the destination IP always names the final server. The TTL drops by one at each router, which is what traceroute exploits to discover the path.
How a device links the two: ARP
Before sending, a device must find the MAC for an IP on its own network. In IPv4 it broadcasts an ARP request (“who has 192.0.2.1?”) and caches the reply. For destinations on other networks it ARPs only for the gateway, never for the remote server, whose MAC it never learns. IPv6 does the same job with Neighbor Discovery. You can list your cache with arp -a on macOS, Linux and Windows.
Common questions
Can two devices have the same MAC? They should not on the same LAN; if they do, the switch keeps moving the address between ports and both devices lose traffic. Across different networks it does not matter, because MACs never leave their link.
Can a website see my MAC address? No. The MAC in the frames it receives belongs to its own last-hop router.
Which one identifies me? Neither, reliably. Your public IP is usually shared by everyone behind your router, and MAC randomization changes the MAC per network.
The router vs. switch walkthrough follows the same trip from the devices’ point of view.
Sources
- RFC 826: An Ethernet Address Resolution Protocol — IETF
- RFC 1812: Requirements for IP Version 4 Routers — IETF
- IEEE Registration Authority — IEEE. OUI assignments for MAC addresses
- RFC 7042: IANA Considerations and IETF Protocol Usage for IEEE 802 Parameters — IETF
How we made this
Illustrative sample data. The per-hop header table is an illustrative trace using documentation addresses (RFC 5737, RFC 7042). It follows ARP (RFC 826) and router forwarding rules (RFC 1812); no live capture was taken.
Performed by Claude, an AI assistant working in the BinConvert repository, November 16, 2026.
This article was drafted with AI assistance. Every example, calculation and command output on this page was re-run or checked before release; header values were checked hop by hop against the forwarding rules. Review: automated test suite and source check, November 16, 2026.
Spotted an error? Tell us and we will correct it.