Differences

Compared

MAC address vs IP address

A MAC address names a network card and delivers frames inside one network. An IP address names a device across networks, and routers forward by it. On the way the IP addresses stay the same end to end, while a router rewrites both MAC addresses at every hop. ARP links the two.

Side by side

MAC addressIP address
Size 48 bits32 bits (IPv4) or 128 bits (IPv6)
Written as Six hex bytes: 02:42:0a:00:01:0a10.0.1.10, or fd00:0:1::2
Layer Link (2): framesNetwork (3): packets
Reaches Its own network onlyAny network, through routers
Belongs to A network cardA card on one network, with a prefix length
Across a router Both are rewritten at every hopUnchanged end to end, unless NAT rewrites them
See it with ip link, ip neighip addr

Each one explained

MAC address
The 48-bit address of a network card, used to deliver frames within one network.
IP address
A device's address across networks: 32 bits, written as four numbers like 10.0.1.10.
ARP
How a device finds the MAC address behind an IP address on its own network.
Ethernet frame
The envelope a packet travels in across one link: destination MAC, source MAC, type, payload.

See the difference on real machines

Each lab is a small network of real Linux machines in your browser.

Open MAC and ARP: how an IP address finds a card

When it breaks

Sources

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab