localhost and how it gets Lost

Peter Dambier peter at peter-dambier.de
Mon Oct 17 18:07:01 UTC 2005


Martin McCormick wrote:
> 	If one does  dig at localhost  on a certain system using
> bind9.3.1, you get
> 
> 
> 
> ; <<>> DiG 9.3.1 <<>> @localhost localhost
> ; (1 server found)
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43293
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
> 
> ;; QUESTION SECTION:
> ;localhost.			IN	A
> 
> ;; ANSWER SECTION:
> localhost.		608400	IN	A	127.0.0.1
> 
> 	It's there.  it is written as 
> 
> localhost.		608400	IN	A	127.0.0.1
> 
> 	If I use the host command, however, to lookup localhost I get
> a "host not found" error.  The system in question also has a nickname
> of localhost defined in /etc/hosts, but /etc/hosts stops being read
> after bootup.
> 
> 	Shouldn't localhost always return 127.0.0.1?
> 
> A reverse lookup of host 127.0.0.1 does return the absolute domain of
> localhost. so that part is working right.
> 
> 	The system I am working on uses FreeBSD UNIX.  
> Thank you.
> 
> Martin McCormick WB5AGZ  Stillwater, OK 
> OSU Information Technology Division Network Operations Group
> 
> 

Hi Martin,

here is what I have on my DNS-server:

; <<>> DiG 9.1.3 <<>> localhost axfr
;; global options:  printcmd
localhost.              86400   IN      SOA     localhost. root.localhost. 42 10800 900 604800 86400
localhost.              86400   IN      NS      echnaton.n.
localhost.              86400   IN      NS      echnaton.styx.
localhost.              86400   IN      NS      echnaton.lomiheim.
localhost.              86400   IN      NS      echnaton.niflheim.
localhost.              86400   IN      NS      echnaton.serveftp.com.
localhost.              86400   IN      A       127.0.0.1
localhost.              86400   IN      SOA     localhost. root.localhost. 42 10800 900 604800 86400
;; Query time: 307 msec
;; SERVER: 192.168.48.228#53(192.168.48.228)
;; WHEN: Mon Oct 17 19:58:12 2005
;; XFR size: 9 records

It is important that you give at least one NS records. I have not
read it in the book. Joe Baptista has shown it to me.

If only localhost claims to know localhost and if localhost is
not your DNS-servers then it bites :)

Kind regards,
Peter (DL2FBA) and Karin

-- 
Peter and Karin Dambier
Public-Root
Graeffstrasse 14
D-64646 Heppenheim
+49-6252-671788 (Telekom)
+49-179-108-3978 (O2 Genion)
+49-6252-750308 (VoIP: sipgate.de)
mail: peter at peter-dambier.de
mail: peter at echnaton.serveftp.com
http://iason.site.voila.fr
http://www.kokoom.com/iason



More information about the bind-users mailing list