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

Dan
  • 367
  • 3
  • 4
  • 16

1 Answers1

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.

Daniel t.
  • 9,291
  • 1
  • 33
  • 36
  • 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 '13 at 18:48
  • `src` there is not about source routing – mmv-ru Apr 28 '18 at 19:58