Re: DNS resolution for apps vs Terminal?
Re: DNS resolution for apps vs Terminal?
- Subject: Re: DNS resolution for apps vs Terminal?
- From: Rick Mann <email@hidden>
- Date: Tue, 14 Jun 2016 12:47:38 -0700
Thanks for the answers. Sigh.
A little more investigation showed that it had something to do with my router's DNS cache. Normally, it serves up itself as the DNS server for DHCP clients. When I reconfigured it to serve up Google's DNS servers instead, all apps started working normally.
This was also reflected on my iPhone. At the time of the problem, images weren't loading in the Facebook app (it's unclear if the rest of the content I could see was just cached or successfully loaded at that time). Changing the DNS servers used immediately fixed that problem.
I'm not sure what the differences between c-ares/dig and mDNSResponder are, in that one was able to look things up when using the router's DNS, and the other not.
> On Jun 14, 2016, at 08:41 , Alastair Houghton <email@hidden> wrote:
>
> On 14 Jun 2016, at 15:13, Michael Nickerson <email@hidden> wrote:
>>
>>> On Jun 14, 2016, at 5:11 AM, Rick Mann <email@hidden> wrote:
>>>
>>> Just now Safari stopped being able to load facbook.com. So did Chrome. Both reported DNS failures.
>>>
>>> But dig on the command line, and curl, both succeed.
>>>
>>> How are these two domains different?
>>
>> Safari and other apps are using the frameworks to resolve DNS (which, I believe, is ultimately done via mDNSResponder, but I could be wrong on that one),
>
> You’re correct. It does use mDNSResponder (you can actually see the code on Apple’s Open Source site).
>
>> while command line programs are using lower level calls that query the DNS server directly.
>
> dig does its own DNS protocol over ordinary sockets. curl uses c-ares, an open source DNS library.
>
> Kind regards,
>
> Alastair.
>
> --
> http://alastairs-place.net
>
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden