Currently Being ModeratedAug 25, 2012 5:39 PM (in response to Linc Davis)
(in response to Linc Davis)
I would think it does, but very occasionally a request slips through and is resolved by DNS to an external webpage instead. Is there any way to check on the order (is there a modern equivalent to "lookupd -configuration" or something like it)? I know the order is supposed to be dynamic now...
I just had a thought -- a slow-responding server is pushed to the last position in the lookup order according to Apple (brief summary, in case someone reading hasn't yet seen it: http://support.apple.com/kb/HT4030). Maybe when the computer has a heavy load to process, and it takes longer than the 30 second timeout to read the hosts file, it goes on - by default - to the next-in-line resolution option. Does that seem plausible? As a side note, I do remember to flush the cache when I edit the hosts file.
Currently Being ModeratedAug 25, 2012 5:56 PM (in response to stleadershipboard)
The only way I know that the hosts file might be overriden is by the DirectoryServices database. If you get something from "dscl . list hosts" that conflicts with the hosts file, that would be it.
Currently Being ModeratedAug 25, 2012 8:36 PM (in response to Linc Davis)
I don't know what that's the output from, but it seems to have nothing to do with name resolution.
I should have been clearer: In a Terminal window, I opened dscl (in interactive mode) and entered "list . hosts" just like you said. BSD shows up before Local, which says to me that DNS will be searched before the hosts file (so I won't get the result I want that's given in the hosts file). Tell me if I'm incorrect there, though. Is there any way to read the cache results directly? That would really help, but I haven't found out how to do that yet or if it's possible. Thanks for your help so far!
Currently Being ModeratedAug 25, 2012 9:32 PM (in response to Linc Davis)
Okay, this is what I entered and what returned:
~$ dscl . list hosts
list: Invalid Path
<dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Do you know what it means? If it's too complicated/too long to explain, is there any way to read or at least get a result back from the cache?