posts - 359,comments - 0,views - 19万

开启ipv6

1、使用ifconfig查看

如果输出结果没包含 “inet6”,则没有 ipv6支持,如果支持ipv6,则输出结果会包含 “inet6”。

2、sysctl -a | grep ipv6 | grep disable

      如图出现很多ipv6 = 0,则是开启

二:开启ipv6

配置sysctl.conf 文件,所在路径:/etc/sysctl.conf

/etc/sysctl.conf里增加
net.ipv6.conf.all.disable_ipv6=0
net.ipv6.conf.default.disable_ipv6=0
net.ipv6.conf.lo.disable_ipv6=0
 # 立即生效
sysctl -p

/etc/sysconfig/network里增加

NETWORKING_IPV6=yes

/etc/sysconfig/network-scripts/ifcfg-eth0   

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6ADDR=2001:250:250:250:250:250:255:222/64
IPV6_DEFAULTGW=2001:250:250:250::1           #内网内可以随意写

重启网络:
systemctl restart network
或者
service network restart

posted on   属于我的梦,明明还在  阅读(932)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示