I'm configuring a Red Hat Linux server which will be sending UDP packets out but never receiving ARP responses. So a static ARP entry is required.
The obvious way to do this is.
arp -s 10.0.0.1 distant_server
However that won't survive a network restart or a reboot. I could put it in the rc.local but that doesn't survive an ifdown && ifup.
The way I've found which seems to work is:
Add an entry to /etc/ethers along the lines of:
10.0.0.1 distant_server
And create a /sbin/ifup-local:
#!/bin/sh
arp -f
This feels really hacky, is there a better way?