home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sun / admin / 9753 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.9 KB  |  50 lines

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