JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for IPV6-USERS Archives


IPV6-USERS Archives

IPV6-USERS Archives


IPV6-USERS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

IPV6-USERS Home

IPV6-USERS Home

IPV6-USERS  June 2011

IPV6-USERS June 2011

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: MacOS X caching (was Re: Some local IPv6 Day Stats)

From:

Phil Mayers <[log in to unmask]>

Reply-To:

Phil Mayers <[log in to unmask]>

Date:

Thu, 9 Jun 2011 12:00:23 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (80 lines)

On 09/06/11 11:17, Tim Chown wrote:

> It's as if OS X will just ignore AAAA responses if they don't come
> back quickly enough, and thus you 'lock' into IPv4 if the A response
> arrives quickly.  I need to rig up some tests, but if anyone has
> looked in detail at that already and has the info, it would be
> appreciated.

Interesting. The following (lengthy) story might shed some light on the 
reasoning behind the MacOS X behaviour.

We had some problems a while back with Linux machines querying our DNS 
server. Glibc on Linux (quite legally) creates a new UDP socket for the 
A/AAAA requests, then deletes it - only ever sending two packets.

The packets of course come from the same source port, and are emitted in 
such quick succession (microseconds) that the load balancers in front of 
(one of - the other is anycasted) our DNS IPs had problems. The session 
was still being built as the 2nd (AAAA) packet arrived, leading to it 
being dropped and a lengthy DNS timeout.

The problem was exacerbated by glibc not "remembering" this failure as 
it was supposed to, giving the timeout on every DNS query. During login, 
the timeouts exceeded 60 seconds - and the login itself timed out.

It turns out a lot of people were having that problem, as many devices 
have such "racy" conditions for 2-packet UDP flows with a microsecond 
gap. The glibc maintainer was quite definite that this was the device 
vendors responsibility to fix:

https://bugzilla.redhat.com/show_bug.cgi?id=505105#c21

...although personally I doubt the practicality; most ADSL CPEs are 
abandonware as soon as they hit the shelves. I suspect it's only because 
the bug above led to a "remember broken" flag that it's not still 
causing problems.


I wonder if Apple had found the same thing in their testing and added 
some kind of fast timeout feature? If it were me, I would be tempted to 
do this:

create socket
send A
send AAAA
select(socket, timeout=1 second)
read 1st reply, or fail
select(socket, timeout=0.01 second)
read 2nd reply, or fail

i.e. wait much less time for the 2nd reply. Since the "A" query is sent 
1st, it'll usually be the 1st reply.

(Actually, if it were me I'd be tempted to run a full caching resolver 
locally and stop trying to re-implement stuff that's hard inside a 
50-line C function, but there we go.... ;o)

Presumably there is then some kind of caching of the output of the query 
(e.g. nscd-alike) that means a reply failure never gets retried. There 
are some genuinely awful stub resolvers out there!

I did notice yesterday frequent behaviour like this:

$ host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 209.85.146.106
www.l.google.com has address 209.85.146.147
www.l.google.com has address 209.85.146.99
www.l.google.com has address 209.85.146.103
www.l.google.com has address 209.85.146.104
www.l.google.com has address 209.85.146.105
<0.25-0.75 second pause>
www.l.google.com has IPv6 address 2a00:1450:400c:c00::93

...so something was happening to make the AAAA query take a lot longer. 
"host" on my system seems to use a single socket to make the DNS queries 
in sequence, so similar to Linux/glibc. At that point, my home DNS 
lookups were going to Hurricane Electric's IPv6 DNS server, with no NAT 
in play, so I'm not sure where the slowness was coming from.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
February 2024
December 2023
October 2023
September 2023
June 2023
May 2023
March 2023
January 2023
December 2022
November 2022
June 2022
May 2022
December 2021
April 2021
March 2021
February 2021
December 2020
October 2020
October 2019
August 2019
March 2019
November 2018
August 2018
July 2018
March 2018
February 2018
November 2017
August 2017
June 2017
May 2017
April 2017
January 2017
November 2016
October 2016
September 2016
June 2016
May 2016
January 2016
December 2015
November 2015
October 2015
September 2015
July 2015
October 2014
November 2013
October 2013
August 2013
June 2013
March 2013
February 2013
September 2012
August 2012
July 2012
June 2012
April 2012
February 2012
December 2011
November 2011
October 2011
September 2011
August 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
February 2010
January 2010
December 2009
November 2009
February 2009
December 2008
November 2008
July 2008
June 2008
May 2008
January 2008
December 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
March 2007
2006
2005
2004
2003
2002
2000


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager