Disable Linux IPv6 Networking

Source: Internet
Author: User

On Most of the Linux distribution IPV6 are enabled by default, which may cause your Internet are workding slow, so If your NE Twork do not supportor don't setup IPv6 network, you should better to Disable IPV6Protocal in the Linux system and it maybe increate your Web browsing speed or network security. So what do I-disable IPV6 on Linux operating system? This article would 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 P Rovides 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 is, 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)

You can check the above line if containing "Inet6 addr", if yes, and you are running IPV6 service.

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

If you get the 0″value, it means that IPv6 are 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 the "/etc/sysctl.conf" file:

Edit file/etc/sysctl.conf, enter the following command:

1 [Root@devops ~]# vim/etc/sysctl.conf

Adding the below lines into the. File:

1 Net.ipv6.conf.all.disable_ipv6 = 1
2 Net.ipv6.conf.default.disable_ipv6 = 1
3 Net.ipv6.conf.lo.disable_ipv6 = 1

Save and close that file, then restart Sysctl with the following command:

1 [Root@devops ~]# Sysctl-p

Now you can rerun the ' ifconfig ' command to check if IPV6 lines has been removed.

1 [Email protected] ~]# 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)

done!

See Also: IPv6 or IPv4


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.