Add a static entry to the ARP table (BASH)

The following allows you to add an entry to the ARP table

Details

  • Language: BASH

Snippet

arp -s $IP $MAC

Usage Example

arp -s 192.168.1.241 44:94:FC:9C:C7:5C
arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.241            ether   44:94:fc:9c:c7:5c   CM                    eth0
192.168.1.254            ether   00:1f:9f:76:98:53   C                     eth0
192.168.1.250            ether   80:1f:02:8d:5f:52   C                     eth0
192.168.1.73             ether   00:1f:1f:a8:92:85   C                     eth0