SUMMARY: Help on DNS and NIS

From: Colin McNeill (
Date: Wed Aug 14 1996 - 10:53:36 CDT

>From Wed Aug 14 12:14:57 1996
Return-Path: <>
Received: from by (4.1/SMI-4.1)
        id AA12653; Wed, 14 Aug 96 12:14:55 BST
Message-Id: <>
Date: 14 Aug 1996 12:15:15 +0100
From: "Network Manager" <>
Subject: SUMMARY:
To: "Colin McNeill (Sun)" <>
X-Mailer: Mail*Link SMTP-MS 3.0.2
Status: R

Thanks for your help. My original question was:

I have just moved our gateway to the outside world to an SLC running SunOS
4.1.4 and DP V4.0 PPP. Although the mail works fine (as the external mail
gateway is explicitly defined in /etc/hosts), whenever I try to ping or ftp
something in the outside world it comes back immediately with an "Unknown
Host" message. However, nslookup works OK and if I substitute the IP address
then ping and ftp do too.

Obviously ping is not looking to DNS to resolve the host names. But when the
gateway was also our NIS server it did.

What can I do to sort this out, I think it must be something to do with the
NIS setup, but what?

Thanks in advance for your time.

I got three replies 2 pointing me at the yp make file. Which I had already

Mike Salehi wrote:
if this is solaris rename (mv) /etc/nisswitch.dns to /etc/nisswitch.conf or
edit the one you have and make the hosts to look at dns then files.
if sun os you have to edit the /var/yp/Makefile and uncomment the -b

Claus Assmann wrote:
Have you read the FAQ? Maybe that answers your problem:

Subject: 3.1) How do I set up NIS/YP to use DNS?

  Under SunOS 4.1.x, there is a "#B=" at the top of /var/yp/Makefile,
  uncomment and change this to "B=-b" and setup NIS in the usual
  fashion. Under 4.0.x, edit the Makefile or apply the following

*** Makefile.orig Wed Jan 10 13:22:11 1990
--- Makefile Wed Jan 10 13:22:01 1990
*** 63 ****
! | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byname; \
--- 63 ----
! | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byname; \
*** 66 ****
! | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byaddr; \
--- 66 ----
! | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byaddr; \


Claus Assmann

Thanks for your help anyway.

Martin Achilli wrote:

Check if the server that it is binding to (check with ypwhich) has a route
defined to the outside world. All the machines acting as yp servers (both
slave and master) must be able to resolve host names AND have a route defined
since the yp mechanism will go though them to get outside.
Remember that the master server does not necessarily bind to itself for NIS
lookups but it can bind to one of the slaves.

This gave me the biggests clue, and by going back to using static routes I've
now sorted the problem.

Again, thanks for your help.

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