1832890 Members
2089 Online
110048 Solutions
New Discussion

Re: route add

 
Wilfred Chau_1
Respected Contributor

route add

To add gateway to a route for a particular interface.

Should I use the GATEWAY key word in ifcfg- or create a new route- file?

Which one is the "latest" method?
4 REPLIES 4
Stuart Browne
Honored Contributor

Re: route add

If you are wanting a system-wide default route on a RH/Fedora system, use 'GATEWAY=' in '/etc/sysconfig/network'.

Using a 'GATEWAY=' in a particular interface file will still work, but may produce unexpected results if you have multiple interfaces.

If you want to set up specific static routes, then there is something different to be done.
One long-haired git at your service...
Wilfred Chau_1
Respected Contributor

Re: route add

Actually this is for a bond interface.

is creating a route-bond0 a old way of adding a gateway? or should I add a GATEWAY line in ifcfg-bond0?
Stuart Browne
Honored Contributor

Re: route add

My above comment still stands as far as I'm aware..
One long-haired git at your service...
skt_skt
Honored Contributor

Re: route add

One default gateway as stuart mentioned will be fine.I am not sure why you need a separate gateay for a particular interface.Either way the data will reach the destination. But specifying gawateway on the the specific interface's configuration file is not a standard approach.