Monday, November 29, 2004 |
23:09 - Second time's the charm
http://www.codepoetry.net/archives/2004/11/03/doubledip_dns.php
|
(top) |
Having problems with your Mac giving you "Host not found" errors every time you try to open a new site in Safari—only to be able to reload the page and have it go through just fine? Why, so was I, until this evening! That's when I found this site, with an explanation for why it's happening, and a solution that may work.
There is a long standing bug in BSD, or i should say, so I am told, that of course is also in OS X, that causes problems with name resolution under IPv6.
OS X also seems to have a hard time turning off IPv6, I did some googling on it and found reference in some of Apple's open source mail lists where people were complaining that even though they disable it, that the resolver still sends back a IPv6 address.
. . .
In my specific case of being behind an ABS this worked for me: I went into /etc/hostconfig and changed IPV6 to -NO- and rebooted. Delay-free browsing to new domains for me. Huzzah. (Screw that recompiling stuff in the linked page; who uses IPv6 anyway? :) )
It's done the trick for me thus far. Excellent!
UPDATE: Further investigation by myself and Chris suggests that this is probably actually two or maybe three different problems layered on top of each other. First there's the BSD DNS issue, where IPv6 name lookups don't work right, or take too long, or are issued when they're not supposed to. And then there's the Mac OS X DNS framework, which has a daft 2-second timeout that overrides the natural (longer) timeout in the BSD resolver. On top of that, or perhaps related, is that simply turning off IPv6 in the Network Preferences doesn't actually affect the IPv6=-YES- setting in /etc/hostconfig, and doesn't seem to get noticed by whatever in BSD is asking for IPv6 name resolution either.
So the solution of editing /etc/hostconfig and disabling IPv6 there will work, but (possibly) only because it reduces the wait time on the lookups to less than the 2-second timeout imposed by OS X. Or possibly it suppresses the BSD IPv6 lookup altogether; I don't know. Either way, this is just a patchy workaround, one that might fail under certain circumstances, and they'd better be addressing it formally.
|
|