Address Resolution Protocol: Finding Feature Information
Address Resolution Protocol: Finding Feature Information
The Address Resolution Protocol (ARP) feature performs a required function in IP routing. ARP finds the
hardware address, also known as Media Access Control (MAC) address, of a host from its known IP address.
ARP maintains a cache (table) in which MAC addresses are mapped to IP addresses. ARP is part of all Cisco
systems that run IP.
This feature module explains ARP for IP routing and the optional ARP features you can configure, such as
static ARP entries, timeout for dynamic ARP entries, clearing the cache, and proxy ARP.
layers, each of which specifies particular network functions such as addressing, flow control, error control,
encapsulation, and reliable message transfer.
Layer 2 addresses are used for local transmissions between devices that are directly connected. Layer 3
addresses are used for indirectly connected devices in an internetwork environment. Each network uses
addressing to identify and group devices so that transmissions can be sent and received. Ethernet (802.2,
802.3, Ethernet II, and Subnetwork Access Protocol [SNAP]), Token Ring, and Fiber Distributed Data Interface
(FDDI) use media access control (MAC) addresses that are “burned in” to the network interface card (NIC).
The most commonly used network types are Ethernet II and SNAP.
Note For the supported interface types, see the data sheet for your hardware platform.
In order for devices to be able to communicate with each when they are not part of the same network, the
48-bit MAC address must be mapped to an IP address. Some of the Layer 3 protocols used to perform the
mapping are:
• Address Resolution Protocol (ARP)
• Reverse ARP (RARP)
• Serial Line ARP (SLARP)
• Inverse ARP
For the purposes of IP mapping, Ethernet, Token Ring, and FDDI frames contain the destination and source
addresses. Frame Relay and Asynchronous Transfer Mode (ATM) networks, which are packet-switched, data
packets take different routes to reach the same destination. At the receiving end, the packet is reassembled in
the correct order.
In a Frame Relay network, there is one physical link that has many logical circuits called virtual circuits (VCs).
The address field in the frame contains a data-link connection identifier (DLCI), which identifies each VC.
For example, in the figure below, the Frame Relay switch to which device Fred is connected receives frames;
the switch forwards the frames to either Barney or Betty based on the DLCI that identifies each VC. So Fred
has one physical connection but multiple logical connections.
ATM networks use point-to-point serial links with the High-Level Data Link Control (HDLC) protocol. HDLC
includes a meaningless address field included in five bytes of the frame header frame with the recipient implied
since there can be only one.
When the destination device lies on a remote network, one beyond another Layer 3 device, the process is the
same except that the sending device sends an ARP request for the MAC address of the default gateway. After
the address is resolved and the default gateway receives the packet, the default gateway broadcasts the
destination IP address over the networks connected to it. The Layer 3 device on the destination device network
uses ARP to obtain the MAC address of the destination device and delivers the packet.
Encapsulation of IP datagrams and ARP requests and replies on IEEE 802 networks other than Ethernet use
Subnetwork Access Protocol (SNAP).
The ARP request message has the following fields:
• HLN—Hardware address length. Specifies how long the hardware addresses are in the message. For
IEEE 802 MAC addresses (Ethernet) the value is 6.
• PLN—Protocol address length. Specifies how long the protocol (Layer 3) addresses are in the message.
For IPv4, the value is 4.
• OP—Opcode. Specifies the nature of the message by code:
• 1—ARP request.
• 2—ARP reply.
• 3 through 9—RARP and Inverse ARP requests and replies.
• SHA—Sender hardware address. Specifies the Layer 2 hardware address of the device sending the
message.
• SPA—Sender protocol address. Specifies the IP address of the sending device.
• THA—Target hardware address. Specifies the Layer 2 hardware address of the receiving device.
ARP Caching
Because the mapping of IP addresses to media access control (MAC) addresses occurs at each hop (Layer 3
device) on the network for every datagram sent over an internetwork, performance of the network could be
compromised. To minimize broadcasts and limit wasteful use of network resources, Address Resolution
Protocol (ARP) caching was implemented.
ARP caching is the method of storing network addresses and the associated data-link addresses in memory
for a period of time as the addresses are learned. This minimizes the use of valuable network resources to
broadcast for the same address each time a datagram is sent. The cache entries must be maintained because
the information could become outdated, so it is critical that the cache entries are set to expire periodically.
Every device on a network updates its tables as addresses are broadcast.
There are static ARP cache entries and dynamic ARP cache entries. Static entries are manually configured
and kept in the cache table on a permanent basis. Static entries are best for devices that have to communicate
with other devices usually in the same network on a regular basis. Dynamic entries are added by Cisco software,
kept for a period of time, and then removed.
Inverse ARP
Inverse ARP, which is enabled by default in ATM networks, builds an ATM map entry and is necessary to
send unicast packets to a server (or relay agent) on the other end of a connection. Inverse ARP is supported
only for the aal5snap encapsulation type.
For multipoint interfaces, an IP address can be acquired using other encapsulation types because broadcast
packets are used. However, unicast packets to the other end will fail because there is no ATM map entry and
thus DHCP renewals and releases also fail.
For more information about Inverse ARP and ATM networks, see the “Configuring ATM” feature module in
the Asynchronous Transfer Mode Configuration Guide.
Reverse ARP
Reverse ARP (RARP) as defined by RFC 903 works the same way as the Address Resolution Protocol (ARP),
except that the RARP request packet requests an IP address instead of a media access control (MAC) address.
RARP often is used by diskless workstations because this type of device has no way to store IP addresses to
use when they boot. The only address that is known is the MAC address because it is burned in to the hardware.
RARP requires a RARP server on the same network segment as the device interface. The figure below illustrates
how RARP works.
Because of the limitations with RARP, most businesses use Dynamic Host Configuration Protocol (DHCP)
to assign IP addresses dynamically. DHCP is cost-effective and requires less maintenance than RARP. The
most important limitations with RARP are as follows:
• Because RARP uses hardware addresses, if the internetwork is large with many physical networks, a
RARP server must be on every segment with an additional server for redundancy. Maintaining two
servers for every segment is costly.
• Each server must be configured with a table of static mappings between the hardware addresses and the
IP addresses. Maintenance of the IP addresses is difficult.
• RARP only provides IP addresses of the hosts but not subnet masks or default gateways.
Cisco software attempts to use RARP if it does not know the IP address of an interface at startup to respond
to RARP requests that it is able to answer. The AutoInstall feature of the software automates the configuration
of Cisco devices.
AutoInstall supports RARP and enables a network manager to connect a new device to a network, turn it on,
and automatically load a pre-existing configuration file. The process begins when no valid configuration file
is found in NVRAM. For more information about AutoInstall, see the Configuration Fundamentals
Configuration Guide.
Proxy ARP
Proxy Address Resolution Protocol, as defined in RFC 1027, was implemented to enable devices that are
separated into physical network segments connected by a router in the same IP network or subnetwork to
resolve IP-to-MAC addresses. When devices are not in the same data link layer network but are in the same
IP network, they try to transmit data to each other as if they were on the local network. However, the router
that separates the devices will not send a broadcast message because routers do not pass hardware-layer
broadcasts. Therefore, the addresses cannot be resolved.
Proxy ARP is enabled by default so the “proxy router” that resides between the local networks responds with
its MAC address as if it were the router to which the broadcast is addressed. When the sending device receives
the MAC address of the proxy router, it sends the datagram to the proxy router, which in turns sends the
datagram to the designated device.
Proxy ARP is invoked by the following conditions:
• The target IP address is not on the same physical network (LAN) on which the request is received.
• The networking device has one or more routes to the target IP address.
• All of the routes to the target IP address go through interfaces other than the one on which the request
is received.
When proxy ARP is disabled, a device responds to ARP requests received on its interface only if the target
IP address is the same as its IP address or if the target IP address in the ARP request has a statically configured
ARP alias.
Note AutoInstall supports serial interfaces that use Frame Relay encapsulation.
Note The encapsulation type specified in this task should match the encapsulation type specified in the “Defining
Static ARP Entries” task.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. arp {arpa | frame-relay | snap}
5. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# interface
GigabitEthernet0/0/0
Example:
Device(config-if)# end
Note The encapsulation type specified in this task should match the encapsulation type specified in the “Enabling
the Interface Encapsulation” task.
SUMMARY STEPS
1. enable
2. configure terminal
3. arp {ip-address | vrf vrf-name} hardware-address encap-type [interface-type]
4. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 arp {ip-address | vrf vrf-name} Globally associates an IP address with a MAC address in the ARP cache.
hardware-address encap-type
[interface-type] • ip-address—IP address in four-part dotted decimal format corresponding
to the local data-link address.
Example: • vrf vrf-name—Virtual routing and forwarding instance for a Virtual Private
Network (VPN). The vrf-name argument is the name of the VRF table.
Device(config)# arp 10.0.0.0
aabb.cc03.8200 arpa
• hardware-address—Local data-link address (a 48-bit address).
• encap-type—Encapsulation type for the static entry. The keywords are as
follows:
• arpa—For Ethernet interfaces.
• sap—For Hewlett Packard interfaces.
• smds—For Switched Multimegabit Data Service (SMDS) interfaces.
• snap—For FDDI and Token Ring interfaces.
• srp-a—Switch route processor side A (SRP-A) interfaces.
• srp-b—Switch route processor side B (SRP-B) interfaces.
Example:
Device(config)# end
1. enable
2. configure terminal
3. interface type number
4. arp timeout seconds
5. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# interface
GigabitEthernet0/0/0
Step 4 arp timeout seconds Sets the duration of time, in seconds, an Address Resolution Protocol (ARP)
cache entry stays in the cache. The default is 14400 seconds (4 hours).
Example: The general recommended value for ARP timeout is the configured default
Device(config-if)# arp timeout 30 value, which is 4 hours. If the network has frequent changes to cache entries,
change the default to a shorter time period. As you reduce the ARP timeout,
your network traffic increases. A low ARP timeout value might lead to
network outage, and a value less than an hour (or 3600 seconds) will
generate significantly increased traffic across the network.
Caution We recommend that you set an ARP timeout value greater than
60 seconds.
Step 5 end Returns to privileged EXEC mode.
Example:
Device(config-if)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. ip arp proxy disable
4. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. no ip proxy-arp
5. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# interface
GigabitEthernet0/0/0
Example:
Device(config-if)# end
1. show interfaces
2. show arp
3. show ip arp
4. show processes cpu | include (ARP | PID)
DETAILED STEPS
Example:
Device# show interfaces GigabitEthernet0/0/0
Example:
Device# show arp
Example:
Device# show ip arp
Example:
Device# show processes cpu | include (ARP | PID)
interface gigabitethernet0/0/0
ip address 10.108.10.1 255.255.255.0
arp arpa
interface gigabitethernet0/0/0
ip proxy-arp
Additional References
Related Documents
RFCs
RFCs Title
RFC 826 Address Resolution Protocol
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.