IPv6 Address with IPv6 Disabled – Why Does It Happen?

ipnetworkmanager

I want to use my interface with a single IPv4 address and IPv6 disabled.

IPv4 is configured on Manual, with a static IP without Gateway and Netmask 255.255.255.0. User this connection only for resources on its network is also ticked. DNS and Routes Automatic.

IPv6 "Disable" is called ignore in nmcli and nmtui.

ipv6

After rebooting I still get an IPv6 address. Why?

ipv6 info

  • CentOS Linux release 7.7.1908 (Core)
  • 3.10.0-1062.12.1.el7.x86_64

Best Answer

The relevant setting in NetworkManager's connection profile is called ipv6.method.

Until recently, disabled was not implemented (that is done now). If you have a recent NetworkManager and you set the method "disabled", it works as expected.

There is also the setting ignore. In that case NetworkManager leaves it to kernel. You would have to set the corresponding sysctl values yourself.

If the GUI calls it "disabled" while setting it to "ignore", that's a bug. I think it's even reported already (not sure). Also, that depends on which GUI you are using (looks like gnome-contol-center). If the GUI doesn't support it, use nmcli to set the property.

The reason why "ignore" exists, is because long ago NetworkManager left IPv6 to kernel. That mode does that, but arguably it's not very useful.

It took long to implement "disabled", because it didn't bother somebody enough to fix it. Nowadays it is fixed.

Related Question