In that case, do this-
Create a file called /etc/myroutes. In this file, place all of your static routes. Put them in the form:
gateway network/netmask
eg.
10.0.0.1 10.0.3.0/24
10.0.0.1 10.0.5.0/25
Load up /etc/netstart in vi. Add the following code to handle the static routes contained in /etc/myroutes:
# Add static routes as required.
# file format is:
# gw network/mask
if [ -f /etc/myroutes ]; then
{
set -- `sed -e 's/#.*$//' /etc/myroutes |grep -v '^$'`
while [ $# -ge 2 ]; do
route -n add -net $2 $1
shift 2
done
}
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.