Cisco

Network Engineer · 01

Network Fundamentals

Lessons in this module ▾

Network Engineer · Module 01 · Ethernet

ARP

Lesson 5 of 13

  1. 01The OSI model
  2. 02The TCP/IP model
  3. 03Encapsulation
  4. 04Frames and MAC addresses
  5. 05ARP
  6. 06IPv4 addressing
  7. 07Subnetting
  8. 08IPv6 basics
  9. 09TCP and UDP
  10. 10Network components and topologies
  11. 11WAN concepts
  12. 12Wireless principles
  13. 13Virtualization and cloud basics

Here's a puzzle. PC1 knows PC2's IP address, 192.168.1.20. But on an Ethernet LAN, frames are delivered by MAC address — and PC1 has no idea what PC2's MAC is. How does the very first packet ever get sent?

The answer is the Address Resolution Protocol. Press play and watch it work:

PC1192.168.1.10SW1R1192.168.1.1PC2192.168.1.20PC3192.168.1.30ARP

Step 1 of 6PC1 wants to reach 192.168.1.20 but doesn't know its MAC, so it broadcasts an ARP request: “Who has 192.168.1.20?”

ARP: one broadcast question, one unicast answer.

Request: a broadcast question

An ARP request asks the whole LAN one question: who has this IP address? Because PC1 doesn't know who to ask, it sends the frame to the broadcast MAC address, FF:FF:FF:FF:FF:FF. Every device in the broadcast domain receives it.

Reply: a unicast answer

Only the owner of the IP answers. The reply goes directly back to the sender, carrying the missing piece: the MAC address. Everyone else ignores the request.

The ARP cache

Broadcasting before every packet would be wasteful, so each device stores answers in an ARP cache for a few minutes. You can look at it:

C:\> ping 192.168.1.20Pinging 192.168.1.20 with 32 bytes of data:Reply from 192.168.1.20: bytes=32 time<1ms TTL=128C:\> arp -a  Internet Address      Physical Address      Type  192.168.1.1           00-11-22-33-44-01     dynamic  192.168.1.20          00-1a-2b-3c-4d-20     dynamic

On a Cisco router, the same table is one command away:

R1# show ip arpProtocol  Address          Age (min)  Hardware Addr   Type   InterfaceInternet  192.168.1.1             -   0011.2233.4401  ARPA   GigabitEthernet0/0Internet  192.168.1.10            2   001a.2b3c.4d10  ARPA   GigabitEthernet0/0