0

I would like to delete explicitly a route in the 'static' route configuration file for some interface ( in /etc/sysconfig/network-scripts/route-eth0 for example).

Using the 'ip route' format in that file I guess the parameters are pasted after 'ip r a'...

Is there any way to explicitly delete a route (ip r d ...) from that file? Recommended method to execute the deletion when the interface comes up?

0

Recommended method to execute the deletion when the interface comes up?

Simply remove the static route entry and it won’t be created in the first place and you won’t need to delete it anymore either.

0

Remove the route from the route file. Upon a restart of networking or a reboot of the host the route will be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.