[SOLVED] How to set permanent static arp entry?

I can run

ip neigh add [ip] lladdr [mac address] nud permanent dev br-lan

to set a static arp entry, but I've researched and found adding

[mac address] [ip] in the etc/ethers file, then run

post-up arp -f /etc/ethers

can make the static arp entry survive reboot.

Problem is, the "post-up arp -f /etc/ethers" command is, I think, obsolete now that the iproute2 tools are used.

Does anyone know how to set a permanent apr entry to survive reboot using iproute2 tools or how to do this another way?

I found a solution to this. You add the command above into the rc.local file (I think that is under etc)...this file is run upon reboot. I had to add "sleep 30" before the command because the command fired too earlier before the interfaces were established to enter an arp entry...sleeping for 30 seconds before firing the above command fixed it.

Good to hear you got it sorted.

many thanks for mentioning this.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.