0

I am doing some SDN research. In order to avoid having to route ARP packets, I manually set arp IP to MAC mappings on the hosts using the arp -s <ip> <mac> command.

Link failures are simulated by turning on/off the interface using ifconfig <interface> up|down, and traffic is simple UDP packets sent from source to destination.

If a interfaced is turned down, all the arp entries for that interface are deleted. Is there a way to ensure that the arp entries stay?

Edit: It appears from Linux: What causes static ARP entries to flush on link down that this is controlled by the arp_evict_nocarrier sysctl parameter. Is there a way to set this parameter on current linux distros?

  • 1
    Does this answer your question? [Linux: What causes static ARP entries to flush on link down](https://serverfault.com/questions/1083698/linux-what-causes-static-arp-entries-to-flush-on-link-down) – Zac67 Jul 22 '22 at 10:59
  • Thanks for your feedback. It almost answers the question, I am not sure from this, if I can indeed set arp_evict_nocarrier to 0 on my current machine (Ubuntu 20.04 LTS). I do not find this setting in /proc/sys/net/ipv4/conf/eth0/. – person17381 Aug 02 '22 at 00:06
  • That's a sysctl setting: `sysctl -w net.ipv4.conf.eth0.arp_evict_nocarrier=0` – Zac67 Aug 02 '22 at 05:48
  • So even if I don't find the file `arp_evict_nocarrier` in `proc/sys/net/ipv4/conf/eth0/`, if I run the command `sysctl -w net.ipv4.conf.eth0.arp_evict_nocarrier=0` it should work? – person17381 Aug 02 '22 at 23:34

0 Answers0