IPV6这个协议暂时我们还用不到。而且开启该协议有时对系统运行有一定的影响,一些网卡还会因为IPv6出现系统未响应,假死等情况,本篇文章重点为大家讲解一下Linux系统中禁用IPV6具体方法。
站在用户的角度思考问题,与客户深入沟通,找到盐湖网站设计与盐湖网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计、成都网站设计、企业官网、英文网站、手机端网站、网站推广、申请域名、雅安服务器托管、企业邮箱。业务覆盖盐湖地区。
更改/etc/sysctl.conf配置文件
[root@Jaking vsftpd]# 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
net.ipv6.conf.default.disable_ipv6 = 1
[root@Jaking vsftpd]# ifconfig
# IPV6 字段 inet6 fe80::250:56ff:fe22:db62
ens33: flags=4163 mtu 1500
inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::250:56ff:fe22:db62 prefixlen 64 scopeid 0x20
ether 00:50:56:22:db:62 txqueuelen 1000 (Ethernet)
RX packets 11717 bytes 4355183 (4.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6943 bytes 2011730 (1.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 112 bytes 9492 (9.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 112 bytes 9492 (9.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@Jaking vsftpd]# sysctl -p #让配置文件立即生效
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
[root@Jaking vsftpd]# ifconfig
# IPV6 字段已经消失
ens33: flags=4163 mtu 1500
inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255
ether 00:50:56:22:db:62 txqueuelen 1000 (Ethernet)
RX packets 11747 bytes 4357703 (4.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6961 bytes 2014592 (1.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1 (Local Loopback)
RX packets 112 bytes 9492 (9.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 112 bytes 9492 (9.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
网站名称:Linux系统中禁用IPV6
转载来源:http://www.shufengxianlan.com/qtweb/news40/503240.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联