<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 25, 2015 at 7:44 AM, Shane Kerr <span dir="ltr"><<a href="mailto:shane@time-travellers.org" target="_blank">shane@time-travellers.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fatemah,<br>
<br>
I'm not sure that this is the best list to ask this question. Possibly<br>
a Firefox development list would be a better place.<br>
<br>
Still, lets have a look at your questions...<br>
<br>
At 2015-11-25 02:06:41 -0800<br>
<span class="">Fatemah Alharbi <<a href="mailto:falha008@ucr.edu">falha008@ucr.edu</a>> wrote:<br>
<br>
> I am a PhD student at UC Riverside, CA, USA. I am conducting<br>
> experiments using Firefox to test Ipv6 connectivity and I would<br>
> appreciate your cooperation and help to answer the following<br>
> questions.<br>
><br>
> Experiment 1:<br>
> By default, Firefox has Ipv6 enabled. When I visit a particular<br>
> website, Firefox always sends 2 DNS queries: A query(For IPv4<br>
> address) and AAAA query (for IPv6 address). It always prefers the<br>
> IPv4 address, why?<br>
<br>
</span>Firefox wants to know the IP addresses of the web server you are<br>
connecting to. These can be either IPv4 or IPv6, so two separate<br>
queries are needed.<br>
<br>
As for why Firefox prefers IPv4... Firefox uses what we call "happy<br>
eyeballs":<br>
<br>
<a href="https://en.wikipedia.org/wiki/Happy_Eyeballs" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Happy_Eyeballs</a><br>
<br>
You can read their ticket about the details of the implementation here:<br>
<br>
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=684893" rel="noreferrer" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=684893</a><br>
<br>
Most likely in your case it is always preferring IPv4 because it is<br>
faster (or at least lower-latency).<br>
<span class=""><br>
> Experiment 2:<br>
> Please see the attached file: block_A_record_google.pcapng. I blocked<br>
> the IPv4 response packets (for the A queries) of the domain name<br>
> <a href="http://clients1.google.com" rel="noreferrer" target="_blank">clients1.google.com</a> to see how Firefox would behave if it gets only<br>
> the AAAA response. Even if Firefox gets a positive response for the<br>
> AAAA query, it ignores the response and keeps asking for the Ipv4<br>
> address! Why?<br>
><br>
> Does that have anything to do with my ISP Ipv6 connectivity? My ISP,<br>
> Charter, doesn’t support Ipv6 connectivity to residential customers<br>
> yet. If so, how Firefox does know that my ISP doesn’t support Ipv6<br>
> connectivity? How does Firefox know that the host triggering the DNS<br>
> requests is not within an Ipv6 network?<br>
><br>
> This is the result of the Ipv6 connectivity test on Firefox (Please<br>
> see the attached file: Test Your Ipv6 Connectivity-Firefox.pdf):<br>
<br>
</span>Since you don't have IPv6 connectivity, disabling IPv4 by blocking DNS<br>
lookup for A records just means that you can't connect to the Internet.<br>
It looks like the browser is continuing to try to connect to the web<br>
page by retrying the queries. I'm not sure what you think the browser<br>
should do?<br>
<br>
Cheers,<br>
<br>
--<br>
Shane<br>
<br></blockquote><div><br></div><div>Also note that 'blocking' the "A" queries is the wrong method - it will keep trying to get an answer.  A better method would be to answer the query as if there were no A records - "no error, empty answer section".  You would probably need to set up your own DNS resolver, limited to only answering for your client, and create a zone for the domain name that you want to spoof, without the A records.  (Or you could try to use RPZ.)<br><br>-- <br></div><div>Bob Harold<br><br></div></div><br></div></div>