I'm struggling to understand how to add the route options to my routes file in rhel. Let's say I have the route:

ip route: via dev eth0  src

How can I store that in my static file with the src option?

Currently I am editing the file and am placing the following:



Any help would be appreciated

Thanks Dan

  • Have you tried adding the command in iproute format?
    – NickW
    Feb 20, 2013 at 14:35

1 Answer 1


The /etc/sysconfig/network-scripts/route-eth0 or the route-interface file has two formats. The one you specified is just one of the two, and the other one uses the IP command arguments. So you might trying replacing the contents of that file with - via dev eth0  src

Which is the same as the ip route command you posted.

  • Just expect recent routers not to follow the source routing instructions at all. It is a vestigial remnant from the times when the Internet had a few thousand machines, easily misused for all sorts of mayhem.
    – vonbrand
    Feb 20, 2013 at 18:48
  • src there is not about source routing
    – mmv-ru
    Apr 28, 2018 at 19:58

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.