PreferredLIfetime=0 appears to not work in Ubuntu 18.04 systemd networking

Karl Auer kauer at biplane.com.au
Sun Jan 12 02:27:40 UTC 2020


On Sat, 2020-01-11 at 17:56 -0500, Ben Coleman wrote:
> On 1/11/2020 5:23 PM, Karl Auer wrote:
> > 
> > This article is quite old but may still give you some useful clues:
> Yeah, rule 3 is why setting Preferred Lifetime to 0 is supposed to
> work

I do know that. But the idea was that you might find other ways to
avoid the address being used as source address. Here's more info:

https://into6.com.au/2013/03/20/etcgai-conf-it-aint-what-you-think-it-i
s-2/

> Problem is, the documented method for setting Preferred Lifetime to
> zero under systemd networking isn't working.

I don't use 18.xx, so can't test this myself, but I know in the past I
have been blindsided by many programmers' inability to spell
"preferred". Try "PreferedLifetime", "PrefferedLifetime" and
"PrefferredLifetime". You never know.

I'm also having a vague disquietude about whether you can set the
preferred lifetime to zero on a static IPv6 address... but maybe I'm
thinking of valid lifetime. Try this:

   sudo ip addr \
        change 2600:3c02::f03c:91ff:fee5:e5bf/64 \
        dev eth0 \
        preferred_lft 0

... and see if the preferred lifetime changes. If it does, then you at
least have a workaround you can script.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D
Old fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75






More information about the ubuntu-users mailing list