[Original] How to bind IPV6 on windows and linux
Published: 2019-02-14
Script method:
windows system:
First refer to the manual method below to download and install the Microsoft patch, adjust the firewall settings, then downloadhttp://downinfo.myhostadmin.net/vps/setipv6.bat and directly open and run it.
linux system:
wget http://downinfo.myhostadmin.net/vps/setipv6.sh Usage: ./setipv6.sh -s[-b] ipv6 [ipv6] OPTIONS: -s | --single: Binding IPV6 -b | --batch: Batch Binding IPV6 -h | --help: Show Help Run as follows: Add an ipv6 address sh ./setipv6.sh -s 240e:d9:c200:101:7bb2::120 Batch add all ipv6 addresses, the first ip is the first ip displayed in our company's backend ipv6 list, and the latter ip is the last displayed ip sh ./setipv6.sh -b 240e:d9:c200:101:7bb2::120 240e:d9:c200:101:7bb2::130
ubuntu20 system (only supports batch binding):
wget http://downinfo.myhostadmin.net/vps/setipv6.sh Usage: ./setipv6.sh -s[-b] ipv6 [ipv6] OPTIONS: -s | --single: Binding IPV6 -b | --batch: Batch Binding IPV6 -u | --batchub: Batch ubuntu 20 Binding IPV6 -h | --help: Show Help Example: ./setipv6.sh -s 240e:d9:c200:101:7bb2::120 Example: ./setipv6.sh -b 240e:d9:c200:101:7bb2::120 240e:d9:c200:101:7bb2::130 Example: ./setipv6.sh -u 240e:d9:c200:101:7bb2::120 240e:d9:c200:101:7bb2::130 Run as follows: Batch add all ipv6 addresses, the first ip is the first ip displayed in our company's backend ipv6 list, and the latter ip is the last displayed ip bash ./setipv6.sh -u 240e:d9:c200:101:7bb2::120 240e:d9:c200:101:7bb2::130
Note: When executing in Ubuntu, please use bash instead of sh
Manual processing method
1. windows
1. Enable IPV6; only supports win7 and above systems (win7, win2008, win2012, win2016 are supported) (win2003 is not supported)

You must check "Internet Protocol Version 6 (TCP/IPv6)"
2. Download the corresponding patch:
Our company's cloud servers can directly download from:
http://download.west263.net/ebs/MicrosoftEasyFix20174.mini.diagcab
After downloading, run it directly, click Next; after completion it will prompt you to restart the system; a restart is required before IPV6 can be used normally.
Microsoft official instructions and patch
3. Firewall configuration (can be set after restart; if the system firewall is not enabled, you can skip this step)
In the Inbound Rules item, enable all items in the red boxes in the following figure (enable all Core Networking items/File and Printer Sharing (Echo Request - ICMPv6-In))


4. Configure IPV6 and test connectivity.
IPV6 address, gateway, and dns can be viewed by logging into the Management Center > Business Management > Server Management.The subnet prefix length is: 64

2. Linux
Take centos7 as an example
IP configuration:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=211.149.xxx.xxx
NETMASK=255.255.255.0
TYPE=Ethernet
NM_CONTROLLED=no
ONBOOT=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6ADDR=240E:D9:C200:xx:xx::A0/64
IPV6_DEFAULTGW=240e:d9:c200:xx::1
Note: The above is for a single IPv6. If you want to bind multiple ipv6 addresses, add the following line, and replace the ip in it with your own server's ipv6 address. It is recommended to use the script method at the beginning of this article to add them.
IPV6ADDR_SECONDARIES="2604:4300:a:8f:100:10::1/64 \ 2604:4300:a:8f:100:20::1/64 \ 2604:4300:a:8f:100:30::1/64"
DNS:
/etc/resolv.conf
nameserver 223.5.5.5
nameserver 114.114.114.114
nameserver 240e:56:4000:8000::69
nameserver 240C::6666
Restart the network adapter
service network restart
3. After successful configuration, how to test whether IPV6 is reachable.
1.Use the command: ping -6 IPV6 address.
Note: To test whether pinging IPV6 works normally, both the server and the client must support and correctly configure an IPV6 address.

2. Use the ping provided by a third-party website, for example: https://noc.ah.edu.cn/lg/

