How to prefer IPv4 over IPv6 for some hosts

2.86 avg. rating (60% score) - 7 votes

If an IPv6 address is unreachable, but you can reach the IPv4 one, you can set the preference to IPv4 for that particular address by adding a line such as this in /etc/gai.conf:

That will set the preference for host 198.145.11.105 to IPv4.

See gai.conf(5) for details.

 

Leave a Reply