2

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:

192.168.89.0/24 via 192.53.28.193 dev eth0  src 192.53.28.216

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

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

/etc/sysconfig/network-scripts/route-eth0:

ADDRESS0=192.168.89.0
NETMASK0=255.255.255.0
GATEWAY0=192.53.28.193 

Any help would be appreciated

Thanks Dan

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

1 Answer 1

2

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 -

192.168.89.0/24 via 192.53.28.193 dev eth0  src 192.53.28.216

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

2
  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .