A device in IP can
have both a local address (which uniquely identifies the device on its local
segment or LAN) and a network address (which identifies the network to which
the device belongs). The local address is known as a data link address because
it is contained in the data link layer (Layer 2 of the OSI model) part of the
packet header and is read by data-link devices such as bridges, all device
interfaces and so on. The local address is referred to as the MAC address,
because the MAC sublayer within the data-link layer processes addresses for the
layer.
To communicate with a
device on Ethernet, for example, the Cisco IOS software must first determine
the 48-bit MAC or local data-link address of that device. The process of
determining the local data-link address from an IP address is called address
resolution. The process of determining the IP address from a local data-link
address is called reverse address resolution.
The software uses
three forms of address resolution: Address Resolution Protocol (ARP), proxy
ARP, and Probe (similar to ARP). The software also uses the Reverse Address
Resolution Protocol (RARP). ARP, proxy ARP, and RARP are defined in RFCs 826,
1027, and 903, respectively. Probe is a protocol developed by the
Hewlett-Packard Company (HP) for use on IEEE-802.3 networks.
ARP is used to
associate IP addresses with media or MAC addresses. Taking an IP address as
input, ARP determines the associated media address. Once a media or MAC address
is determined, the IP address or media address association is stored in an ARP
cache for rapid retrieval. Then the IP datagram is encapsulated in a link-layer
frame and sent over the network. Encapsulation of IP datagrams and ARP requests
and replies on IEEE 802 networks other than Ethernet is specified by the
Subnetwork Access Protocol (SNAP).
Gratuitous ARP
When a host sends an ARP request to resolve its own IP address, it is
called gratuitous ARP. In the ARP request packet, the source and destination IP
addresses are filled with the same source IP address itself. The destination
MAC address is the Ethernet broadcast address.
When a router becomes active, it broadcasts a gratuitous ARP packet
with the Hot Standby Router Protocol (HSRP) virtual MAC address to the affected
LAN segment. If the segment uses an Ethernet switch, this allows the switch to
change the location of the virtual MAC address so that packets flow to the new
router instead of the one that is no longer active. End devices do not actually
need gratuitous ARP if routers use the default HSRP MAC address.