The ARP commands to view, display, or modify the details/information in an ARP table/cache.
The ARP cache or table has the dynamic list of IP and MAC addresses of those devices to which your computer has communicated recently in a local network. The purpose of maintaining an ARP table is that when you want to communicate with another device, your device does not need to send the ARP request for the MAC address of that device.
The ARP commands also helps to find out the duplicate IP address and invalid entries in an ARP table/cache.
Some ARP commands are given below:
- arp -a: This command is used to display the ARP table for a particular IP address. It also shows all the entries of the ARP cache or table.
- arp -g: This command works the same as the arp -a command.
- arp -d: This command is used when you want to delete an entry from the ARP table for a particular interface. To delete an entry, write arp -d command along with the IP address in a command prompt you want to delete.
- arp -d *: You can also delete all the entries from the ARP table. This command will remove or flush all the entries from the table.
- arp -s: This command is used to add the static entry in the ARP table, which resolves the InetAddr (IP address) to the EtherAddr (physical address). To add a static entry in an ARP table, write arp -s command along with the IP address and MAC address of the device in a command prompt.
Where, IP address = 192.168.43.160
MAC address = 00-aa-00-62-c6-09
- /?: This command is used to show the help at the command prompt.
- arp purge-delay: The arp purge-delay command delays the purging in the ARP entries in an ARP table/cache when the interface goes down or slows down. When the interface comes up within the delay time, the ARP entries are restored, and packet loss with ECMP (Equal Cost Multipath) is restricted.
- no arp purge-delay: This command is used to turn off the purge delay.
- arp timeout: This command is used to determine how long the dynamic entries learned on the interface resides in the ARP cache. This command is also used in the interface configuration mode. When the timeout of an interface changes, this change only applies to that particular interface.
- show interface: This command is used to show the ARP timeout value. The format of the timeout value is hours: minutes: seconds.
- clear arp cache: This command deletes/removes all the dynamic entries from the ARP table.
- proxy-arp: This command is used to enable the proxy ARP on an interface. The network devices are able to respond to ARP requests only when the proxy ARP is enabled.
- no proxy-arp: This command is used to disable the proxy-arp on the interface.
- show arp: This command is used to indicate the Address Resolution Protocol. ARP creates a correspondence between network addresses and hardware addresses of Ethernet. The record of each correspondence is stored in an ARP table for a fixed amount of time.
- show arp traffic: This command is used to display the static traffic on the Address Resolution Protocol (ARP).