How do I add a persistent static route in Linux?

How do I add a persistent static route in Linux?

So we have to add routes to config file to make it persistent. On RHEL or CentOS, you need to modify the interface file in ‘/etc/sysconfig/network-scripts’. For example, here, we have to add routes on network interface ens192. Hence, the file we need to modify will be ‘/etc/sysconfig/network-scripts/route-ens192’.

What are the types of static routes?

The following types of IPv4 and IPv6 static routes will be discussed:

  • Standard static route.
  • Default static route.
  • Summary static route.
  • Floating static route.

How to set a static route in syscofig?

In some forums they say to create a file named route-dev_name (for example route-eth0) with the relevant route and place it in /etc/sysconfig/network-scripts , in some forums they say the file should be named static-routes , in both cases I’m unable to set a static route.

How to setup persistent static routes in openSUSE 11.0?

1. Create a ifroute-<*> file for each interface For every network interface on the system which needs individual persisten static routing table create a “ifroute-<*>” file in the /etc/sysconfig/network/ directory. For instance, on my system the interface name is eth0 and hence I create a file called

How to create a static route in Solaris?

Creating Persistent (Static) Routes. You use the route command to manually manipulate the network routing tables. Because the /etc/defaultrouter file is deprecated in Oracle Solaris 11.3, you can no longer manage routes (default or otherwise) by using this file.

How do you name a persistent static route?

When you add a persistent static route, you can provide a name for the route by using the –name option. You can specify any name other than the name, default, as this name has a special meaning within the context of routing configuration.