I've learnt a few things, but still not got to the bottom of it. This article on afp548 site:
http://www.afp548.com/article.php?story=20100329090657793 has some useful info.
In particular, that SL does all name resolving through mDNSResponder. If I enable logging, via:
<pre>Matts-Mac-Pro:~ matt.connolly$ sudo killall -INFO mDNSResponder
</pre>
I can see that mDNSresponder is definitely looking for "localhost" in the domain "home".
I've also just checked on a mac at work:
* ping localhost works (resolves to 127.0.0.1)
* ping localhost prints nothing in the mdnsresponder log.
And here's the `dig localhost` results from the working mac:
$ dig localhost
; <<>> DiG 9.6.0-APPLE-P2 <<>> localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40691
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 600 IN A 127.0.0.1
;; Query time: 198 msec
;; SERVER: 10.3.4.10#53(10.3.4.10)
;; WHEN: Fri Oct 15 09:00:03 2010
;; MSG SIZE rcvd: 43
</tt>
Both the work mac and my laptop have exactly the same /etc/hosts file (md5 matches).
So I'm deducing from this that the correctly working machine reads "localhost" from /etc/hosts and my laptop does not. Why? Where would this setting be?
Message was edited by: Matthew Connolly3 -added dig results