If the system uses the
/etc/rc.d/init.d/network script to manage the network, the static routing rules are stored in
/etc/sysconfig/static-routes. This is the related script about applying the rules from
static-routes in the
network script file:
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
/sbin/route add -$args
network script reads from
/etc/sysconfig/static-routes the lines starting with "any" and passes the following arguments to the
For example: A line like this in static-routes:
any host 10.1.1.8 gw 22.214.171.124
route add -host 10.1.1.8 gw 126.96.36.199
If the system uses
NetworkManager to manage the network, the NetworkManager GUI tools provides a dialog to set the routing rules. In the "Editing config_name" dialog's "IPv4 Settings" tab (for IPv4), there is a button "Routes" which will opens the form that you can configure the routing rules.