From owner-freebsd-questions Thu May 30 13:17:52 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA19121 for questions-outgoing; Thu, 30 May 1996 13:17:52 -0700 (PDT) Received: from guava.blueberry.co.uk ([194.70.52.51]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA19108 for ; Thu, 30 May 1996 13:17:47 -0700 (PDT) Received: (from nik@localhost) by guava.blueberry.co.uk (8.7.5/8.7.3) id WAA01200 Thu, 30 May 1996 22:17:52 +0100 (BST) From: Nik Clayton Message-Id: <199605302117.WAA01200@guava.blueberry.co.uk> Subject: NIS and usage of /etc/hosts To: questions@freebsd.org Date: Thu, 30 May 1996 22:17:51 +0100 (BST) Cc: nik@guava.blueberry.co.uk (Nik Clayton) X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk How do, Short question: With NIS running on a local network, a name service running, but no reverse DNS, telnet'ing to another machine on the local network pauses for 2 minutes will the in-addr.arpa lookups time out. Why isn't the hosts.byaddr map used? Long question (as above, but more depth, for those with time): I've got two machines, A and B. I'm in the process of installing NIS on the two of them. A is the master, B is the client. Up until I started doing this, both machines had identical /etc/passwd, /etc/hosts and /etc/host.conf files. I think I've got NIS running successfully. Certainly the passwd maps are going across successfully, because I can login to B as one of the users on A, when that user only exists in the NIS map, and definitely not on B's /etc/passwd file. I'm in the final throes of finishing this configuration. After reducing the password file on B, I figured it was time to reduce the /etc/hosts file as well. So I pulled it down to it's bare essentials, namely an entry for 'localhost' and an entry for 'B' itself. Then I edited /etc/host.conf, and set the lookup order to hosts nis bind My reasoning being 'use /etc/hosts for yourself and localhost, nis for anything on the local network, and the DNS for everything else' which seems sensible. And now, telnetting from A to B takes 2 minutes longer than normal. If I put a line for A into B's /etc/hosts file then I can telnet in straight away. So far, this smells like a name resolution problem. After theorising with a friend, we decided that telnetd (and others, because this behaviour is exhibited with rlogin) is doing a reverse lookup on A's IP address to get the name, to put it into things like {w,u}tmp and the like. Because we don't have any reverse DNS (it's a long story) Acting on this, I commented out the 'bind' entry in /etc/host.conf and tried again. Our theory seems to be correct, as now A's IP address is put into the {w,u}tmp records, and the connection starts at the usual speed. Of course, now B can't do name lookups, which isn't very useful. This feels like telnetd (and friends) aren't using the host.byaddr NIS map to turn the IP address into a name. Why? Or am I barking up completely the wrong tree? N -- --+=[ Blueberry Hill Blueberry Design ]=+-- --+=[ http://www.blueberry.co.uk/ 1/9 Chelsea Harbour Design Centre, ]=+-- --+=[ WebMaster@blueberry.co.uk London, England, SW10 0XE ]=+-- --+=[ The Truth Is Out There: /usr/local/X11R6/lib/lib[X11|Xaw|Xpm|Xmu].a ]ENTP