How To Disable IPv6 in MacOS, Windows, and Linux
If you’re having network issues IPv6 can often be the cause, especially in Windows. While the network addressing scheme has launched and is ready for use, some programs and operating system elements still have trouble with it. If you would like to learn how to disable IPv6 as part of troubleshooting or because you don’t yet need it, this tutorial is for you.
IPv6 was introduced as an answer to the shortage of IPv4 addresses. With the rise of the internet of things and increase in number of connected devices, the old scheme wasn’t generating enough unique addresses to keep them all connected. IPv6 was introduced as the answer.
IPv4 vs. IPv6
IPv4 has a pool of 4,294,967,296 addresses and we are already close to exhausting those. Not all of them are in use as some were acquired and kept in reserve but the end is definitely near.
IPv6 has a pool of 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses. That’s 2128. However, IANA, the people behind the management of IP addressing will not release all of those at once. Plus, all valid IPv6 addresses will begin with a 2 or 3. So the actual number of valid IPv6 addresses is actually 2125. Still a pretty big number.
At the time of publishing, the vast majority of ISPs and networks still use IPv4. Most newer network hardware is compatible with IPv6 but not everything is. Windows is not fully compatible either as it still thinks a semicolon in an IPv6 address refers to a disk drive so we’re not there yet!
Until the time comes to replace IPv4 with IPv6 and until Windows is completely compatible with it, you can safely turn it off. Here’s how.
Disable IPv6 in Windows
While you can just uncheck the IPv6 option in Network Connections within Windows, this isn’t how to properly turn it off. Doing it this way can result in a five second delay on boot as Windows works out the correct registry setting. The best way to disable IPv6 in Windows is through a registry change.
- Type or paste ‘regedit’ into the Search Windows/Cortana box and hit Enter.
- Navigate to ‘HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services, tcpip6 and Parameters’.
- Right click Parameters in the left pane and select New, DWORD (32-bit) Value.
- Name it ‘DisabledComponents’.
- Right click DisabledComponents and select Modify.
- Change the value to ‘FF’ and click OK.
Reboot for the changes to take effect. Alternatively, you can visit this page on the Microsoft website that has a registry download to do all the work for you.
Disable IPv6 in OS X
OS X doesn’t have the compatibility issue that Windows does but still doesn’t utilize IPv6 yet. If you prefer to keep things simple or are troubleshooting network issues, here’s how to disable IPv6 in OS X.
- Open Finder.
- Navigate to Applications, Utilities and Terminal.
- Type or paste ‘networksetup -setv6off Ethernet && networksetup -setv6off Wi-Fi’ and hit Enter.
Be aware though that if you use AirDrop, disabling IPv6 will stop it working properly so turn it back to automatic if you are troubleshooting.
Type or paste ‘networksetup -setv6automatic Wi-Fi && networksetup -setv6automatic Ethernet’ and hit Enter in Terminal to re-enable IPv6.
You can use the UI if you prefer.
- Navigate to the Apple menu.
- Select System Preferences and Network
- Select Ethernet and then Advanced.
- Select Configure IPv6 and set it to Off
- Repeat for Wi-Fi.
- Reboot your computer.
Disable IPv6 in Linux
As you would expect, Linux does play nicely with IPv6 but not all hardware does. If you are troubleshooting network issues on a Linux network, disabling IPv6 is definitely a useful step in isolating what is wrong.
- Open a terminal window and log in as root.
- Type or paste ‘sysctl -w net.ipv6.conf.all.disable_ipv6=1’ and hit Enter.
- Type or paste ‘sysctl -w net.ipv6.conf.default.disable_ipv6=1’ and hit Enter.
You can use ‘sysctl -w net.ipv6.conf.all.disable_ipv6=0’ and ‘sysctl -w net.ipv6.conf.default.disable_ipv6=0’ to enable it once you’re ready.
If you use Debian, the process differs slightly.
- Open a terminal window and log in as root.
- Type or paste ‘sudo nano /etc/sysctl.conf’ and hit Enter.
- Add ‘net.ipv6.conf.all.disable_ipv6 = 1’ and ‘net.ipv6.conf.default.disable_ipv6 = 1’ and ‘net.ipv6.conf.lo.disable_ipv6 = 1’ as three lines at the bottom of the conf file.
- Save and exit
- Reboot your computer.
Unless you are experiencing network issues, running IPv6 should not impact your computer or your network speed at all. If it isn’t required, IPv6 isn’t used as yet. However, if you run Windows or older network hardware, it is certainly something worth trying as part of normal troubleshooting.
One thought on “How To Disable IPv6 in MacOS, Windows, and Linux”
Given that IPv6 is faster to Facebook, LinkedIn, and Akamai (according to them; probably others), there is a down side to disabling IPv6. It should not be turned off as “part of normal troubleshooting;” that’s usually shot-in-the-dark troubleshooting, which tends to cause collateral damage.