ipv6配置失败处理

如果ipv6通过ifconfig配置失败,且报错如图,说明网卡没有开启ipv6支持。

avatar

1.检查业务网卡是否开启ipv6

sysctl -a | grep disable_ipv6
结果如下:
[root@NiuLink64 network-scripts]# sysctl -a | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
net.ipv6.conf.default.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
net.ipv6.conf.docker0.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
net.ipv6.conf.eth0.disable_ipv6 = 1

2.发现有 “net.ipv6.conf.eth0.disable_ipv6 = 1”,说明eth0禁用ipv6 (其他业务网卡名同理),执行以下命令

# 注意这里的eth0要替换成实际的业务网卡名
echo "net.ipv6.conf.eth0.disable_ipv6 = 0" >> /etc/sysctl.conf
sysctl -p

3.然后使用 sysctl -a | grep disable_ipv6 检查是否修改成功。

results matching ""

    No results matching ""