Disabling IPv6 - `enableIPv6` and `kernelParams`

Hi,
I want to disable ipv6 since my router doesn’t support it.

I want to know if networking.enableIPv6 is enough, or should i add "ipv6.disable=1" to boot.kernelParams?

This discussion makes me unsure if I should use both or just one.

There shouldn’t be a need to disable IPv6 explicitly on your machine. As long as your router doesn’t send our a (broken) default route for IPv6, nothing should happen.

5 Likes

I know that I do not need to do it.
I want to because my device has very limited resources.

Also I like to learn inner workings of the stuff I use.

ipv6 is baked into the kernel and all networking tools, as it will replace ipv4.

if you could further explain what it is you want to stop happening with log output would be useful.

I would like to preserve resources by removing as much functions that I don’t use as possible.

ipv6 is baked into the kernel and all networking tools

I know – I would need to compile stuff locally if I wanted to change that.
I just want to optimize the CPU and, if possible, disk usage.

if you could further explain what it is you want to stop happening with log output would be useful.

I am not really sure what should I provide. Here’s something:

$ sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1

I don’t think it’s possible to disable it with a kernel compile. We have 10 cent embedded chips that support ipv6. So I’m not really sure what the ask is here.

Footnote on the gain of disabling ipv6 on ESP32: * Disabling CONFIG_LWIP_IPV6 can save about 39 KB for firmware size and 2 KB RAM when the system is powered up and 7 KB RAM when the TCP/IP stack is running. If there is no requirement for supporting IPV6, it can be disabled to save flash and RAM footprint.

1 Like