Supported Platforms
Related Documentation
Configuring the Junos OS ARP Learning and Aging Options for Mapping IPv4 Network Addresses to MAC Addresses
The Address Resolution Protocol (ARP) is a protocol used by IPv4 to map IP network addresses to MAC addresses. This topic describes how to set passive ARP learning and ARP aging options for network devices. (A switch operates as a virtual router.)
Tasks for configuring ARP learning and aging are:
- Configuring Passive ARP Learning for Backup VRRP Routers or Switches
- Configuring a Delay in Gratuitous ARP Requests
- Configuring a Gratuitous ARP Request When an Interface is Online
- Configuring the Purging of ARP Entries
- Adjusting the ARP Aging Timer
Configuring Passive ARP Learning for Backup VRRP Routers or Switches
By default, the backup VRRP router or switch drops ARP requests for the VRRP-IP to VRRP-MAC address translation. The backup router or switch does not learn the ARP (IP-to-MAC address) mappings for the hosts sending the requests. When it detects a failure of the master router or switch and becomes the new master, the backup router or switch must learn all the entries that were present in the ARP cache of the master router or switch. In environments with many directly attached hosts, such as metro Ethernet environments (this type of environment does not pertain to switches), the number of ARP entries to learn can be high. This can cause a significant transition delay, during which traffic transmitted to some of the hosts might be dropped.
Passive ARP learning enables the ARP cache in the backup router or switch to hold approximately the same contents as the ARP cache in the master router or switch, thus preventing the problem of learning ARP entries in a burst. To enable passive ARP learning, include the passive-learning statement at the [edit system arp] hierarchy level:
We recommend setting passive learning on both the backup and master VRRP routers or switches. This prevents the need to intervene manually when the master router or switch becomes the backup router or switch. While a router or switch is operating as the master, the passive learning configuration has no operational impact. The master (or a standalone) router always learns ARP entries from incoming requests. The configuration takes effect only when the router or switch is operating as a backup router or switch.
Configuring a Delay in Gratuitous ARP Requests
By default, the Junos OS sends gratuitous ARP requests immediately after an IP address configuration change has been made on an interface. This might lead to the Packet Forwarding Engine dropping some initial request packets if the configuration updates have not been fully processed. To avoid such request packets from being dropped, you can configure a delay in gratuitous ARP requests.
To configure a delay in gratuitous ARP requests, include the gratuitous-arp-delay seconds statement at the [edit system arp] hierarchy level:
We recommend that you configure a value in the range of 3 through 6 seconds.
Configuring a Gratuitous ARP Request When an Interface is Online
To configure the Junos OS to automatically send a gratuitous ARP request when an interface is online, include the gratuitous-arp-on-ifup statement at the [edit system arp] hierarchy level:
Configuring the Purging of ARP Entries
To configure the purging of obsolete ARP entries in the cache when an interface goes offline, include the purging statement at the [edit system arp] hierarchy level:
![]() | Note: Purging is configured to delete ARP entries immediately after an interface that has gone offline is detected. If purging is not configured, ARP entries in the ARP table are retried after they have expired and are deleted if there is no ARP response within the default timeout value of 20 minutes. The default timeout value can be configured to other values using the aging-timer statement. |
Adjusting the ARP Aging Timer
By default, the ARP aging timer is set at 20 minutes. In environments with many directly attached hosts, such as metro Ethernet environments, increasing the amount of time between ARP updates by configuring the ARP aging timer can improve performance in an event where having thousands of clients time out at the same time might impact packet forwarding performance. In environments where there are devices connected with lower ARP aging timers (less than 20 minutes), decreasing the ARP aging timer can improve performance by preventing the flooding of traffic toward next hops with expired ARP entries. In most environments, the default ARP aging timer value does not need to be adjusted.
The range of the ARP aging timer is from 1 through 240 minutes.
To configure a system-wide ARP aging timer, include the aging-timer statement at the [edit system arp] hierarchy level:
You can also configure the ARP aging timer for each logical interface of family type inet. To configure the ARP aging timer at the logical interface level, specify the aging-timer statement and the timer value in minutes at the [edit system arp interfaces interface-name] hierarchy level:
To configure the ARP aging timer for a specific interface in a logical system, include the aging-timer statement and the timer value in minutes at the [edit logical-systems logical-system-name system arp interfaces interface-name] hierarchy level:
![]() | Note: If the aging timer value is configured both at the system and the logical interface levels, the value configured at the logical interface level takes precedence for the specific logical interface. |
The timer value you configure takes effect as ARP entries expire. Each refreshed ARP entry receives the new timer value. The new timer value does not apply to ARP entries that exist at the time you commit the configuration.