Ask Your Question
0

How to add following static route address in /etc/sysconfig/network-scripts/route-eth0 to make it permanent?

asked 2017-04-26 04:53:33 -0600

snoop gravatar image

updated 2017-04-26 04:56:25 -0600

I have following list of route addresses which I need to add in /etc/sysconfig/network-scripts/route-eth0 file in order to make it permanent add.

route add -net 101.122.122.0 netmask 255.255.248.0 gw 10.0.0.10
route add -net 132.138.109.3 netmask 255.255.255.255 gw 10.0.0.10
route add -net 224.0.0.0 netmask 240.0.0.0 gw 10.0.0.10
route add -net 147.255.255.255 netmask 255.255.255.255 gw 10.0.0.10
route add -net 102.128.172.2 netmask 255.255.252.0 gw 10.0.0.10

In Windows it is simple to add. It can be achieved by adding just -p command and it makes it permanent. What will be the file format for Linux. Any help appreciated.

edit retag flag offensive close merge delete

Comments

What have you tried so far? Did you follow this guide?

thomaswood gravatar imagethomaswood ( 2017-04-26 12:26:49 -0600 )edit

Yes I have tried steps written in documentation. Between my fedora version is 24.

snoop gravatar imagesnoop ( 2017-04-27 13:12:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-27 14:54:46 -0600

MaoTao gravatar image

You can use this syntax command:

route add default

taken from

man route

Or from the newer

ip route add default

taken from

man ip route

which seems to have more options than the old one.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-04-26 04:53:33 -0600

Seen: 446 times

Last updated: Apr 27 '17