Date: Wed, 28 May 2003 19:24:06 +0200 From: Roberto Nunnari <nunnari@die.supsi.ch> To: fred@storming.org Cc: freebsd-current <freebsd-current@freebsd.org> Subject: Re: /etc/hosts completely ignored Message-ID: <3ED4F0B6.6070409@die.supsi.ch> References: <3ED4E9CA.8000309@die.supsi.ch> <20030528170804.GA1112@torment.storming.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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========================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ED4F0B6.6070409>