1.修改
/etc/sysconfig/network加入NETWORKING_IPV6=no
[root@vmcu ~]#
cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=vmcu.xxx.com
NETWORKING_IPV6=no
2.屏蔽hosts文件中的IPV6选项
[root@vmcu ~]#
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
3.新建
ipv6off.conf(名称随意),加入以下内容
[root@vmcu ~]#
cat /etc/modprobe.d/ipv6off.conf
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
4.reboot重启操作系统
5.执行验证命令如下,如果都没有则表示完全禁用成功。
[root@vmcu ~]#
lsmod | grep -i ipv6
[root@vmcu ~]#
ifconfig | grep -i inet6
6.ifconfig eth0命令查看
[root@vmcu ~]#
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:19:88:44
inet addr:192.168.1.120 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:257 (257.0 b) TX bytes:337 (337.0 b)
阅读(1975) | 评论(0) | 转发(0) |