6

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
2
  • 1
    You don't need to reboot for changes to a profile to take effect. Instead, reactivate the profile with nmcli connection up "$PROFILE"
    – thaller
    Feb 25, 2020 at 19:23
  • thank you! I usually disable/activate the connection using nmtui.
    – Alexis
    Feb 27, 2020 at 2:24

2 Answers 2

5

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.

1
  • 2
    Thank you for your more detailed answer! It seems disabled isn't available for my version. Error: failed to set 'method' property: 'disabled' not among [ignore, auto, dhcp, link-local, manual, shared] and nmcli tool, version 1.18.0-5.el7_7.2.
    – Alexis
    Feb 27, 2020 at 2:31
4

The IPv6 address is a link-local address that is automatically configured. Network configuration programs don't touch it. If the address bothers you (it is only valid on the local LAN), to get rid of it you need to disable IPv6 in the kernel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .