From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2d063f21d4f0ec08cdcc718bdb6e9826@caldo.demon.co.uk> To: 9fans@cse.psu.edu Subject: Re: [9fans] ndb/csquery: what is dns is not up? From: Charles Forsyth In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-octyagjktsjyrgekgwjxnctgrr" Date: Wed, 23 Apr 2003 09:09:33 +0100 Topicbox-Message-UUID: 966bfeda-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-octyagjktsjyrgekgwjxnctgrr Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit ndb/query and ndb/ipquery look directly in the ndb files. ndb/query does simple direct queries based on the given attribute and value, ndb/ipquery searches more extensively up through the subnet hierarchy. they are both good tools to check basic functioning of an ndb file. if they don't produce sensible results, it's unlikely cs will. ndb/query and (probably) ndb/ipquery do not talk to ndb/cs or ndb/dns at all. ndb/csquery simply opens /net/cs and speaks its protocol, which expects strings of the form net!host!service and replies with translations of them: term% ndb/csquery > net!plan9.bell-labs.com!9fs /net/il/clone 204.178.31.2!17008!fasttimeout /net/tcp/clone 204.178.31.2!564 /net/il/clone 204.178.31.2!17008 cs relies on dns to translate domain names to ip addresses. it does not expect a plain name such as `p9'. it translates dial(2) addresses. there's a special case that's also useful in checking whether your host, subnet and net defaults for services are reasonable. net!$attr!service looks for the given attribute `attr' through the subnet hierarchy starting at the host and working up. thus the dial(2) string `net!$fs!9fs' dials the (default) file server configured for the current node, and the translation can be checked by: term% ndb/csquery > net!$fs!9fs /net/il/clone 144.32.112.69!17008!fasttimeout /net/tcp/clone 144.32.112.69!564 /net/il/clone 144.32.112.69!17008 i don't know without a lot of grepping how much the $attr is used now but it is used to find an authentication server in the absence of an authdom (see /sys/src/libauthsrv/authdial.c). it doesn't really matter because the point here is that $xyz can be used to check that cs gives a sensible value for xyz for the current node. ndb/dnsquery opens /net/dns and uses its protocol: ndb/dnsquery > bell-labs.com ns bell-labs.com ns ns.research.att.com bell-labs.com ns yeats.pa.bell-labs.com bell-labs.com ns crufty.research.bell-labs.com bell-labs.com ns ns1.research.bell-labs.com bell-labs.com ns dirty.research.bell-labs.com bell-labs.com ns ns2.research.bell-labs.com > plan9.bell-labs.com plan9.bell-labs.com ip 204.178.31.2 --upas-octyagjktsjyrgekgwjxnctgrr Content-Type: message/rfc822 Content-Disposition: inline Return-Path: <9fans-admin@cse.psu.edu> Received: from punt-2.mail.demon.net by mailstore for forsyth@caldo.demon.co.uk id 1051072820:20:11664:0; Wed, 23 Apr 2003 04:40:20 GMT Received: from psuvax1.cse.psu.edu ([130.203.4.6]) by punt-2.mail.demon.net id aa2010392; 23 Apr 2003 4:39 GMT Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8AC6119A70; Wed, 23 Apr 2003 00:39:11 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 018FE19A40 for <9fans@cse.psu.edu>; Wed, 23 Apr 2003 00:38:22 -0400 (EDT) Received: from ccs-mail.lanl.gov (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (8.12.9/8.12.9/(ccn-5)) with ESMTP id h3N4cMZ3032599 for <9fans@cse.psu.edu>; Tue, 22 Apr 2003 22:38:22 -0600 Received: from maxroach.lanl.gov (maxroach.lanl.gov [128.165.250.187]) by ccs-mail.lanl.gov (8.12.9/8.12.9/(ccn-5)) with ESMTP id h3N4cMo5029758 for <9fans@cse.psu.edu>; Tue, 22 Apr 2003 22:38:22 -0600 From: ron minnich To: 9fans@cse.psu.edu Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] ndb/csquery: what is dns is not up? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Tue, 22 Apr 2003 22:37:19 -0600 (MDT) I have the vmware auth server up. There is no ndb/dns running, since my !$!@$!@$!@ DSL is down, so no DNS anyway. As I read the man pages, if there is no dns running, ndb/csquery should act pretty much like ndb/query, since it falls back to /lib/ndb (or so I thought) I do: ndb/query sys p9 and would expect it to act like: ndb/csquery > p9 Is this true or not? they don't act the same at all, so I'm guessing this is another mis-read on my part. Does ndb/cs actually just layer over top of ndb/dns, and without ndb/dns ndb/cs is hosed? thanks ron --upas-octyagjktsjyrgekgwjxnctgrr--