1

I have a Debian Stretch system with both IPv4 and IPv6 addresses and default gateway. IPv4 and IPv6 addresses in the internet are reachable. When I start a ping to a domain which has an A and AAAA DNS record the system pings the IPv4 address from the A record. In the packet capture of the DNS request I can see that both A and AAAA are requested and answered. When I remove the IPv4 address from the system obviously everything works as expected....

How is the prioritization, I thought IPv6 will be preferred. If not, is there a option to change it?

A google search has not really helped me out because everyone asks to disable IPv6 and not want to use it...

  • I can't reproduce this. When I try to ping on Debian stretch, it pings the IPv6 address. Please tell us every detail about your system. – Michael Hampton May 12 '19 at 20:09
0

By default resolver should prefer ipv6 addresses over ipv4. But there was a bug in the debian, that prefer ipv4 over ipv6 in some cases. Also this behaviour can be managed with /etc/gai.conf file (named from syscall getaddrinfo).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.