Static route disappears every few days
I have a static route configured and pointing to a DHCP enabled gateway. The issue is there every few days, that route disappears. I haven't been able to identify the trigger yet.
Looking at the routing table, that route is missing:
If I go edit the route in the static route config and "re-save" it, then it will appear again.
I'm not sure if this situation occurs during the DHCP renew process but this situation did not occur on 2.4.5 and started happening after the upgrade to 2.5.1. In the meantime, I will have to create a crontab to re-add this route but is there a more elegant solution?
Looks like your network(s) and the static route are too wide. Post your topology and what you're trying to do.
@marvosa This should be very straightforward, I want all the traffic destined for 10.0.0.0/8 to be sent over interface vmx2.36.
Looking at this, I do realize however that I have a VPN client interface with IP 10.21.0.101 and I'm wondering if the VPN resets and it pulls the 10.0.0.0/8 route with it.
I just checked the the VPN has been up for 14 days now but the static route disappeared in the last 2 days.
We're also experiencing this issue (https://forum.netgate.com/topic/164671/bug-dhclient-flushes-static-routes). Our current theory is that the DHCP client is to blame.
A workaround it so go static: set the interfaces configuration to static and also set the gateway manually. We stopped having this issue after that.