# >8 year old problem: ipv6 ipv4 slow dns resolution

## Khumarahn

Hi.

I wonder if there is a proper solution to an old issue: resolution of addresses in browser is very slow if ipv6 is enabled, when connected to ipv4 network.

Setup: laptop that has to be able to connect to both ipv4 and ipv6 networks. Besides, it uses systemd, so ipv6 is a must. User shouldn't have to change settings when reconnecting to another network.

What do experts know about this?

----------

## anb.clarke

I'd set ipv4 as my prefered choice then go to ipv6 otherwise...

http://www.funtoo.org/wiki/IPv6_Networking#Prefer_IPv4_over_IPv6

----------------------------------------

Linux will prefer IPv6 if IPv6 support is enabled in the kernel. To prefer IPv4, edit /etc/gai.conf and add this line:

precedence ::ffff:0:0/96 100

----------------------------------------

over to the experts...

----------

## Khumarahn

```
precedence ::ffff:0:0/96 100
```

This didn't change anything for firefox.... 

Am I doing something wrong? Any other options?

----------

## anb.clarke

You have rebooted, right ?

What is your network setup? (post /etc/conf.d/net)

=====

Firefox

=====

about:config

network.dns.disableIPv6;false ==> network.dns.disableIPv6;trueLast edited by anb.clarke on Sun Jul 01, 2012 12:52 am; edited 1 time in total

----------

## Khumarahn

yes, I rebooted.

 *anb.clarke wrote:*   

> 
> 
> network.dns.disableIPv6;false ==> network.dns.disableIPv6;true

 

this definitely works for firefox in ipv4 networks, but what if I connect to ipv6? Will I have to change it back? What about the other browsers?

----------

