The arp command in Linux is used to display and manipulate the system’s ARP (Address Resolution Protocol) cache, which maps IP addresses to MAC (Media Access Control) addresses. ARP is essential for network communication, as it enables devices to find each other’s physical addresses on a local network.
For example, to view the current ARP cache, you can use:
bash
arp -a
This lists all the entries in the cache, including the IP addresses and corresponding MAC addresses.
To add a new static ARP entry, use:
bash
arp -s 192.168.1.100 00:1A:2B:3C:4D:5E
This maps the IP 192.168.1.100 to the MAC address 00:1A:2B:3C:4D:5E.