Course contents

Unit 6: ARP and Local CommunicationLesson 6.3 (3 of 3 in this unit)49 of 104 in the Network Fundamentals course

ARP features

What if two PCs try to use the same IPv4 address, or a backup gateway takes over? Let's see why ARP sometimes checks an address, sometimes announces one, and sometimes answers on another device's behalf.

Intermediate · 6 min read

Covers Gratuitous ARP, ARP probe and Proxy ARP.

Technical definition

Gratuitous ARP, ARP probes and proxy ARP are uses of ARP beyond the normal request and reply. A gratuitous ARP announces a device's own IP-to-MAC mapping without being asked, an ARP probe checks whether an IPv4 address is already in use before a device claims it, and proxy ARP lets a router reply on behalf of a host in another network.

Three messages that look similar but solve different problems

Start with PC-A, which wants to use 192.168.10.10/24. Before ordinary use, it can check whether another device already owns that address. After claiming it, it can announce the mapping. Later, it may ask which MAC belongs to PC-B at 192.168.10.20. Each action uses ARP, but the sender and target fields tell a different story.

Diagram
Read the ARP fields to understand the purpose
Read the ARP fields to understand the purpose
Read the ARP fields to understand the purposeThree broadcast ARP requests have different purposes. A normal request from 192.168.10.10 asks about 192.168.10.20. A probe uses sender IP 0.0.0.0 and target IP 192.168.10.10. An announcement uses 192.168.10.10 in both IP fields. All three carry the sending interface's real MAC address.ARP purposeSender IPTarget IPNormal request192.168.10.10192.168.10.20Who owns the neighbour address?Probe0.0.0.0192.168.10.10Is my proposed address already used?Announcement192.168.10.10192.168.10.10This is the address I am now using.An ARP IP field and an Ethernet MAC field are different fields.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

RFC 5227 probe and announcement forms, alongside an ordinary ARP request. All three shown here use operation 1 and Ethernet destination ff:ff:ff:ff:ff:ff; gratuitous ARP replies also exist.

Read the probe row first. The sender IP is 0.0.0.0 because PC-A is checking a candidate, not advertising ownership yet. In the announcement row, both IP fields contain PC-A's chosen address. Its actual interface MAC is present in both messages. A zero sender IP in an ARP probe does not mean the Ethernet sender has no MAC address.

Gratuitous ARP: “this is me, everyone”

A gratuitous ARP is an ARP message that a host sends about its own address without anyone asking. The sender IP and the target IP are both the host's own address, and the message is sent as a broadcast. Devices that already have an ARP cache entry for that IP address update it, and switches learn which port the sender's MAC address is on.

Situation: two routers share a virtual gateway address (192.168.1.1) using HSRP (Hot Standby Router Protocol). The address uses a shared virtual MAC address. The active router fails, and the standby router takes over:

Diagram
Gratuitous ARP after a gateway failover
Gratuitous ARP after a gateway failover
✕ link downR1was activeR2standby → activeSwitchPC APC B

Device key: R1, R2 (router) · PC A (laptop) · PC B (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. R1 fails. The PCs' ARP caches still map 192.168.1.1 to the virtual MAC address, and the switch still sends that MAC address to R1's port.
  2. 2. R2 announces itself. The new active router sends a gratuitous ARP for 192.168.1.1 from the same virtual MAC address, so the switch immediately learns that this MAC address is now on R2's port.
  3. 3. Traffic follows. The PCs keep using 192.168.1.1 and the same MAC address, without noticing the change.

Hosts also send a gratuitous ARP when an interface comes up or its IP address changes.

ARP probe: “is anyone using this?”

Before using an address (for example, one just received from DHCP), many hosts send an ARP probe. This is an ARP request for that IP address with the sender IP set to 0.0.0.0, so no other device's cache is changed. If any device answers, the address is already in use, and the host reports a conflict (with DHCP, it declines the address). ARP probes are defined in RFC 5227.

Proxy ARP: a router answering for others

With proxy ARP, a router answers an ARP request for an IP address that isn't on the local subnet, giving its own MAC address. The host then sends the frame to the router, which routes the packet on to its destination.

Diagram
Proxy ARP
Proxy ARP
Old PCmask too wideRouterproxy ARPServer10.0.0.5 (other subnet)

Device key: Old PC (laptop)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

Reading the addresses

IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.

An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.

  • Old PC: mask too wide
  • Router: proxy ARP
  • Server: 10.0.0.5 (other subnet)
  1. 1. A host sends an ARP request for a remote IP. Usually this happens because its subnet mask is too wide, so it thinks 10.0.0.5 is local.
  2. 2. The router answers on its behalf. It has a route to 10.0.0.5, so it replies with its own MAC address.
  3. 3. It works, silently. Traffic flows through the router, which hides the host's configuration mistake.

Proxy ARP defaults vary by Cisco platform and software release; check the interface rather than assuming it is enabled. It can rescue unusual legacy setups, but it hides configuration mistakes and makes ARP caches large and confusing. Many networks disable it on each interface:

interface GigabitEthernet0/0 no ip proxy-arp

The no ip proxy-arp command turns proxy ARP off on that interface only. After that, hosts on the subnet must have a correct subnet mask and default gateway to reach other networks.

In practice, proxy ARP tends to be noticed only when it is turned off: a forgotten printer or old server with a wrong mask suddenly stops reaching other subnets. Check the static devices on a subnet before disabling it.

Short lab: distinguish a mapping from a working connection

Use an isolated lab with two PCs on the same VLAN. Give PC-A 192.168.10.10/24 and PC-B 192.168.10.20/24, with unique addresses. On Windows, inspect the adapter settings, send a few pings to PC-B, then inspect the ARP cache. A reply depends on PC-B's firewall policy; an ARP mapping alone does not prove ICMP or an application is allowed.

ipconfig /all ping -n 2 192.168.10.20 arp -a

Look under the correct adapter in arp -a for the mapping to 192.168.10.20. If it is missing or incomplete, check PC-B's address, cable and VLAN before investigating remote routing. If the mapping is present but ping fails, continue with host firewall and IP checks. Do not create a duplicate address to demonstrate the problem on a shared network.

Test yourself: which ARP message is it?

Predict · scenario 1

An ARP probe has sender IP 0.0.0.0 and target IP 192.168.10.10. What is the sender checking?

Predict · scenario 2

In a packet capture, you see an ARP broadcast where both the sender IP and the target IP are the host's own address. What type of message is it?

Predict · scenario 3

A PC with a subnet mask that is too wide can still reach hosts on other subnets. What is the most likely explanation?

Technical references

RFC 5227: IPv4 address conflict detection defines probe and announcement fields. RFC 826 defines ARP processing. Cisco: Understand Proxy ARP explains the routed example and platform-dependent behaviour. The interface command shown is Cisco IOS/IOS XE syntax; verify support on your release.