Forrest logo
back to the arp tool

arp:tldr:15135

arp: Create an entry in the ARP table.
$ arp -s ${address} ${mac_address}
try on your machine

The command "arp -s ${address} ${mac_address}" is used to manually add an entry to the Address Resolution Protocol (ARP) cache table in a computer's operating system.

  • ${address}: This should be replaced with the IP address you want to manually associate with the MAC address.
  • ${mac_address}: This should be replaced with the MAC address (also known as hardware address or physical address) you want to associate with the IP address.

The ARP protocol is responsible for resolving IP addresses to their corresponding MAC addresses on a local network. When a computer needs to communicate with another device on the network, it uses ARP to determine the MAC address of the destination device.

By using the "arp -s" command with the specified IP address and MAC address, you're instructing your operating system to add a statically defined entry in the ARP table. This will allow your computer to directly map the provided IP address to the given MAC address, bypassing the need for any ARP resolution.

It's worth mentioning that these cached entries are usually temporary and can be overwritten or removed by the operating system under certain circumstances, such as when the ARP cache table becomes full or when devices on the network change.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the arp tool