From owner-freebsd-current@FreeBSD.ORG Wed May 28 10:24:33 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 367E937B401 for ; Wed, 28 May 2003 10:24:33 -0700 (PDT) Received: from mail.die.supsi.ch (mail.die.supsi.ch [193.5.153.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B8EA43F93 for ; Wed, 28 May 2003 10:24:31 -0700 (PDT) (envelope-from nunnari@die.supsi.ch) Received: from die.supsi.ch (pcm2022.die.supsi.ch [193.5.152.22]) by mail.die.supsi.ch (8.11.6/8.11.6) with ESMTP id h4SHO7U28989; Wed, 28 May 2003 19:24:07 +0200 Message-ID: <3ED4F0B6.6070409@die.supsi.ch> Date: Wed, 28 May 2003 19:24:06 +0200 From: Roberto Nunnari User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fred@storming.org References: <3ED4E9CA.8000309@die.supsi.ch> <20030528170804.GA1112@torment.storming.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current Subject: Re: /etc/hosts completely ignored X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 17:24:33 -0000 Dear Fred, if I call -bash-2.05b# host localhost. localhost has address 127.0.0.1 but that's only because the dns specified in resolv.conf answers the query with its own 'localhost' entry. Look: -bash-2.05b# host -d -t A localhost. ;; res_nmkquery(QUERY, localhost, IN, A) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64429 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost, type = A, class = IN ;; Querying server (# 1) address = 195.190.166.166 ;; new DG socket ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64429 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost, type = A, class = IN localhost. 1D IN A 127.0.0.1 rcode = 0 (Success), ancount=1 localhost has address 127.0.0.1 its a remote dns that answers the query.. but naturally it doesn't know about localhost in a not existant domain as localhost.noonlights.net that I use for my private network -bash-2.05b# host -d -t A localhost.noonlights.net. ;; res_nmkquery(QUERY, localhost.noonlights.net, IN, A) ;; res_send() ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20386 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; localhost.noonlights.net, type = A, class = IN ;; Querying server (# 1) address = 195.190.166.166 ;; new DG socket ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 20386 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; localhost.noonlights.net, type = A, class = IN net. 2D IN SOA a.gtld-servers.net. nstld.verisign-grs.com. ( 2003052800 ; serial 30M ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum rcode = 3 (Non-existent domain), ancount=0 Host not found. Best regards. -- Roberto Nunnari -software engineer- mailto:nunnari@die.supsi.ch Scuola Universitaria Professionale della Svizzera Italiana Dipartimento di Informatica e Elettronica http://www.die.supsi.ch SUPSI-DIE Via Cantonale tel: +41-91-6108561 6928 Manno """ fax: +41-91-6108570 Switzerland (o o) =======================oOO==(_)==OOo========================