<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Kea has two features that deals with expired leases. Please take
      a look into lease file clean up:<br>
<a class="moz-txt-link-freetext" href="https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#memfile-basic-storage-for-leases">https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#memfile-basic-storage-for-leases</a>
      (you can easily disable this by setting lfc-interval to 0) and
      lease expiration
      <a class="moz-txt-link-freetext" href="https://kea.readthedocs.io/en/latest/arm/lease-expiration.html">https://kea.readthedocs.io/en/latest/arm/lease-expiration.html</a></p>
    <p>But none of those processes touch unexpired leases, my guess is
      that you are putting incorrect state of a lease.</p>
    <p>There is also lease sanity check feature, but this by default
      wouldn't remove your leases
<a class="moz-txt-link-freetext" href="https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#sanity-checks-in-dhcpv4">https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#sanity-checks-in-dhcpv4</a></p>
    <p>I hope that our documentation will help you find solution.</p>
    <p>Włodek Wencel</p>
    <p>QA, ISC<br>
    </p>
    <div class="moz-cite-prefix">On 13/04/2023 21:21, Rachael Wilson
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CY5PR19MB62208AF79752ED5CBC08BFD8CC989@CY5PR19MB6220.namprd19.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style>@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;}@font-face
        {font-family:Aharoni;}@font-face
        {font-family:"Arial Black";
        panose-1:2 11 10 4 2 1 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}</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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Thank you very much Wlodek!  With that info
          I was able to create a lease file for dhcp4.  The only thing
          is it seems a collector runs at a certain interval that cleans
          up the memfile?  Looks like it blows out any loaded leases
          before they could expire from the old DHCP server.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal"
            style="margin-bottom:8.0pt;line-height:106%"><o:p></o:p></p>
          <p class="MsoNormal"
            style="margin-bottom:8.0pt;line-height:106%"><o:p> </o:p></p>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <br>
        <p>--<br>
          Rachael Wilson<br>
          (509) 422-8374</p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b>From:</b> Kea-users
              <a class="moz-txt-link-rfc2396E" href="mailto:kea-users-bounces@lists.isc.org"><kea-users-bounces@lists.isc.org></a> <b>
                On Behalf Of </b>Wlodek Wencel<br>
              <b>Sent:</b> Thursday, April 13, 2023 8:48 AM<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:kea-users@lists.isc.org">kea-users@lists.isc.org</a><br>
              <b>Subject:</b> Re: [Kea-users] Migrate to Kea from
              non-ISC DHCP server ***EXTERNAL EMAIL***<o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <table class="MsoNormalTable" style="width:260.25pt" width="347"
          cellpadding="0" border="0">
          <tbody>
            <tr style="height:9.75pt">
              <td style="width:495.0pt;background:blue;padding:.75pt
                .75pt .75pt .75pt;height:9.75pt" width="660">
                <p><strong><span
                      style="font-size:9.0pt;font-family:"Arial
                      Black",sans-serif;color:yellow">EXTERNAL
                      EMAIL: Please Think Before You Click!!</span></strong><span
