Dirk's Tech Findings

Linux: IPv6 addresses disappear on interface down

Publication date: 2020-03-28

Issue: IPv6 addresses disappear if interface is brought down and up again

IPv6 has another behavior than IPv4 here.

Solution:

The behavior can be controlled by interface configuration.

Excerpt from "https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt":

keep_addr_on_down - INTEGER
Keep all IPv6 addresses on an interface down event. If set static global addresses with no expiration time are not flushed.
      >0 : enabled
       0 : system default
      <0 : disabled
    Default: 0 (addresses are removed)

However, there seems to be no way to keep other addresses besides the mentioned "static global addresses with no expiration time". This is relevant to link local addresses assigned manually, e.g. to a Wireguard interface.

Back to topic list...