Internet Protocol version half dozen (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification together with place organisation for computers on networks together with routes traffic across the Internet. IPv6 was developed past times the Internet Engineering Task Force (IETF) to bargain alongside the long-anticipated job of IPv4 address exhaustion. IPv6 is intended to supplant IPv4. IPv6 is relatively novel together with sometimes depending on how it’s configured, it tin comport badly. This post service volition exhibit how to disable IPv6 inwards Linux distro such every bit Ubuntu, Debian, Kali, Linux Mint etc.
Every device on the Internet is assigned an IP address for identification together with place definition. With the rapid growth of the Internet afterward commercialization inwards the 1990s, it became evident that far to a greater extent than addresses than the IPv4 address infinite has available were necessary to connect novel devices inwards the future. By 1998, the Internet Engineering Task Force (IETF) had formalized the successor protocol. IPv6 uses a 128-bit address, allowing 2128, or some 3.4×1038 addresses, or to a greater extent than than 7.9×1028 times every bit many every bit IPv4, which uses 32-bit addresses together with provides some 4.3 billion addresses. The 2 protocols are non designed to live on interoperable, complicating the transition to IPv6. However, several IPv6 transition mechanisms own got been devised to permit communication betwixt IPv4 together with IPv6 hosts.
IPv6 provides other technical benefits inwards add-on to a larger addressing space. In particular, it permits hierarchical address allotment methods that facilitate road aggregation across the Internet, together with thence boundary the expansion of routing tables. The occupation of multicast addressing is expanded together with simplified, together with provides additional optimization for the delivery of services. Device mobility, security, together with configuration aspects own got been considered inwards the pattern of the protocol.
IPv6 addresses are represented every bit 8 groups of 4 hexadecimal digits alongside the groups existence separated past times colons, for event 2001:0db8:85a3:0042:1000:8a2e:0370:7334, but methods to abbreviate this amount musical note exist. However it is non yet widely supported together with its adoption is nevertheless inwards progress.
Does your organisation back upwardly IPv6 ?
To brand IPv6 work, y'all demand an Operating System that supports IPv6. Ubuntu, Debian, Linux Mint together with most modern distros does that. You tin depository fiscal establishment check output of ifconfig
to meet if IPv6 is working together with whether it’s assigned to the network interfaces:
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1c:c0:f8:79:ee
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c0ff:fef8:79ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110880 errors:0 dropped:0 overruns:0 frame:0
TX packets:111960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62289395 (62.2 MB) TX bytes:25169458 (25.1 MB)
Interrupt:20 Memory:e3200000-e3220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:45258 errors:0 dropped:0 overruns:0 frame:0
TX packets:45258 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4900560 (4.9 MB) TX bytes:4900560 (4.9 MB)
Check the business inet6 addr
Next y'all demand a router/modem that also supports IPv6. And beyond that, your Internet access provider must also back upwardly IPv6.
Instead of checking every percentage of the network infrastructure, its ameliorate to but abide by out if y'all tin connect to websites over IPv6. There are lots of websites that show IPv6 back upwardly on your connection. Check out http://testmyipv6.com/ for example.
The center parameters that enable IPv6 are every bit follows
$ sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
$ sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 0
$ sysctl net.ipv6.conf.lo.disable_ipv6
net.ipv6.conf.lo.disable_ipv6 = 0
The same tin live on also live on checked from the proc files
$ truthful cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0
Note that the variables command disabling
of IPv6. So setting them to i
would disable IPv6
Disable IPv6 if its non supported
So if IPv6 is non supported on your network infrastructure, it mightiness live on useful to disable it all together. Why ? It tin crusade issues similar delayed domain lookups, un-necessary attempts to connect to IPv6 addresses causing delay inwards network connectedness etc.
I did come upwardly across some problems similar that. The apt-get command occasionally tries to connect to IPv6 addresses together with fails together with so retries an ipv4 address. Take a await at this output
$ sudo apt-get update
Ign http://archive.canonical.com trusty InRelease
Ign http://archive.canonical.com raring InRelease
Err http://archive.canonical.com trusty Release.gpg
Cannot initiate the connectedness to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80]
Err http://archive.canonical.com raring Release.gpg
Cannot initiate the connectedness to archive.canonical.com:80 (2001:67c:1360:8c01::1b). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::1b 80]
.....
Errors similar those own got been to a greater extent than frequent inwards the recent Ubuntu versions, in all likelihood because they attempt to occupation IPv6 to a greater extent than than before.
I noticed similar issues come about inwards other applications similar Hexchat together with also Google Chrome which would sometimes own got longer than green to lookup a domain name.
So the best solution is to disable IPv6 exclusively to give-up the ghost rid of those things. It takes only a pocket-sized configuration together with tin assistance y'all solve many network issues on your system. Users own got fifty-fifty reported an growth inwards meshwork speed.
Method i – Disable IPv6
Edit the file – /etc/sysctl.conf
$ sudo gedit /etc/sysctl.conf
And produce amount inwards the next lines at the cease of that file
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Save the file together with unopen it
Restart sysctl
with
$ sudo sysctl -p
Check the output of ifconfig
again together with at that spot should live on no ipv6 address
$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:5f:28:8b
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1346 errors:0 dropped:0 overruns:0 frame:0
TX packets:965 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1501691 (1.5 MB) TX bytes:104883 (104.8 KB)
If it does non work, so attempt rebooting the organisation together with depository fiscal establishment check ifconfig
again.
Method 2 – Disable IPv6 – GRUB method
IPv6 tin also live on disabled past times editing the grub
configuration file
$ sudo gedit /etc/default/grub
Look for the business containing GRUB_CMDLINE_LINUX
together with edit it every bit follows
GRUB_CMDLINE_LINUX="ipv6.disable=1"
The same tin also live on added to the value of the variable named GRUB_CMDLINE_LINUX_DEFAULT
together with either would work. Save the file, unopen it together with regenerate the grub configuration
$ sudo update-grub2
Reboot. Now IPv6 should live on disabled.
Method iii – Without disabling IPv6 – setting IPv4 every bit preferred over IPv6
Find at getaddrinfo(3)
s configuration file; i.e. /etc/gai.conf
together with uncomment the business to prefer IPv4 over IPv6.
$ sudo gedit /etc/gai.conf
Locate this business together with un-comment it:
#precedence ::ffff:0:0/96 100
So that it looks similar this:
precedence ::ffff:0:0/96 100
Save together with acquire out the file. Reboot together with you’re all laid every bit IPv4 is preferred now. This is the best agency when y'all desire to give-up the ghost on IPv6 enabled but prefer IPv4 for DNS lookup or such.
Conclusion
Disabling IPv6 tin crusade problems. If your Internet connectedness together with router own got already migrated to IPv6, you’ll lose the powerfulness to occupation it properly. IPv6 may also live on required for some dwelling identify networking functions — for example, the easy-to-use Homegroup dwelling identify networking characteristic introduced inwards Windows 7, Linux etc. requires IPv6 enabled on the computers on your dwelling identify network to occupation it.
The entire globe is moving towards IPv6, although it’s happening likewise slowly. IPv6 is necessary to supplant IPv4 — we’re running out of IPv4 addresses together with IPv6 is the solution. In that context, the terminal method of setting preferences (Without disabling IPv6 – setting IPv4 every bit preferred over IPv6) is better. There’s a expert direct chances y'all don’t genuinely demand IPv6 on your network — unless y'all rely on Windows Homegroup or similar features — so it may non live on especially harmful to take away if if y'all know what you’re doing. However, y'all won’t meet a speed improvement from clinging to IPv4 unless at that spot are serious problems alongside your Internet service provider’s network or your dwelling identify network.
The moral is, if y'all notice that IPv6 needs fixing, prepare it today rather than postponing until tomorrow. We alive inwards the early on days of majority deployment of IPv6, together with nosotros demand to piece of work together to untangle the implementation quirks that arise. The listing of fixes inwards a higher identify represents only a pocket-sized sampling of potential issues. You tin ever seek assistance Online at whatever number of reputable IPv6 intelligence forums. Use network misbehavior every bit an chance to acquire close together with improve the patch of IPv6 internetworking together with resist whatever temptations to disable the protocol.