Why?
We all have our reasons. And there are various ones.
Why do you give answers like this?
I was just googling around and found this thread from over two years ago... and it has no useful reply. Not one. None at all.
I'll give you a few reasons:
- IPv6 network infrastructure is more often incorrectly configured than IPv4 networks are.
- IPv6 is new, and IPv4 is proven and reliable.
- I want to be able to reach IPv6-only networks, but stick to IPv4 considerations for everything else.
- The network latency on IPv4 is lower for me.
- The network throughput on IPv4 is higher for me.
- The memory requirements for the IPv4 NAT table, stateful firewall and connection tracking are lower on IPv4, meaning I can have more open connections at once.
- I may have a static IPv4 address from my ISP with reverse DNS entry, but I can't get a static IPv6 assignment with the same, because they don't support it, and have no plans to support it.
- If I want to do NAT on IPv6, this is much more difficult to configure and test than the same setup on IPv4.
- IPv6 firewalls have known bugs that IPv4 implementations don't have, with no certainty about when vendors will issue, or even provide a patch at all.
I could go on...
So, here I am, with the same question, of how I can make IPv4 networking be the preferred connection type, for connections originating from applications and services that are running on the router in OpenWRT.
Specifically, what I want is that things like DNS resolvers, Stubby, dnsmasq, opkg, and the like, connect over IPv4 by default, even if DNS returns both A and AAAA records, without having to mess with these records.
The correct answer would be to provide the equivalent of /etc/gai.conf
or /etc/nsswitch.conf
for OpenWRT like you can find for other Linux distributions: https://serverfault.com/questions/93717/
Or to point out, that the OpenWRT implementation has bugs, and that it essentially doesn't work right, because applications like wget don't respect it: Howto make OpenWrt RFC6724 compliant? - #4 by tsunulukai (this may have changed since)
And if you represent the position, that doing something is bad, you can still explain how to do it, explain why you think it is bad, instead of just saying "don't do it", because that is not helpful.