Disable Linux IPv6 Networking
2014-08-05 00:00
435 查看
摘要: On most of the Linux distribution IPv6 is enabled by default, which may cause your internet is workding slow, so If your network do not supportor do not setup IPv6 network, you should better to disable IPv6 protocal in linux system and it maybe increate your web browsing speed or network security...
![](http://static.oschina.net/uploads/img/201408/05100449_p60Z.jpg)
On most of the Linux distribution IPv6 is enabled by default, which may cause your internet is workding slow, so If your network do not supportor do not setup IPv6 network, you should better to
disable IPv6 protocal in linux system and it maybe increate your web browsing speed or network security. So How do I to disable IPv6 on linux operating system? this article will give you a guide for disabling IPv6 networking(
linux disable ipv6):
What Is IPv6?
Internet Protocol version 6 (IPv6) is the latest version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion.
How To Check If IPv6 is Enable Or Disable
There are two ways to check if IPv6 is disabled shown as below:
1.Run the “ifconfig” command to check
You can check the above line if containing “inet6 addr”, If yes, you machine is running IPv6 service.
2.check “disable_ipv6″ file to check if IPv6 is disabled,enter:
if you get “0″ value, it means that IPv6 is enabled and “1″ means it is disabled.
How to Disable IPv6 in linux system?
You need to add the following lines at the end of “/etc/sysctl.conf” file:
Edit file /etc/sysctl.conf, enter the following command:
Adding the below lines into that file:
Save and close that file, then restart sysctl with the following command:
Now you can rerun the “ifconfig” command to check if IPv6 lines have been removed.
Done!
See Also: IPv6 or IPv4
![](http://static.oschina.net/uploads/img/201408/05100449_p60Z.jpg)
On most of the Linux distribution IPv6 is enabled by default, which may cause your internet is workding slow, so If your network do not supportor do not setup IPv6 network, you should better to
disable IPv6 protocal in linux system and it maybe increate your web browsing speed or network security. So How do I to disable IPv6 on linux operating system? this article will give you a guide for disabling IPv6 networking(
linux disable ipv6):
What Is IPv6?
Internet Protocol version 6 (IPv6) is the latest version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion.
How To Check If IPv6 is Enable Or Disable
There are two ways to check if IPv6 is disabled shown as below:
1.Run the “ifconfig” command to check
1 | [root@devops ~]# ifconfig |
2 | eth0 Link encap:Ethernet HWaddr 00:0C:29:6B:2E:53 |
3 | inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0 |
4 | inet6 addr: fe80::20c:29ff:fe6b:2e53/64 Scope:Link |
5 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
6 | RX packets:345052 errors:0 dropped:0 overruns:0 frame:0 |
7 | TX packets:26332 errors:0 dropped:0 overruns:0 carrier:0 |
8 | collisions:0 txqueuelen:1000 |
9 | RX bytes:97309231 (92.8 MiB) TX bytes:4735894 (4.5 MiB) |
10 |
11 | lo Link encap:Local Loopback |
12 | inet addr:127.0.0.1 Mask:255.0.0.0 |
13 | inet6 addr: ::1/128 Scope:Host |
14 | UP LOOPBACK RUNNING MTU:16436 Metric:1 |
15 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
16 | TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
17 | collisions:0 txqueuelen:0 |
18 | RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
2.check “disable_ipv6″ file to check if IPv6 is disabled,enter:
1 | [root@devops ~]# cat /proc/sys/net/ipv6/conf/all/disable_ipv6 |
2 | 0 |
How to Disable IPv6 in linux system?
You need to add the following lines at the end of “/etc/sysctl.conf” file:
Edit file /etc/sysctl.conf, enter the following command:
1 | [root@devops ~]# vim /etc/sysctl.conf |
1 | net.ipv6.conf.all.disable_ipv6 = 1 |
2 | net.ipv6.conf.default.disable_ipv6 = 1 |
3 | net.ipv6.conf.lo.disable_ipv6 = 1 |
1 | [root@devops ~]# sysctl -p |
1 | [root@devops ~]# ifconfig |
2 | eth0 Link encap:Ethernet HWaddr 00:0C:29:6B:2E:53 |
3 | inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0 |
4 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
5 | RX packets:346874 errors:0 dropped:0 overruns:0 frame:0 |
6 | TX packets:26428 errors:0 dropped:0 overruns:0 carrier:0 |
7 | collisions:0 txqueuelen:1000 |
8 | RX bytes:97600047 (93.0 MiB) TX bytes:4747254 (4.5 MiB) |
9 |
10 | lo Link encap:Local Loopback |
11 | inet addr:127.0.0.1 Mask:255.0.0.0 |
12 | UP LOOPBACK RUNNING MTU:16436 Metric:1 |
13 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
14 | TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
15 | collisions:0 txqueuelen:0 |
16 | RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
See Also: IPv6 or IPv4
相关文章推荐
- vSphere networking features: distributed vSwitches; private VLANs; IPv6
- Centos Fail to start LSB:Bring up/down networking
- 关于ipv6的笔记
- iOS 【AppStore 上架时由于 ipv6 原因被拒】
- 【原】使用IPV6, 10M/s高速BT互传…
- win8.1连接mac配置的ipv6环境
- docker - 启动container时出现 [warning] : ipv4 forwarding is disabled. networking will not work
- iOS IPV6 审核
- Ceph对象存储(rgw)的IPv6环境配置
- centos 7 Docker容器启动报WARNING: IPv4 forwarding is disabled. Networking will not work
- 苹果APP上架申请因无法IPv6-only访问被拒,请重点检查APP代码
- POJ - 1287 - Networking
- CE6870 添加ipv6 策略路由失败问题解决
- 关闭IPV6
- POJ 1287 Networking(最小生成树)
- C#获取机器信息(IPV4.IPV6.MAC.硬盘信息,机器厂商/型号)
- IPv6无状态获取过程
- Mac创建一个IPV6 Wifi热点
- Build IPV6 SERVR that supports IPv6 dns
- ipv4和ipv6的区别