Configuring ARP
Address resolution is the process of mapping network addresses to Media Access Control (MAC) addresses, which is typically done dynamically by the system using the ARP protocol, but can also be done by Static ARP entry configuration. This process is accomplished using the Address Resolution Protocol (ARP).
ARP is used to associate IP addresses with media or MAC addresses. Taking an IP address as input, ARP determines the associated media address. After 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.
As all incoming control traffic goes through LPTS policer, if the ARP packets come in a burst they are policed according to the configuration. For more details on LPTS, see LPTS Overview.
For more details on ARP, see Information About Configuring ARP
ARP and Proxy ARP
Two forms of address resolution are supported by Cisco IOS XR software: Address Resolution Protocol (ARP) and proxy ARP, as defined in RFC 826 and RFC 1027, respectively. Cisco IOS XR software also supports a form of ARP called local proxy ARP.
For more details on Proxy ARP and Local Proxy ARP, see Proxy ARP and Local Proxy ARP
Restrictions
The following restrictions apply to configuring ARP :
-
Reverse Address Resolution Protocol (RARP) is not supported.
-
ARP throttling, which is the rate limiting of ARP packets in Forwarding Information Base (FIB), is not supported.
ARP Cache Entries
ARP establishes correspondences between network addresses (an IP address, for example) and Ethernet hardware addresses. A record of each correspondence is kept in a cache for a predetermined amount of time and then discarded.
You can also add a static (permanent) entry to the ARP cache that persists until explicitly removed.
Defining a Static ARP Cache Entry
ARP and other address resolution protocols provide a dynamic mapping between IP addresses and media addresses. Because most hosts support dynamic address resolution, generally you need not specify static ARP entries. If you must define them, you can do so globally. Performing this task installs a permanent entry in the ARP cache. Cisco IOS XR software uses this entry to translate 32-bit IP addresses into 48-bit hardware addresses.
Optionally, you can specify that the software responds to ARP requests as if the software was identified by the specified IP address, by making an alias entry in the ARP cache.
Configuration Example
A cache entry is created to establish connection between an IP address 203.0.1.2 and the MAC address 0010.9400.000c. Additionally, the cache entry is created as an alias entry such that the interface to which the entry is attached will respond to ARP request packets for this network layer address with the data link layer address in the entry.
Router#config
Router(config)#arp 203.0.1.2 0010.9400.000c arPA
Router(config)#commit
Running Configuration
Router#show run arp 203.0.1.2 0010.9400.000c arpA
arp vrf default 203.0.1.2 0010.9400.000c ARPA
Verification
Verify that the State is static for proper functioning:
Router#show arp location 0/0/CPU0
Address Age Hardware Addr State Type Interface
203.0.1.1 - ea28.5f0b.8024 Interface ARPA HundredGigE0/0/0/9
203.0.1.2 - 0010.9400.000c Static ARPA HundredGigE0/0/0/9
Proxy ARP and Local Proxy ARP
When proxy ARP is disabled, the networking device responds to ARP requests received on an interface only if one of the following conditions is met:
-
The target IP address in the ARP request is the same as the interface IP address on which the request is received.
-
The target IP address in the ARP request has a statically configured ARP alias.
When proxy ARP is enabled, the networking device also responds to ARP requests that meet all 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 local proxy ARP is enabled, the networking device responds to ARP requests that meet all the following conditions:
-
The target IP address in the ARP request, the IP address of the ARP source, and the IP address of the interface on which the ARP request is received are on the same Layer 3 network.
-
The next hop for the target IP address is through the same interface as the request is received.
Typically, local proxy ARP is used to resolve MAC addresses to IP addresses in the same Layer 3 network. Local proxy ARP supports all types of interfaces supported by ARP and unnumbered interfaces.
Enabling Proxy ARP
Cisco IOS XR software uses proxy ARP (as defined in RFC 1027) to help hosts with no knowledge of routing determine the media addresses of hosts on other networks or subnets. For example, if the router receives an ARP request for a host that is not on the same interface as the ARP request sender, and if the router has all of its routes to that host through other interfaces, then it generates a proxy ARP reply packet giving its own local data-link address. The host that sent the ARP request then sends its packets to the router, which forwards them to the intended host. Proxy ARP is disabled by default; this task describes how to enable proxy ARP if it has been disabled.
Configuration Example
Proxy ARP is enabled on the HundredGigE interface-0/0/0/0:
Router#configure
Router(config)#interface HundredGigE0/0/0/0
Router(config-if)#proxy-arp
Router(config-if)#commit
Running Configuration
Router# show running-config interface HundredGigE0/0/0/0
mtu 4000
ipv4 address 1.0.0.1 255.255.255.0
proxy-arp
!
!
Verification
Verify that proxy ARP is configured and enabled:
Router# show arp idb interface HundredGigE0/0/0/0 location 0/0/CPU0(0x08000038):
IPv4 address 1.0.0.1, Vrf ID 0x60000000
VRF Name default
Dynamic learning: Enable
Dynamic entry timeout: 14400 secs
Purge delay: off
IPv4 caps added (state up)
MPLS caps not added
Interface not virtual, not client fwd ref,
Proxy arp is configured, is enabled
Local Proxy arp not configured
Packet IO layer is NetIO
Srg Role : DEFAULT
Idb Flag : 262332
IDB is Complete
Enabling Local Proxy ARP
Local proxy ARP is used to resolve MAC addresses to IP addresses in the same Layer 3 network such as, private VLANs that are Layer 2-separated. Local proxy ARP supports all types of interfaces supported by ARP and unnumbered interfaces.
Configuration Example
Local proxy ARP is enabled on the HundredGigE interface-0/0/0/0
Router#configure
Router(config)#interface HundredGigE0/0/0/0
Router(config-if)#local-proxy-arp
Router(config-if)#commit
Running Configuration
Router#show running-config interface HundredGigE0/0/0/0
ipv4 address 1.0.0.1 255.255.255.0
local-proxy-arp
!
Verification
Verify that local proxy ARP is configured:
Router# show arp idb interface HundredGigE0/0/0/0 location 0/0/CPU0
(0x08000038):
IPv4 address 1.0.0.1, Vrf ID 0x60000000
VRF Name default
Dynamic learning: Enable
Dynamic entry timeout: 14400 secs
Purge delay: off
IPv4 caps added (state up)
MPLS caps not added
Interface not virtual, not client fwd ref,
Proxy arp not configured, not enabled
Local Proxy arp is configured
Packet IO layer is NetIO
Srg Role : DEFAULT
Idb Flag : 264332
IDB is Complete
Associated Commands
-
show arp idb
Configure Learning of Local ARP Entries
You can configure an interface or a sub-interface to learn only the ARP entries from its local subnet.
Use the following procedure to configure local ARP learning on an interface.
-
Enter the interface configuration mode.
Router(config)# interface GigabitEthernet 0/0/0/1
-
Configure the IPv4/IPv6 address for the interface.
Router(config-if)# ipv4 address 12.1.3.4 255.255.255.0
-
Configure local ARP learning on the interface.
Router(config-if)# arp learning local
-
Enable the interface and commit your configuration.
Router(config-if)# no shut Router(config-if)# commit RP/0/0/CPU0:Dec 12 13:41:16.580 : ifmgr[397]: %PKT_INFRA-LINK-3-UPDOWN : interface GigabitEthernet 0/0/0/1, changed state to Down RP/0/0/CPU0:Dec 12 13:41:16.683 : ifmgr[397]: %PKT_INFRA-LINK-3-UPDOWN : interface GigabitEthernet 0/0/0/1 changed state to Up
-
Confirm your configuration.
Router(config-if)# show running-configuration .. Building configuration... !! IOS XR Configuration 0.0.0 !! Last configuration change at Mon Dec 12 13:41:16 2016 !interface GigabitEthernet 0/0/0/1 ipv4 address 12.1.3.4 255.255.255.0 arp learning local !
-
Verify if local ARP learning is working as configured on the interface.
Router(config-if)# do show arp idb gigabitEthernet 0/0/0/1 location 0/0/CPU0 Thu Dec 15 10:00:11.733 IST GigabitEthernet 0/0/0/1 (0x00000040): IPv4 address 12.1.3.4, Vrf ID 0x60000000 VRF Name default Dynamic learning: Local Dynamic entry timeout: 14400 secs Purge delay: off IPv4 caps added (state up) MPLS caps not added Interface not virtual, not client fwd ref, Proxy arp not configured, not enabled Local Proxy arp not configured Packet IO layer is NetIO Srg Role : DEFAULT Idb Flag : 2146444 IDB is Complete
-
(Optional) You can monitor the ARP traffic on the interface.
Router(config-if)# do show arp idb gigabitEthernet 0/0/0/1 location 0/0/CPU0 Thu Dec 15 10:13:28.964 IST ARP statistics: Recv: 0 requests, 0 replies Sent: 0 requests, 1 replies (0 proxy, 0 local proxy, 1 gratuitous) Subscriber Interface: 0 requests recv, 0 replies sent, 0 gratuitous replies sent Resolve requests rcvd: 0 Resolve requests dropped: 0 Errors: 0 out of memory, 0 no buffers, 0 out of sunbet ARP cache: Total ARP entries in cache: 1 Dynamic: 0, Interface: 1, Standby: 0 Alias: 0, Static: 0, DHCP: 0 IP Packet drop count for GigabitEthernet0_0_0_1: 0