Side by side
| Property | IP address | MAC address |
|---|---|---|
| Size | 32 bits (4 bytes) | 48 bits (6 bytes) |
| Written as | 4 decimal octets, dots | 6 hex bytes, colons or dashes |
| Example | 192.168.1.23 | a4:83:e7:2b:91:0c |
| Set by | The network (DHCP, or by hand) | The hardware maker |
| Changes? | Yes, with every network you join | Normally noexcept private MACs and spoofing (ch 7) |
| Can repeat? | Yes, across separate private networks | No, unique worldwidefor maker-set MACs |
| Has structure to route by? | Yes: network part + host part | No: maker + serial, says nothing about location |
| Job | Get across networks to the right one | Last step: the exact device on the local network |
| Lives in | The packet (chapter 1, wrap 2) | The frame (chapter 1, wrap 3) |
Size and notation
Different lengths, different notation. Here are the laptop's two addresses bit by bit:
IP address · 32 bits = 4 bytes · written in decimal, with dots: 192.168.1.23
MAC address · 48 bits = 6 bytes · written in hex, with colons: a4:83:e7:2b:91:0c
- IP: the packet's address (chapter 1, wrap 2)
- MAC: the frame's address (chapter 1, wrap 3)
Every byte is 8 bits, whichever way it is written. The IP is 4 of them, the MAC 6: humans see the IP in decimal with dots and the MAC in hex with colons.
An IP can repeat, a MAC cannot
Say a Kadé staff member works from their own home. Their laptop also got 192.168.1.23 from their home router. That is fine: the two home networks never mix, and on the internet each home shows its own public IP (chapter 10 explains how).
Wide by design - scroll it sideways.
A MAC is different. It must be unique within any network it joins, and maker-set MACs are unique worldwide. Even the two network cards in one laptop (WiFi and Ethernet, chapter 7) have different MACs.
IP gets you across networks
Follow the laptop's request to kade-api hop by hop. At every router, the destination IP is used to make a routing decision: each router checks its table (chapter 5) and picks the next step. The MAC pair is thrown away and rebuilt at every hop. Step through it:
Hop 1 · laptop → home router
Frame · MAC addresses · rebuilt on every hop
Packet · IP addresses and ports · carried inside the frame
The router sees its own MAC in the frame, so it takes it. Then it reads the destination IP. That is not one of its networks, so its default route sends it to the ISP.
MAC finishes the job locally
A MAC has no such meaning. 42:01:0a:0a:01:0a says who made the card (or that the platform set it), not where it is. A router could not use it to pick a direction.
But once the packet reaches the right local network, the MAC is exactly what is needed: on that network, the frame is handed to the one interface whose MAC matches. In hop 4 above, kade-api accepts the frame because the destination MAC is its own.
Why we need both
IP · across the internet
Globally meaningful. Gets the data to the right local network, hop by hop.
Cannot pick one device on a shared wire by itself: something must turn it into a hardware address.
MAC · inside one network
Picks the exact interface for the current step.
No structure to route by, so it is useless beyond the local network.
One question is left. When a device needs to deliver locally, it knows the IP (of the target or the gateway) but needs the MAC. How does it get it? With ARP, which takes an IP and returns the matching MAC. That is the next chapter.
Summary
| # | Idea | In one line | New terms |
|---|---|---|---|
| 1 | Compared | IP: 32-bit, dotted, changes, repeats, routable. MAC: 48-bit, hex, fixed, unique, local. | |
| 3 | Repeating | Same private IP in separate networks is fine; MACs stay unique | |
| 4 | IP's job | Every router decides the next hop from the destination IP | hop |
| 5 | MAC's job | Hands the frame to the exact interface, one link at a time | |
| 6 | The link | ARP turns an IP into a MAC (next chapter) | ARP |
Try it yourself
IPs and MACs side by side
- What to look for: Each line pairs one IP with one MAC, all on your local network.
- Runs on: Linux · macOS / Windows: arp -a
- From section: 1. Side by side
ip neighThe routers on the way
- What to look for: Only IPs appear. MACs of far-away routers are never visible to you.
- Runs on: Windows: tracert 1.1.1.1
- From section: 4. IP gets you across networks
traceroute 1.1.1.1