How to add (persistent) static ARP entries in Linux
A MAC (or physical - depending on context) address is the layer 2 address of the network interface card on an ethernet network. It is used by routers/switches to move frames in the same layer 2 network segment.
ARP is the protocol that maps a physicall address to an IP adddress. This is either dynamic (request & reply) or static. In an unsecured environment, it is best to use static mapping (manual defined) specially with the gateway.
Adding a static ARP entry:Code:
# arp -s 10.0.0.1 00:8b:8a:4c:25:1f
To make the static arp entries persistent after reboot add following line in /etc/ethers file:
Code:
10.0.0.1 00:8b:8a:4c:25:1f
after which "arp -f" command can be ran to make it take effect immediately.