home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.admin
- Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!mills
- From: mills@ccu.umanitoba.ca (Gary Mills)
- Subject: Re: default route for diskless clients
- Message-ID: <Bzz72z.CqH@ccu.umanitoba.ca>
- Sender: news@ccu.umanitoba.ca
- Nntp-Posting-Host: altair.cc.umanitoba.ca
- Organization: University of Manitoba, Winnipeg, Canada
- References: <1992Dec28.044346.4184@tc.cornell.edu>
- Date: Mon, 28 Dec 1992 15:30:35 GMT
- Lines: 37
-
- In <1992Dec28.044346.4184@tc.cornell.edu> eirik@elf.TN.Cornell.EDU (Eirik Fuller) writes:
-
- >Empirical observations have led me to the following conclusion:
-
- >The default route for a diskless client is provided by rpc.bootparamd,
- >and it chooses the first entry in the kernel's network routing table
- >which is on the same subnet as the client.
-
- Yes, in my case it chooses a host route to one of my servers.
-
- >It might also seem trivial to fix this poor choice of default route.
- >However, if the client's /usr lives on another subnet, there is a
- >chicken-and-egg problem. The route command, even if copied to the
- >root partition, still requires shared libraries, which become
- >inaccessible (but are apparently still necessary) after the routing
- >table is flushed.
-
- One problem is that `route -f add' does the flush before the add, with
- the result that the route to the server is lost. My solution was to
- modify /etc/rc.local so it changes routes more carefully:
-
- #
- # Try to add a default route again, now that "/usr" is mounted and NIS
- # is running.
- #
- if [ ! -f /sbin/route -a -f /etc/defaultrouter ]; then
- set - `netstat -n -r | grep default`
- route -n add default `cat /etc/defaultrouter` 1
- if [ `netstat -n -r | grep -c default` -gt 1 ]; then
- route -n delete default $2
- fi
- fi
-
- This assumes that /etc/defaultrouter contains the IP address of the
- the desired gateway.
- --
- -Gary Mills- -Networking Group- -U of M Computer Services-
-