home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / admin / 5032 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  4.5 KB

  1. Xref: sparky comp.unix.admin:5032 comp.sys.sun.admin:6318
  2. Path: sparky!uunet!zephyr.ens.tek.com!wrgate!fangorn.wr.tek.com!rogers
  3. From: rogers@fangorn.wr.tek.com (Roger Southwick)
  4. Newsgroups: comp.unix.admin,comp.sys.sun.admin
  5. Subject: Re: NIS vs DNS
  6. Message-ID: <10610@wrgate.wr.tek.com>
  7. Date: 14 Sep 92 18:42:36 GMT
  8. References: <1992Sep12.085029.19657@fwi.uva.nl>
  9. Sender: news@wrgate.wr.tek.com
  10. Followup-To: comp.unix.admin
  11. Organization: Tektronix, Inc.
  12. Lines: 98
  13. X-Newsreader: Tin 1.1 PL5
  14.  
  15. [ WARNING - A RATHER LONG WINDED ARTICLE FOLLOWS ]
  16.  
  17. > casper@fwi.uva.nl (Casper Dik) writes:
  18. >
  19. >> rsnyder@atl.ge.com (Bob Snyder) writes:
  20. >>
  21. >>> jonathan@gabriel.keele.ac.uk (Jonathan Knight) writes:
  22. >>>
  23. >>> We run NIS and DNS using the Sun approved method.  Each NIS master has
  24. >>> a resolv.conf which it uses when a host lookup isn't in the NIS maps.
  25. >>>
  26. >>> Here's why:
  27. >>
  28. >> [Good reasons while deleted]
  29. >>
  30. >> Here's why not:
  31. >>
  32. >> The support for multi-homed hosts is abysmal.  You can't give multiple
  33. >> IP addresses to an /etc/hosts file (from what I have been able to see),
  34. >> and if you are willing to use only DNS for that, the NIS master will do
  35. >> a DNS query, returning the addresses, with the best address first,
  36. >> *from the server's point of view*.  Let's say I have a NIS server
  37. >> (Machine A) on subnets 1 and 2.  I also have another multi-homed host
  38. >> (Machine B) that sitts on subnets 1 and 2.  If a machine on subnet 2
  39. >> looks up Machine B's address via NIS, it will get the address on subnet
  40. >> 1, and will route to that host, even though it could reach the machine
  41. >> directly, without routing.
  42. >>
  43. >> If something I showed here is wrong, please tell me, but this is what I
  44. >> am seeing on my networks.
  45. >
  46. > If you put all the NIS servers on non-gateway machine, you won't have a
  47. > problem like that. But I agree, the NIS server can take the address of
  48. > the client and rearrange the returned addresses accordingly.
  49.  
  50. (Just as a preliminary, I don't pretend to be an DNS/NIS expert, although
  51. I've been heavily using both for some years).
  52.  
  53. I think the situation with NIS/DNS depends on which machine is your NIS
  54. master. Here is our situation, which {may,may not} be similar to Bob's:
  55.  
  56.  
  57.                   [WS1 (NIS Master)]   [WS 2 (NIS client)]
  58.         +--------+             |                    |
  59.         |     |-- net 1 ----+-----+--------------+-
  60.         | Router |                   |
  61.         |     |-- net 2 -------+-------+-----[WS 3 (NIS slave)]
  62.         |        |                |  |    |
  63.         |        |-- net 3 ----+  |  |      +-----[WS 4 (NIS client)]
  64.         |        |             |  |  |
  65.         |        |-- net 4 -+  |  |  |
  66.         +--------+          |  |  |  |
  67.             |               |  |  |  |
  68.                 | net 5         |  |  |  |
  69.     [DNS Master]----+               |  |  |  |
  70.             |               |  |  |  |
  71.             +---------[BIG Sun FILESERVER ]
  72.             |         [with 4 NC 400 cards]
  73.                     [and one ie port    ]
  74.  
  75.  
  76. In the DNS master, we list all five addresses of the fileserver.
  77.  
  78. Because ALL of the workstations (I only showed 4 out of 100), are
  79. all related, I must run the same NIS domain (shared password file).
  80.  
  81. The NIS master (WS1), which would runs DNS for the all the
  82. workstations, has a /etc/resolv.conf file listing the DNS Master.  This
  83. NIS master (WS1) should correctly answer to get the right address of
  84. the FILESERVER when WS2 asks (the net 1 address), right?
  85.  
  86. For WS3 or WS4, what answer will we get?  The answer you want is
  87. the net 2 address and NOT the net 1 address.  I *think* you will
  88. get the net 1 address (I need to do the experiment).
  89.  
  90. What I did for our domain is to rip the NIS code out for the
  91. gethostbyname()/gethostbyaddr() calls and put in the 4.8.3 resolver
  92. code and rebuild the shared library (which is discussed elsewhere on
  93. this net).
  94.  
  95. I made the FILESERVER be a DNS secondary for the domain, and then for
  96. each workstation, made a /etc/resolv.conf file to point at the
  97. FILESERVER.  Since DNS will sort the response according to the net it
  98. received the query on, I get the correct address for the FILESERVER.
  99.  
  100. This is a good solution, BUT gets around the use of NIS.  I have some
  101. utilities which, as a result, don't use DNS at all because there are
  102. statically linked, and therefore only know NIS maps (like rcp, route,
  103. and others).
  104.  
  105. Of course, having BSD sources, I was able to recompile rcp (which is 
  106. the major objection), BUT I would rather not have to do this for
  107. all applications unless I have to.
  108.  
  109. Any suggestions, comments or queries are, of course, welcome. 
  110. --
  111.     -Roger      (Roger.S.Southwick@tek.com)
  112.         UUCP:    ...!uunet!tektronix!Roger.S.Southwick
  113.