<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:962807001;
        mso-list-type:hybrid;
        mso-list-template-ids:-653752144 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello there!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In our IPv6 network, the address of a Recursive DNS Server (RDNSS) is supplied in a Router Advertisement (RA), with a lifetime of 60 seconds.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It appears that RDNSS lifetime is not being honoured (<a href="https://www.rfc-editor.org/rfc/rfc8106.html#section-5.1:~:text=in
               the option.-,Lifetime,-32-bit unsigned">RFC 8106, section 5.1</a>).  I reviewed the code and can see where the <a href="https://github.com/systemd/systemd-stable/blob/4a31fa2fb040005b73253da75cf84949b8485175/src/network/networkd-ndisc.c#L712">RDNSS lifetime is being saved</a>, though I was unable to determine how it was being handled upon expiry.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">How do I configure networkd so that the RA’s RDNSS lifetime is honoured?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is a summary of the simple protocol exchange:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Router:  Send RA [RDNSS address of “nameserver60s”, lifetime: “60”]<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Host: “resolvectl” shows the link’s DNS server now lists the RDNSS address of “nameserver60s”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">** Wait for more than 60 seconds – the RDNSS entry should expire **<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Host:<o:p></o:p></li><ol style="margin-top:0cm" start="1" type="a">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level2 lfo1">“resolvectl” continues to list the address of “nameserver60s” on the link.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level2 lfo1">Using tcpdump to trace “ping test.example.com”, the “nameserver60s” is still being used.  It never timed out.<o:p></o:p></li></ol>
</ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is my network configuration, showing UseDNS and UseDomains both set to “yes”:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal">$ cat /etc/systemd/network/10-eno0.network <o:p></o:p></p>
<p class="MsoNormal">[Match]<o:p></o:p></p>
<p class="MsoNormal">KernelCommandLine=!nfsroot<o:p></o:p></p>
<p class="MsoNormal">Name=eno0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[DHCP]<o:p></o:p></p>
<p class="MsoNormal">ClientIdentifier=mac<o:p></o:p></p>
<p class="MsoNormal">RouteMetric=10<o:p></o:p></p>
<p class="MsoNormal">UseDomains=yes<o:p></o:p></p>
<p class="MsoNormal">UseHostname=yes<o:p></o:p></p>
<p class="MsoNormal">UseMTU=yes<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Network]<o:p></o:p></p>
<p class="MsoNormal">#DHCP=ipv6<o:p></o:p></p>
<p class="MsoNormal">Address=10.1.1.1/24<o:p></o:p></p>
<p class="MsoNormal">#DNS=1.2.3.6<o:p></o:p></p>
<p class="MsoNormal">Gateway=1.1.1.2<o:p></o:p></p>
<p class="MsoNormal">IPv6AcceptRA=yes<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[IPv6AcceptRA]<o:p></o:p></p>
<p class="MsoNormal">UseDNS=yes<o:p></o:p></p>
<p class="MsoNormal">UseDomains=yes<o:p></o:p></p>
<p class="MsoNormal">------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Grateful for any suggestions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
<p class="MsoNormal">Matt.<o:p></o:p></p>
<p class="MsoNormal">PS: We’re on systemd 250.  I’ve searched later versions of the
<a href="https://github.com/systemd/systemd/releases">release notes</a> and it seems there have been no changes in this area.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>