style="font-size:9.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif"> <o:p></o:p></span></p>
        <p>Couple simple leases files I took out from our automated
          testing are attached. Please be aware that in user context Kea
          can store quite extensive info in json structure (also
          attached).
          <o:p></o:p></p>
        <p>Hope that will help<o:p></o:p></p>
        <p>Wlodek Wencel<o:p></o:p></p>
        <p><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">On 13/04/2023 16:42, Rachael Wilson
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Thank you, Darren!  I will give perfdhcp
            a try.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"
            style="margin-bottom:8.0pt;line-height:105%"> <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p>--<br>
            Rachael Wilson<br>
            (509) 422-8374<o:p></o:p></p>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b>From:</b> Kea-users <a
                href="mailto:kea-users-bounces@lists.isc.org"
                moz-do-not-send="true">
                <kea-users-bounces@lists.isc.org></a> <b>On
                Behalf Of </b>Darren Ankney<br>
              <b>Sent:</b> Thursday, April 13, 2023 3:27 AM<br>
              <b>To:</b> <a href="mailto:kea-users@lists.isc.org"
                moz-do-not-send="true" class="moz-txt-link-freetext">kea-users@lists.isc.org</a><br>
              <b>Subject:</b> Re: [Kea-users] Migrate to Kea from
              non-ISC DHCP server ***EXTERNAL EMAIL***<o:p></o:p></p>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <table class="MsoNormalTable" style="width:260.25pt"
            width="347" cellpadding="0" border="0">
            <tbody>
              <tr style="height:9.75pt">
                <td style="width:495.0pt;background:blue;padding:.75pt
                  .75pt .75pt .75pt;height:9.75pt" width="660">
                  <p><strong><span
                        style="font-size:9.0pt;font-family:"Calibri",sans-serif">EXTERNAL
                        EMAIL: Please Think Before You Click!<span
                          style="color:white">!</span></span></strong><o:p></o:p></p>
                </td>
              </tr>
            </tbody>
          </table>
          <p><span
              style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <div>
            <p class="MsoNormal">Hello Rachael,<o:p></o:p></p>
            <div>
              <p class="MsoNormal"> <o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">There probably isn't an example file
                anywhere in the documentation (I looked also) or if
                there is, I just didn't find it.  I would suggest
                setting up a test kea server with the memfile lease
                database persisting to a file.  Then use perfdhcp to
                generate traffic thus populating the file.  If you need
                specific options to appear in the lease file, it is
                possible to use perfdhcp to generate most of them (even
                if you have to create the hex yourself).<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"> <o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">Thank you,<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"> <o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">Darren Ankney<o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <div>
            <div>
              <p class="MsoNormal">On Wed, Apr 12, 2023 at 5:19 PM
                Rachael Wilson <<a href="mailto:RachaelW@okpud.org"
                  moz-do-not-send="true" class="moz-txt-link-freetext">RachaelW@okpud.org</a>>
                wrote:<o:p></o:p></p>
            </div>
            <blockquote style="border:none;border-left:solid #CCCCCC
              1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
              <div>
                <div>
                  <div>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,
                      I would like to migrate a few thousand DHCP leases
                      from a non-ISC DHCP server to a memfile backed Kea
                      instance.  Looking through the docs, it seems it
                      would be easier to populate the lease file in
                      /var/lib/kea/kea-leases4.csv rather than using
                      hooks.  However, in a fresh install the file only
                      contains the header row.  Is there an example file
                      populated with rows I could look at to properly
                      format the data for import?  Didn’t see anything
                      in the docs, but might have missed it.<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;margin-bottom:8.0pt;line-height:105%">
                       <o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  </div>
                  <p class="MsoNormal">-- <o:p></o:p></p>
                  <table class="MsoNormalTable" style="width:495.0pt"
                    id="m_-55651584395806363520.d7lo0ephf9g" width="660"
                    cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                      <tr>
                        <td style="width:59.25pt;padding:0in 0in 0in
                          0in" width="79">
                          <p class="MsoNormal"
                            style="line-height:12.75pt"><span
                              style="font-size:10.0pt;font-family:"Arial",sans-serif"><img
                                style="width:.9062in;height:.9062in"
                                id="m_-55651584395806363520.84vrp5kjk1v"
src="cid:part1.vQtr6Vjc.50lmi8nY@isc.org" alt="logo__250px.png" class=""
                                width="87" height="87" border="0"></span><o:p></o:p></p>
                        </td>
                        <td style="width:435.75pt;padding:4.5pt 4.5pt
                          4.5pt 4.5pt" width="581" valign="top">
                          <p class="MsoNormal"
                            style="line-height:12.75pt"><strong><span
                                style="font-size:12.0pt;font-family:"Calibri",sans-serif">Rachael
                                Wilson
                              </span></strong><span
                              style="font-size:12.0pt;color:#7F7F7F">| </span><span
                              style="font-size:12.0pt;color:#1F497D">Network
                              Analyst</span><span
                              style="font-size:10.0pt"><br>
                              <span style="color:#7F7F7F">Public Utility
                                District No. 1 Of Okanogan County <br>
                                Office: (509) 422-8374 | <a
                                  href="mailto:RachaelW@okpud.org"
                                  target="_blank" moz-do-not-send="true"
                                  class="moz-txt-link-freetext">RachaelW@okpud.org</a> <br>
                              </span><span style="color:black">1331 2nd
                                Ave N., Okanogan, WA 98840 | P.O. Box
                                912, Okanogan, WA 98840 </span></span><o:p></o:p></p>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2" style="width:495.0pt;padding:0in
                          0in 0in 0in" width="660" valign="top">
                          <p class="MsoNormal"
                            style="line-height:12.75pt"><span
                              style="font-size:6.0pt;font-family:"Arial",sans-serif">P.U.D.
                              No. 1 of Okanogan County is an equal
                              opportunity provider and employer.  If you
                              think that you have received this message
                              in error, please e-mail the sender at the
                              above e-mail address.</span><o:p></o:p></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <p class="MsoNormal"> <o:p></o:p></p>
                </div>
                <p class="MsoNormal">-- <br>
                  ISC funds the development of this software with paid
                  support subscriptions. Contact us at
                  <a href="https://www.isc.org/contact/" target="_blank"
                    moz-do-not-send="true" class="moz-txt-link-freetext">https://www.isc.org/contact/</a>
                  for more information.<br>
                  <br>
                  To unsubscribe visit <a
                    href="https://lists.isc.org/mailman/listinfo/kea-users"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">
                    https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
                  <br>
                  Kea-users mailing list<br>
                  <a href="mailto:Kea-users@lists.isc.org"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">Kea-users@lists.isc.org</a><br>
                  <a
                    href="https://lists.isc.org/mailman/listinfo/kea-users"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">https://lists.isc.org/mailman/listinfo/kea-users</a><o:p></o:p></p>
              </div>
            </blockquote>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>