You can use /etc/gai.conf to set up your IPV4/IPV6 precedence as documented here and here.
Say we have two hosts www.he.net and www.ripe.net
Append the following to /etc/gai.conf
If we append
Case 3: Prefer ipv4 for specific hosts
Wondering if we invert the mask the reverse will be true.
Say we have two hosts www.he.net and www.ripe.net
Case 1: Prefer IPV4$ host www.he.net www.he.net is an alias for he.net. he.net has address 216.218.186.2 he.net has IPv6 address 2001:470:0:76::2 $ host www.ripe.net www.ripe.net has address 193.0.6.139 www.ripe.net has IPv6 address 2001:67c:2e8:22::c100:68b
Append the following to /etc/gai.conf
then we have:precedence ::ffff:0:0/96 100
Case 1: Prefer IPV6 for specific hosts$ telnet www.ripe.net 80 Trying 193.0.6.139... ^C $ telnet www.he.net 80 Trying 216.218.186.2...
If we append
then we haveprecedence 2001:470::/32 100
So we seem to prefer that network for ipv6 and ipv4 everywhere else.$ telnet www.ripe.net 80 Trying 193.0.6.139... ^C $ telnet www.he.net 80 Trying 2001:470:0:76::2... ^C
Case 3: Prefer ipv4 for specific hosts
Wondering if we invert the mask the reverse will be true.
No comments:
Post a Comment