Set in linux priority use ipv4, ipv6 instead

Background: Sometimes the update source when using the default ipv6, ipv6 and download data when problems arise always want all the default priority exports when export using ipv4 access, rather than ipv6..

To use the ipv4 connection priority without having to disable ipv6, gai.conf need to modify the configuration file to take effect.

debian system: modify /etc/gai.conf, uncomment the following line of

precedence ::ffff:0:0/96 100
redhat system: modification /etc/gai.conf, add the following

label       ::1/128        0
label       ::/0           1
label       2002::/16      2
label       ::/96          3
label       ::ffff:0:0/96  4
precedence  ::1/128        50
precedence  ::/0           40
precedence  2002::/16      30
precedence  ::/96          20
precedence  ::ffff:0:0/96  100

https://blog.i-so.org/category/linux

Guess you like

Origin www.cnblogs.com/lovesKey/p/11563171.html