Static Routes
From Leo's Notes
This page was last edited on 14 January 2016, at 17:31.
Temporary Route
# ip route add 136.159.9.1 dev eth1
# ip route add 10.0.0.0/8 via 136.159.9.1
This will be wiped if the network gets restarted or if the machine reboots.
Persistent
To make your route survive a reboot, ensure that there is a gateway set in /etc/sysconfig/network-scripts/ifcfg-eth1. Eg:
DEVICE="eth1"
BOOTPROTO="static"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=136.159.9.9
GATEWAY=136.159.9.1
NETMASK=255.255.255.0
Then, define the static routes in /etc/sysconfig/network-scripts/route-eth1:
default 136.159.9.1 dev eth1
10.0.0.0/8 via 136.159.9.1 dev eth1