P
P
pavelsupr2016-05-10 13:10:43
Domain Name System
pavelsupr, 2016-05-10 13:10:43

How to do proper IPv6 resolution order in Debian?

Good afternoon!
I have Debian 8-amd64 in a default installation, it has IPv6 configured. IPv6 address - site-local of the form fd00::1/64 with NAT in global unique (this is done on purpose).
Everywhere they write that in Debian with configured IPv6, when issuing the results of a resolve (any call to getaddrinfo), Ipv6 addresses are given first in the list, then ipv4.
The problem is that if you use the site-local address on the interface, then IPv4 results are returned first, and only then IPv6. If you immediately write the "external" global unique address on the Debian interface, then the issuance goes in the correct order - IPv6, then IPv4.

How can this be fixed? Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pavelsupr, 2016-05-10
@pavelsupr

Thanks, but that's not the point.
The default gai.conf just says that IPv6 always takes precedence (which is what I need), regardless of the type of address on the interface. And in my system, it turns out that the priority depends on whether the global unique address is on the IPv6 interface or not.
----
Dug source code, this behavior is wired at the system call level, it is unrealistic to fix it with a config.

Y
Yuri, 2016-05-10
@modestguy

askubuntu.com/questions/32298/prefer-a-ipv4-dns-lo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question