关闭CentOS的IPv6(咋个办呢 zgbn)
2021/12/31 7:11:12
本文主要是介绍关闭CentOS的IPv6(咋个办呢 zgbn),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
使用ifconfig命令查看网卡信息,如果出现inet6 fe80::20c:29ff:fed0:3514,说明机器开启了ipv6
[root@MiWiFi-R3A-srv ~]# ifconfig enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.31.201 netmask 255.255.255.0 broadcast 192.168.31.255 inet6 fe80::3ef8:d2:8709:a5ce prefixlen 64 scopeid 0x20<link> ether 14:14:4b:e4:88:08 txqueuelen 1000 (Ethernet) RX packets 3105 bytes 375203 (366.4 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1651 bytes 269376 (263.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
编辑/etc/sysconfig/network配置,增加 NETWORKING_IPV6=no,保存并退出
[root@domain]$ vim /etc/sysctl.conf # sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # # Vendors settings live in /usr/lib/sysctl.d/. # To override a whole file, create a new file with the same in # /etc/sysctl.d/ and put new settings there. To override # only specific settings, add a file with a lexically later # name in /etc/sysctl.d/ and put new settings there. # # For more information, see sysctl.conf(5) and sysctl.d(5). # net.ipv6.conf.all.disable_ipv6=1
编辑/etc/sysconfig/network配置,增加 NETWORKING_IPV6=no,保存并退出
这篇关于关闭CentOS的IPv6(咋个办呢 zgbn)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-10-04el-table 开启定时器下,表格的选中状态会消失是什么原因-icode9专业技术文章分享
- 2024-10-03如何安装和初始化飞牛私有云 fnOS?-icode9专业技术文章分享
- 2024-10-03如何安装 App 并连接到飞牛 NAS?-icode9专业技术文章分享
- 2024-10-03如何安装飞牛 TV 并连接到影视服务器?-icode9专业技术文章分享
- 2024-10-03如何在PVE和ESXI上安装飞牛私有云 fnOS?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS安装系统异常情况处理-icode9专业技术文章分享
- 2024-10-03飞牛NAS如何创建存储空间?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS硬盘会自动休眠吗?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS如何安装飞牛影视和创建媒体库?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS如何为家人朋友开通影视账号?-icode9专业技术文章分享