Configuring Static ARP Table Entries For Mapping IP Addresses to MAC Addresses
By default, the device responds to an Address Resolution Protocol (ARP) request only if the destination address of the ARP request is on the local network of the incoming interface. For Fast Ethernet or Gigabit Ethernet interfaces, you can configure static ARP entries that associate the IP addresses of nodes on the same Ethernet subnet with their media access control (MAC) addresses. These static ARP entries enable the device to respond to ARP requests even if the destination address of the ARP request is not local to the incoming Ethernet interface.
Also, unlike dynamically learned ARP entries, static ARP entries do not age out. You can also configure static ARP entries in a troubleshooting situation or if your device is unable to learn a MAC address dynamically.
By default, an ARP policer is installed that is shared among all the Ethernet interfaces on which you have configured the family inet statement. By including the arp statement at the [edit interfaces interface-name unit logical-unit-number family inet policer] hierarchy level, you can apply a specific ARP-packet policer to an interface. This feature is not available on EX Series switches.
To configure static ARP entries:
- In the configuration mode, at the  hierarchy
level, configure the router interface on which the ARP table entries
for the router is configured.user@host# edit interfaces interface-name
- Configure the protocol family, the logical unit of the
interface, and the interface address of the router interface at the
[edit interfaces interface-name] hierarchy
level. While configuring the protocol family, specify inet as the protocol family.
When you need to conserve IP addresses, you can configure an Ethernet interface to be unnumbered by including the unnumbered-address statement at the [edit interfaces interface-name unit logical-unit-number family inet] hierarchy level.[edit interfaces interface-name]user@host# edit unit logical-unit-number family inet address interface-address
- Configure a static ARP entry by specifying the IP address
and the MAC address that are to be mapped to each other. The IP address
specified must be part of the subnet defined in the enclosing address statement. The MAC address must be specified as hexadecimal
bytes in the following formats: nnnn.nnnn.nnnn or nn:nn:nn:nn:nn:nnformat. For instance, you can use either 0011.2233.4455 or 00:11:22:33:44:55. [edit interfaces interface-name unit logical-unit-number family inet address interface-addressuser@host# set arp ip-address mac mac-address
- Configure another static ARP entry by specifying the IP
address and the MAC address that are to be mapped to each other. You
can also associate a multicast MAC address with a unicast IP address
by including the multicast-mac option with the arp statement. You can optionally configure the router to respond to
ARP requests for the specified IP address by using the publish option with the arp statement.
For unicast MAC addresses only, if you include the publish option, the router or switch replies to proxy ARP requests.[edit interfaces interface-name unit logical-unit-number family inet address interface-addressuser@host# set arp ip-address multicast-mac mac-address publish
The Junos OS supports the IPv6 static neighbor discovery cache entries, similar to the static ARP entries in IPv4.