Up: SGI admin Frequently Asked Questions (FAQ)
Next: -42- How can I make the 'slip' command advertise the Ethernet address of the SLIP client?
Previous: -40- How can I measure my network's reliability?
Subject: -41- How do I add a static route?
Date: 07 Sep 1996 00:00:01 EST
Some sites handle IP routing by designating a routing machine and
having all other hosts define a static route to that machine. The way
to do this on SGIs is in the /etc/init.d/network.local script.
1) Read the paragraph just before the copyright at the top of
/etc/init.d/network and make the links it specifies.
2) Put something like the following in /etc/init.d/network.local,
replacing ROUTER'S.IP.ADDRESS.HERE with the address of your router.
Under IRIX 6.x, omit the "1" at the end of the same line.
#! /bin/sh
IS_ON=/sbin/chkconfig
case "$1" in
'start')
if $IS_ON network; then # network must be chkconfig'ed on
/usr/etc/route add default ROUTER'S.IP.ADDRESS.HERE 1
fi
;;
'stop')
/usr/etc/route delete default ROUTER'S.IP.ADDRESS.HERE ;;
*)
echo "Usage: $0 {start|stop}" ;;
esac
Check the script with 'sh -v /etc/init.d/network.local'.
The above setup will not allow you to NFS-mount (or unmount) disks
from the other side of the static route gracefully, because the route
will be added after the mount attempt during startup and deleted
before the unmount attempt during shutdown. Instead of putting the
routing commands in a separate script, put them in /etc/init.d/network
itself. Put the 'route add' just after the "$ROUTE $RFLUSHFLAG" line
and the 'route delete' after the '/sbin killall mount ...' line.
There is no reason to define a static route and also to run routed. If
you do so, routed will delete the static route and you'll be confused.
'chkconfig routed off'.
Under IRIX 6.2 or later, remove the '1' from the end of the 'route
add' line.
Up: SGI admin Frequently Asked Questions (FAQ)
Next: -42- How can I make the 'slip' command advertise the Ethernet address of the SLIP client?
Previous: -40- How can I measure my network's reliability?