localhost and how it gets Lost

Martin McCormick martin at dc.cis.okstate.edu
Mon Oct 17 16:30:02 UTC 2005


	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



More information about the bind-users mailing list