进入配置目录
cd /etc/sysconfig/network-scripts
编辑网卡配置文件
vi ./ifcfg-ens192
修改下面的配置 主ip为 xxxx:xxxx:xxxx::2 前缀 48 网关为 xxxx:xxxx:xxxx::1
添加 3-20,配置如下
IPV6_PRIVACY="no"
IPV6ADDR="xxxx:xxxx:xxxx::2/48"
IPV6ADDR_SECONDARIES="xxxx:xxxx:xxxx::3/48 xxxx:xxxx:xxxx::4/48 xxxx:xxxx:xxxx::5/48 xxxx:xxxx:xxxx::6/48 xxxx:xxxx:xxxx::7/48 xxxx:xxxx:xxxx::8/48 xxxx:xxxx:xxxx::9/48 xxxx:xxxx:xxxx::10/48 xxxx:xxxx:xxxx::11/48 xxxx:xxxx:xxxx::12/48 xxxx:xxxx:xxxx::13/48 xxxx:xxxx:xxxx::14/48 xxxx:xxxx:xxxx::15/48 xxxx:xxxx:xxxx::16/48 xxxx:xxxx:xxxx::17/48 xxxx:xxxx:xxxx::18/48 xxxx:xxxx:xxxx::19/48 xxxx:xxxx:xxxx::20/48 xxxx:xxxx:xxxx::21/48"
IPV6_DEFAULTGW="xxxx:xxxx:xxxx::1"
DNS3="2001:4680:4680::8888"
DNS4="2001:4680:4680::8844"
重启网络 使IPv6生效
service network restart
收工