Step1:启用IPV6网络配置
[root@node-1 ~]# vi /etc/sysconfig/network
NETWORKING_IPV6=yes //全局启用ipv6初始化
IPV6_AUTOCONF=no //不自动获取ipv6地址
Step2:配置IPV6地址/网关
[root@node-1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO="none"
NAME="eth0"
DEVICE="eth0"
IPV6INIT="yes" //开启IPV6初始化
IPV6ADDR="2001:250:4000:2000::53" //配置IPV6接口地址
IPV6_DEFAULTGW="2001:250:4000:2000::1" //配置IPV6网关
Step3:重启网卡配置
[root@node-1 ~]# systemctl restart network.service
Step4:ping测试
[root@node-1 ~]# ping6 -I eth0 2001:250:4000:2000::53
PING 2001:250:4000:2000::53(2001:250:4000:2000::53) from 2001:250:4000:2000::53 eth0: 56 data bytes
64 bytes from 2001:250:4000:2000::53: icmp_seq=1 ttl=64 time=0.054 ms
64 bytes from 2001:250:4000:2000::53: icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from 2001:250:4000:2000::53: icmp_seq=3 ttl=64 time=0.074 ms