::版本判断 原创
::Copyright (c) Microsoft Corporation. All rights reserved. :: by https://twitter.com/nankezhou
:: by https://gotovpn.blogspot.com
if /I "%osver%"=="1" (
netsh int ipv6 set prefixpolicy ::1/128 50 0
echo. ::1/128是本地网关localhost的解析地址,通常获得默认常规“0”优先。
netsh int ipv6 set prefixpolicy ::/0 40 1
echo. ::/0是本地localhost默认的IPV6解析地址,通常获得第40 1 级优先。
netsh int ipv6 set prefixpolicy 2002::/16 30 1
echo. 2002::/16是IPv6到IPV4的接口,通常获得30 1类优先。
netsh int ipv6 set prefixpolicy ::/96 20 3
echo. ::/96 是IPv4的兼容性接口,通常获得20 3级优先。
netsh int ipv6 set prefixpolicy ::ffff:0:0/96 10 4
echo. ::ffff:0:0/96 是IPv4的兼容性接口长地址,通常获得10 4级优先。
netsh int ipv6 set prefixpolicy 2001::/32 5 1
echo. 2001::/32 是IPv6的teredo隧道解析,通常获得5 1级优先。这里我们把它设置为第1位(1)级优先。
) else (
netsh int ipv6 add prefixpolicy 2001::/32 15 1 persistent
netsh int ipv6 add prefixpolicy ::ffff:0:0/96 20 2
netsh int ipv6 add prefixpolicy ::/96 25 3
netsh int ipv6 add prefixpolicy 2002::/16 30 1
netsh int ipv6 add prefixpolicy ::/0 35 5
netsh int ipv6 add prefixpolicy ::1/128 40 6
netsh int ipv6 add prefixpolicy 2001::/16 45 7
netsh int ipv6 add prefixpolicy 3ffe::/16 50 8
netsh int ipv6 add prefixpolicy fec0::/10 55 9
netsh int ipv6 add prefixpolicy fc00::/7 60 10
)
netsh int ipv6 add prefixpolicy 2001::/32 15 1 persistent
netsh int ipv6 add prefixpolicy ::ffff:0:0/96 20 2
netsh int ipv6 add prefixpolicy ::/96 25 3
netsh int ipv6 add prefixpolicy 2002::/16 30 1
netsh int ipv6 add prefixpolicy ::/0 35 5
netsh int ipv6 add prefixpolicy ::1/128 40 6
netsh int ipv6 add prefixpolicy 2001::/16 45 7
netsh int ipv6 add prefixpolicy 3ffe::/16 50 8
netsh int ipv6 add prefixpolicy fec0::/10 55 9
netsh int ipv6 add prefixpolicy fc00::/7 60 10
沒有留言:
張貼留言