From owner-freebsd-questions Thu Nov 30 14:34:15 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hades.ekholm.org (hades.ekholm.org [208.42.64.18]) by hub.freebsd.org (Postfix) with ESMTP id E304D37B400 for ; Thu, 30 Nov 2000 14:34:12 -0800 (PST) Received: from zeus.ekholm.org (zeus.ekholm.org [208.42.64.17]) by hades.ekholm.org (8.11.0/8.11.0) with ESMTP id eAUMYAW78962 for ; Thu, 30 Nov 2000 16:34:10 -0600 (CST) Received: (from ekholm@localhost) by zeus.ekholm.org (8.9.3/8.8.8) id QAA58708 for questions@freebsd.org; Thu, 30 Nov 2000 16:34:10 -0600 (CST) (envelope-from ekholm) Date: Thu, 30 Nov 2000 16:34:09 -0600 From: Mike Ekholm To: questions@freebsd.org Subject: Re: DNS problems Message-ID: <20001130163409.A58687@ekholm.org> References: <20001127224805.A35818@ekholm.org> <20001128063646.BB2BB3E08@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.11i In-Reply-To: <20001128063646.BB2BB3E08@bazooka.unixfreak.org>; from dima@unixfreak.org on Mon, Nov 27, 2000 at 10:36:46PM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Nov 27, 2000 at 10:36:46PM -0800, Dima Dorfman wrote: > Mike Ekholm wrote: > > > > hello, > > I am running in to some odd problems with name resolution. Here is what I am > > seeing: > > > > ekholm@zeus:/home/ekholm> w > > 10:42PM up 106 days, 23:24, 14 users, load averages: 0.75, 1.08, 0.94 > > USER TTY FROM LOGIN@ IDLE WHAT > > ekholm p0 bigone Sun09PM 33 -ksh (ksh) > > ekholm p1 bigone 20Nov00 - -ksh (ksh) > > > > > > > ekholm@zeus:/home/ekholm> last|more > > ekholm ttyp0 192.168.0.17 Sun Nov 26 21:46 still logged in > > ekholm ttyp1 192.168.0.17 Mon Nov 20 19:00 still logged in > > ekholm ttypc isis.XXXX.XXX Mon Nov 27 22:26 still logged in > > ekholm ttyp8 j1xsfw01.XXXX.XXX Mon Nov 27 08:05 still logged in > > > > > > The question is, why does w show the name I am from, but who and > > last do not. > > w(1) does a DNS lookup on all the hostnames it gets from the utmp > file. last(1) and who(1) don't. > > > This happens with almsot any host in my 192.168.0/24, but does NOT happen > > with IPs in other blocks (as shown in the last). > > When who(1) and last(1) show hostnames, it is because whatever program > wrote to the utmp/wtmp files recorded the DNS entry in ut_host rather > than a numeric address. As stated before, w(1) always does a DNS > lookup, so you always get a hostname from it if it can find it. > > As to why some of your connections get recorded with numeric address > and others with DNS names, perhaps you're using different methods to > log in? For example, IIRC, ftp records the DNS name in ut_host, while > telnetd records the numeric address. I am using ssh to connect in every case. My DNS has zone files for the 192.168.0/24 and I can resolve those both revurse and forward with the host command. Odd. -- UNIX Sys Admin | ekholm@ekholm.org | http://www.ekholm.org | IRC: Nalez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway" - Andrew S. Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message