SUMMARY: DNS on sunos 4.1.3u1

From: Marina Daniels (Marina.Daniels@ccd.tas.gov.au)
Date: Tue Oct 22 1996 - 20:24:28 CDT


Thank you very much to everybody that responded.

**** ORIGINAL QUESTION *****

What is the equivalent on sunos 4.1.3 of the /etc/nsswitch.conf file in solaris
2.x?

Box_A is a primary DNS server and other systems use it without any trouble.

However, if I login to Box_A and "nslookup Box_B" it works ok,
but if I try to ping Box_B it says Box_B is an unknown host so it's not using
the DNS.

What have I done wrong?

Marina

**** ANSWER *******

*** ORIGINAL QUESTION ****

*** ANSWER ****

There is no equivalent in Sunos 4.1.3 to /etc/nsswitch.conf in Solaris 2.x.
Basically in sunos you can't have DNS running by itself without NIS unless you
muck about with the shared libraries.
You can easily set up the machine to use NIS first then DNS if it had no luck
with the NIS.
This is how this particular box was set up, but as the NIS stuff was completely
out of date, and didn't seem to be being used by anything I very cleverly
stopped it from running :-)
Nslookup worked fine, but I later realised it wouldn't resolve when i did
ping/ftp or telnet.

Several people pointed out I had missed Section 3.2 of the FAQ "How do I use DNS
instead of NIS for hostname resolution".
Also, Section 3.1 of FAQ " How do I set up NIS/YP to use DNS?" is also
relevant.

Thanks to everyone, I;ve included a few responses below which have some more
detailed explanation,
Marina

***
  Another point - have you updated libc.so ?
  There are two ways to use DNS on Sunos - either in good way : in
company with NIS ( even with empty maps will work OK, leaving you way
to use NIS later :-), or selfishly - by replacing routines in libc.so by
those that are coming with BIND.
nslookup on Box_A is staticaly linked and came with BIND so it does work OK,
ping seems to be native, so it tries to look in hosts, then probably in NIS,
and finds nothing.

If you are not going to run NIS - update libc.so . The instructions for
that are in BIND distribution - yet look carefully through Makefile &&
Readme in /usr/lib/shlib.etc - it does document common mistake of
improperly updating libc :-). This have to be done on all 4.1.x machines.

Fedor Gnuchev

****
SunOS 4.x boxes use only NIS to resolve host names. The NIS server has
DNS resolution code in it and if it doesn't find a match in the YP hosts
table, it forwards the query out to DNS (using /etc/resolv.conf on the
NIS +server+, not client).

There is a package called resolv+ that includes the BIND name resolution
code (older flavour) and can be used to build a new shared libc.

Or, you can get the latest version of the bind code from ftp.vix.com,
which also has the ability to build a new shared c lib. I haven't used
the BIND code myself, so can't attest to how it works. (I really should
at least build it and see what happens ...)

The Resolv+ stuff works well, though. You should be able to find it via
altavista, or in ftp.uu.net undet the /networking tree.

Reto L.

-- 

******************

.... DNS functionality is built into the C library. (And the stock action of the SunOS 4.1.3 C library is to use NIS to resolve hostnames that can't be resolved via the /etc/hosts table.) If you are running the bind 4.9.4 package, then you'll need to modify your shared C library, libc.so -- CAREFULLY -- in order to make this work. (The bind-supplied version of nslookup works because it's compiled with the resolver routines in the bind package; but your copy of ping won't work because it's dynamically linked with the stock libc.so on your system. The bind package contains the instructions for modifying your libc.so to make this all work; I recommend that you follow those instructions with extraordinary care, because it's easy to wind up with an unbootable system if you make a mistake. And keep a copy of the distribution CDROM around just in case!)

Cheers, Rich



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:13 CDT