Using the ARP and Inverse ARP Protocols
This document describes how to use the Address Resolution Protocol (ARP) and the Inverse Address Resolution Protocol (Inverse ARP). It includes the following sections:
ARP Overview
Inverse ARP Overview
ARP Commands
ARP Overview
ARP is a low-level protocol that dynamically maps network layer addresses to physical medium access control (MAC) addresses. Given only the network layer address of the destination system, ARP locates the MAC address of the destination host within the same network segment.
For example, a router receives an IP packet destined for a host connected to one of its LANs. The packet only contains a 32-bit IP destination address. To construct the data-link layer header, a router acquires the physical MAC address of the destination host. Then, the router maps that address to the 32-bit IP address. This function is called address resolution. Figure 1 illustrates how ARP works.
Figure 1 ARP Address Resolution Broadcast
When a router translates a network layer address to a physical address, the router accesses the ARP (translation) cache. The ARP cache contains the physical MAC address that corresponds to that network layer address. If the address is missing, the router broadcasts an ARP request to all hosts to locate the correct physical MAC address. The destination host with the correct physical MAC address responds to the router. The router then sends the packet to the destination host and enters the physical MAC address into the translation cache for future use.
Inverse ARP Overview
Inverse ARP, described in RFC 1293, was created for Frame Relay networks. This protocol defines a method for routers on a Frame Relay network to learn the protocol addresses of other routers in a way that very efficiently reduces traffic. Inverse ARP discovers protocol addresses by sending Inverse ARP request packets to the hardware addresses for its Frame Relay circuits. Conversely, Inverse ARP allows the routers at the other end of each circuit to learn your router's protocol addresses. (For Frame Relay circuits the circuit identifier is the equivalent of a hardware address. See the Frame Relay topic in the Online Library.)
ARP and Inverse ARP share the same ARP cache on the router.
The router transmits Inverse ARP messages:
These are gratuitous messages that the router sends regardless of whether the other routers support ARP or Inverse ARP.
By sending Inverse ARP requests as described above, all routers learn all protocol addresses immediately under normal conditions.
The protocol address-to-hardware address entries Inverse ARP learns are placed in a non-aging state and do not age at all except when the Frame Relay circuit goes down. Since the entries are non-aging, the router does not need to transmit ARP or Inverse ARP packets for the lifetime of the circuit. This contributes to an efficient Frame Relay implementation. Additionally, the non-aging state permits updates to an entry when the other router changes its protocol address.
Support for both ARP and Inverse ARP greatly enhances the router's interoperability with other vendor's routers over Frame Relay for dynamic mapping of protocol and hardware addresses. The router almost always learns all protocol addresses by its gratuitous Inverse ARP messages. In most cases, the need to manually configure the protocol addresses of other vendor's routers at the Frame Relay configuration prompt (FR Config>) is eliminated. However, if a mapping is unresolved for some reason, the router sends both Inverse ARP and ARP requests to all hosts (see Figure 1). In this way the router attempts to resolve the mapping.
ARP Commands
Table 1 summarizes and explains the ARP and Inverse ARP configuration and monitoring commands.
Press Space twice after you type a command to display the available options for each command.
[C] means the command is available at the ARP config> prompt.
[M] means the command is available at the ARP> prompt.
Add Entry [C]
Adds a MAC address translation entry.
Syntax: add entry
Example: add entry
Interface Number [0]?
IP Address [0.0.0.0]?
Mac Address []?
Change Entry [C]
Changes a MAC address translation entry. The MAC address parameter is the address of the node being changed.
Syntax: change entry
Example: change entry
Interface Number [0]?
IP Address [0.0.0.0]?
Mac Address []?
Clear [C]
Clears the ARP cache for a network interface or forces the deletion of bad transactions. To see a list of interface numbers enter interface at the + prompt.
Syntax: clear
Example: clear
Network number to clear [0]? 1
Delete Entry [C]
Deletes a MAC address translation entry.
Syntax: delete entry
Example: delete entry
Interface Number [0]?
IP Address [0.0.0.0]?
Disable Auto-Refresh [C]
Disables the auto-refresh function, which allows the router to send another ARP request based on the entry in the translation cache before the refresh timer expires. The request is sent directly to the hardware address in the current translation instead of a broadcast.
By default, auto-refresh is disabled. When it is disabled, no additional ARP request is made, and the refresh timer is allowed to expire.
Syntax: disable auto-refresh
Example: disable auto-refresh
Dump [M]
Displays the ARP cache for a network/protocol combination. ARP and Inverse ARP use a single ARP cache.
To display the ARP cache for a particular interface, enter the interface or network number as part of the command. To see a list of interface numbers enter interface at the + prompt. If there is more than one protocol on that network, you must also enter the protocol number. This causes the software to display the hardware address-to-protocol mappings stored in that database. To obtain the protocol number, use the protocol command.
The dump command display shows the hardware address, the protocol address, and the refresh timer parameter for each mapping.
Syntax: dump
Example: dump 2 ip
Hardware Address IP Address Refresh
02-07-01-00-00-01 192.9.1.2 Permanent
a1-b2-c3-4d-5e-6f 128.185.214.36 5
100 128.185.123.51 Not Aging
16 128.185.214.38 Not Aging
Enable Auto-Refresh [C]
Enables auto-refresh, which causes the router to send another ARP request based on the entry in the translation cache before the refresh timer expires. The router sends the request directly to the hardware address in the current translation instead of a broadcast.
Syntax: enable auto-refresh
Example: enable auto-refresh
Exit [C] [M]
Use the exit command to return to the previous prompt level.
Syntax: exit
Example: exit
Hardware [M]
Displays each ARP-registered network, and displays each network's hardware address space (Hardware AS) and local hardware address. Hardware addresses are displayed according to hardware type (decimal for Token Ring and hexadecimal for Ethernet).
Syntax: hardware
Example: hardware
Network Hardware AS Hardware Address
0 FDDI/0 1 AA-00-04-00-26-14
1 FR/0 15 1023
5 TKR/0 6 00:00:C9:09:32:EF
6 TKR/1 6 00:00:C9:09:32:5E
8 Eth/0 1 AA-00-04-00-26-14
9 IPPN/0 2048 128.185.214.38
10 BDG/0 1 00-00-93-90-4C-F7
List [C]
Displays the router's ARP configuration as stored in SRAM. The list command displays the current timeout settings for the refresh and usage timer.
Syntax: list
- all
- config
- entry
all
Lists the ARP configuration followed by all of the ARP entries.
Example: list all
ARP configuration:
Refresh Timeout: 5 minutes
Auto Refresh: disabled
Mac address translation configuration
IF # Prot # Protocol --> Mac Address
config
Lists the configuration for the different ARP timers.
Example: list config
ARP configuration:
Refresh Timeout: 5 minutes
Usage Timeout: 5 minutes
Auto refresh: disabled
entry
Lists the ARP entries in SRAM.
Example: list entry
Mac address translation configuration
IF # Prot # Protocol --> Mac Address
Protocol [M]
Displays (by network) the protocols that have addresses registered with ARP. This command displays the network, protocol name, protocol number, protocol address space (in hexadecimal), and local protocol addresses.
Syntax: protocol
Example: protocol
Network Protocol (num) AS Protocol Address(es)
0 FDDI/0 IP (00) 800 128.185.214.38
0 FDDI/0 AP2 (22) 80F3 214/38
5 TKR/0 IP (00) 800 128.185.209.38
6 TKR/1 IP (00) 800 10.1.181.38
8 Eth/0 IP (00) 800 128.185.221.38
8 Eth/0 AP2 (22) 80F3 221/38
Set [C]
Sets the ARP refresh timer.
Syntax: set
- refresh-timer
refresh-timer #-of-minutes
Specifies the time it takes for an ARP cache entry to age out. The default is 5 minutes. Zero (0) disables the refresh timer.
Example: set refresh-timer
timeout (in minutes) [5]? 3
Statistics [M]
Displays a variety of statistics about the operation of the ARP module.
Syntax: statistics
Example: statistics
ARP input packet overflows
Net Count
Eth/0 0
PPP/0 0
PPP/1 0
IPPN/0 0
BDG/0 0
ARP cache meters
Net Prot Max Cur Cnt Alloc Refresh: Tot Failure TMOs: Refresh
0 0 1 1 1 17 0 0 13
docs@openroute.com
Copyright © 1998, OpenROUTE Networks, Inc. All rights
reserved.