IPv6 may be causing unusual and unpredictable network behavior

Greetings!

Back in the dark ages of the early 21st Century, (2009 to be exact), I ran into an interesting problem with the new IPv6 protocol:

It would cause the network connections and network stack on both routers and computers to freeze solid, and remain frozen solid until rebooted.

I wrote about it in a QA Tech Tips article in December of 2009.

This issue was also raised in the forum posting I authored on the new 2020-10-17 experimental release of Raspbian for Robots, which is based off of a very brittle Raspbian/Raspberry Pi O/S release. Apparently IPv6 is the culprit for a number of issues there as well.
Viz.:
Warning: The 2020-10-17 Raspbian for Robots image may have significant issues on the Pi-4 (and possibly other versions)

Just yesterday, I ran into this same issue with my wife’s computer, a nice shiny HP ProBook laptop that’s about a year old and runs Windows 10.

Why is this interesting?

First of all, because I specifically and deliberately disabled IPv6 when I originally provisioned the machine for her when purchased. Apparently Microsoft - in its infinite wisdom - decided that some, if not all, updates will re-enable IPv6.   :face_with_symbols_over_mouth:   :face_with_symbols_over_mouth:   :face_with_symbols_over_mouth:

Note that this is not limited to Microsoft. Linux updates, (in the Debian distribution channels at least), do this too on occasion. I cannot speak for Apple, as I do not have one. However, being based off of BSD, and assuming that the developers at Apple are no more intelligent than other developers of like kind, I would assume that the same is true there.

Raspbian, as well as it’s derivatives, (including Raspbian for Robots), is also not immune to this.

On my wife’s Windows 10 system, I went to every network adapter listed, opened up its property sheet, and - if it existed - I disabled IPv6. Then I rebooted.

This included the TAP, OpenVPN and WireGuard VPN virtual network adapters as well - they all had IPv6 modes and settings enabled.

My own system - which I thoroughly de-loused and check frequently - also had every adapter’s IPv6 settings enabled despite my efforts to turn them off in the past.

Charlie’s network settings were also examined and cleansed of any traces of IPv6. I do not know if it is possible to totally uninstall IPv6 on Raspberry Pi systems or not.

This thorough housecleaning of IPv6 on my systems has gone far and done much to eliminate network “brittleness” as well as the weird and wonky failures I was periodically seeing.

Though I cannot tell anyone what to do with their networks, or the systems on those networks, I would humbly suggest that you consider disabling IPv6 on all of your network appliances, routers, and computers to avoid the kinds of problems that I have seen in the past.

One last thing I almost forgot:
Though, in theory, it’s not necessary to reboot or restart to enable these changes, I strongly recommend a reboot just to make sure there are no persistent background tasks using an open network connection - like NTP time services, or connections to externally mapped storage, etc.

Rebooting after a change like this is, IMHO, always a good idea.

Thanks!

Guess I’ll leave the “Disable IPv6” step in my setup instruction:

=== disable ipv6

Browse the disk (boot)
Rt Click on Overlays->Open Terminal Here
cd ..

cp cmdline.txt cmdline.txt.bak
nano cmdline.txt
add to end of line/file:
ipv6.disable=1
save, exit editor

- eject disk

it looks like it can be done after boot on the Pi also by editing:

sudo nano /boot/cmdline.txt

to add ipv6.disable=1 to the end. (and then rebooting)

1 Like

I haven’t tried this, but I’ve seen examples, so I believe you could do something like this in a configuration script:

  1. Grep cmdline.txt for “ipv6.disable=1”
    • If exists, skip the rest.
  2. echo “ipv6.disable=1” > cmdline.txt
    • I don’t know if that puts it at the end or not. I’m assuming it does. If not, there’s probably some way to make sure it appends.

This is something that I absolutely have not done, but I’ve seen examples in scripts and on-line of things like this, so I am sure it’s doable.

1 Like