Persist ip route and ip rule configurations for Policy Based Routing (iproute2)
1
vote
2
answers
2612
views
Currently running on Fedora Server 23, I've been searching for the right way to persist commands such as:
ip route add default via 10.0.2.1 dev ens32 table EXAMPLE_TABLE
ip rule add from 10.1.2.50 lookup EXAMPLE_TABLE prio 1000
either through nmcli (ideally) or through some other, similarly, **sane** way.
I've seen examples like lodging it on the *route-ifname* file but that don't seem to execute the default rule correctly.
If you run
ip route show table EXAMPLE_TABLE
after a reboot you'll realize it doesn't stick - at least in my experience.
Any insights into this would be lovely, thank you.
Asked by Canha
(131 rep)
Dec 7, 2015, 07:05 PM
Last activity: Jun 6, 2025, 04:06 AM
Last activity: Jun 6, 2025, 04:06 AM