Monitoring, Management & Location Tracking

How to add permanent static routes in Cent OS:-

Configuring Static Routes :-

Static route configuration is stored in a /etc/sysconfig/network-scripts/route-interface file. For example, static routes for the eth0 interface would be stored in the /etc/sysconfig/network-scripts/route-eth0 file.

If file does not exist on your system please create it using “touch” or “vi” command and add following parameters.

e.g . # vi /etc/sysconfig/network-scripts/route-eth0

The following is a template for the network/netmask format, with instructions following afterwards:
• ADDRESS0=X.X.X.X is the network number for the static route.
• NETMASK0=X.X.X.X is the netmask for the network number defined with ADDRESS0=X.X.X.X.
• GATEWAY0=X.X.X.X is the default gateway, or an IP address that can be used to reach ADDRESS0=X.X.X.X

• The following is a sample route-eth1 file using the network/netmask directives format. The default gateway is, interface eth0. The two static routes are for the and networks. However, as mentioned before, this example is not necessary as the and networks would use the default gateway anyway:
• Subsequent static routes must be numbered sequentially, and must not skip any values. For example, ADDRESS0, ADDRESS1, ADDRESS2, and so on.
After making this changes please restart networks services

# service network restart

You can check the routes using “route” command.

# route


Version History
Revision #:
1 of 1
Last update:
‎06-24-2014 02:56 PM
Updated by:
Labels (1)
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.