Names, time and addressesLayer 2RFC 826
ARP: who has this IP?
How your laptop finds the hardware address of a neighbour on the same network.
Ports and use: Carried directly in Ethernet frames
In one sentenceARP asks the whole local network "who has this IP address?" and the owner answers with its hardware (MAC) address.
Think of it like thisIt is shouting a name in a room and waiting for that person to wave, so you know who to talk to.
Watch it happen
3 steps and 2 byte-by-byte decodes. Use the buttons or the arrow keys. Hover or focus a field to find its bytes.
- Your laptop
- Router (192.168.1.1)
- Broadcast: "Who has 192.168.1.1?"Your laptop to Router (192.168.1.1)
- Reply: "That is me"Router (192.168.1.1) to Your laptop
- Your laptop remembersYour laptop to Your laptop
Step 1 of 3 Broadcast: "Who has 192.168.1.1?"
Your laptop → Router (192.168.1.1)
To reach the internet, your laptop must send frames to the router's hardware address. It only knows the router's IP address, so it asks everyone on the network.
ARP request in an Ethernet frame 42 bytes
ff ff ff ff ff ff aa bb cc 00 00 02 08 06 00 01 08 00 06 04 00 01 aa bb cc 00 00 02 c0 a8 01 0a 00 00 00 00 00 00 c0 a8 01 01
| Field | Bytes | What it means |
|---|---|---|
| Ethernet destination | ff ff ff ff ff ff | ff:ff:ff:ff:ff:ff is the broadcast address, so every device on the network receives it. |
| Ethernet source | aa bb cc 00 00 02 | aa:bb:cc:00:00:02: your laptop's hardware address. |
| EtherType | 08 06 | 0x0806 means the frame carries an ARP message. |
| Hardware type | 00 01 | 1 means Ethernet. |
| Protocol type | 08 00 | 0x0800 means the addresses being asked about are IPv4. |
| Address sizes | 06 04 | A hardware address is 6 bytes and an IP address is 4 bytes. |
| Operation | 00 01 | 1 means request: "who has this IP address?" |
| Sender hardware address | aa bb cc 00 00 02 | Your laptop's own hardware address. |
| Sender IP address | c0 a8 01 0a | 192.168.1.10: your laptop's own IP address, so the owner knows who is asking. |
| Target hardware address | 00 00 00 00 00 00 | All zeros: that is the answer your laptop is asking for. |
| Target IP address | c0 a8 01 01 | 192.168.1.1: the address being asked about. |
Step 2 of 3 Reply: "That is me"
Router (192.168.1.1) → Your laptop
Only the router owns that IP address, so only it answers, and it sends the reply directly to your laptop.
ARP reply in an Ethernet frame 42 bytes
aa bb cc 00 00 02 aa bb cc 00 00 01 08 06 00 01 08 00 06 04 00 02 aa bb cc 00 00 01 c0 a8 01 01 aa bb cc 00 00 02 c0 a8 01 0a
| Field | Bytes | What it means |
|---|---|---|
| Ethernet destination | aa bb cc 00 00 02 | aa:bb:cc:00:00:02: sent only to your laptop. |
| Ethernet source | aa bb cc 00 00 01 | aa:bb:cc:00:00:01: the router's hardware address. |
| EtherType | 08 06 | 0x0806 means the frame carries an ARP message. |
| Hardware type | 00 01 | 1 means Ethernet. |
| Protocol type | 08 00 | 0x0800 means the addresses being asked about are IPv4. |
| Address sizes | 06 04 | A hardware address is 6 bytes and an IP address is 4 bytes. |
| Operation | 00 02 | 2 means reply. |
| Sender hardware address | aa bb cc 00 00 01 | aa:bb:cc:00:00:01: the answer your laptop wanted. |
| Sender IP address | c0 a8 01 01 | 192.168.1.1: the IP address that was asked about. |
| Target hardware address | aa bb cc 00 00 02 | aa:bb:cc:00:00:02: your laptop, the one who asked. |
| Target IP address | c0 a8 01 0a | 192.168.1.10: your laptop's IP address. |
Step 3 of 3 Your laptop remembers
Your laptop
Your laptop stores "192.168.1.1 is at aa:bb:cc:00:00:01" in its ARP table for a few minutes, so it does not have to ask again for every packet.
Where you meet it
- Every time a device on a local network needs to send something to another local address.
- Seeing who is on your network: the ARP table lists nearby devices.
- Spotting attacks: fake ARP replies are the basis of "ARP spoofing".
Common mistakes
- Thinking ARP crosses the internet. It works only on the local network.
- Confusing IP addresses (they change with the network) with MAC addresses (fixed to the network card, though some phones randomise them).
- Ignoring duplicate IP addresses, which cause two devices to answer the same ARP request.
- Forgetting that IPv6 replaces ARP with a similar method called neighbour discovery.
Try it yourself
Run these on your own computer and compare the output with the lesson above.
arp -aShows the IP and hardware addresses your computer has learned.ip neighLinux: the same table in a newer form.
Addresses and values in the examples are made up for teaching (the 203.0.113.x range is reserved for documentation). Real traffic carries more options and details. Check the standard named above for the full rules.