1. 通过命令:
Check to see if you’re installation is currently set up for IPv6: # cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If the output is 0, IPv6 is enabled.
If the output is 1, IPv6 is already disabled.
需要特别说明的是:在这种方法下,使用# lsmod | grep ipv6依然会有一些相关模块列出。
2. 通过ifconfig查看网卡信息,以下打开和关闭ipv6的差别:
禁用IPV6的操作步骤
Step 1: add this rule in /etc/sysctl.conf : net.ipv6.conf.all.disable_ipv6=1
Step 2: add this rule in /etc/sysconfig/network: NETWORKING_IPV6=no
Step 3: add this setting for each nic X (X is the corresponding number for each nic) in /etc/sysconfig/network-scripts/ifcfg-ethX:IPV6INIT=no
Step 4: disable the ip6tables service : chkconfig ip6tables off