<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>We moved everything to gitlab.  You can find it here:<br>
      <br>
      <br>
    </tt>We have migrated everything to gitlab. That article is now
    here:<br>
    <br>
<a class="moz-txt-link-freetext" href="https://gitlab.isc.org/isc-projects/kea/wikis/docs/editing-host-reservations">https://gitlab.isc.org/isc-projects/kea/wikis/docs/editing-host-reservations</a><br>
    <br>
    FYI, for the originals, you can try changing "kea.isc.org" to
    "oldkea.isc.org".  Can't guarantee that will always work but it does
    currently:<br>
    <br>
    <a href="https://kea.isc.org/wiki/HostReservationsHowTo">https://oldkea.isc.org/wiki/HostReservationsHowTo</a><br>
    <br>
    Cheers,<br>
    <br>
    Thomas Markwalder<br>
    ISC Software Engineering<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2/7/19 2:54 PM, Jason Guy wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMii2zM+yENvfvxnTDm_Wr7De=sRjjtOWnBtu8xOdrs2iotE2g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">The best link used to be here:
            <div><a
                href="https://kea.isc.org/wiki/HostReservationsHowTo"
                moz-do-not-send="true">https://kea.isc.org/wiki/HostReservationsHowTo</a><br>
            </div>
            <div>Alas that is not resolving anymore. Here is essentially
              the SQL command from that link (was when 1.3 was new...but
              should be basically the same in newer versions). </div>
            <div>I may have added the 'ON DUPLICATE KEY UPDATE' bit,
              since I use ansible to provision this, but I cannot
              recall.</div>
            <div><br>
            </div>
            <div>
              <div>START TRANSACTION;</div>
              <div>SET @ipv4_address='10.50.25.254';</div>
              <div>SET @ipv4_reservation=INET_ATON(@ipv4_address);</div>
              <div>SET @ipv6_address_reservation='fc00:10:50:25::254';</div>
              <div>SET @dhcp4_subnet_id=25;</div>
              <div>SET @dhcp6_subnet_id=25;</div>
              <div>SET @hostname = 'utility';</div>
              <div>SET @identifier_type='hw-address';</div>
              <div>SET @identifier_mac='00:05:1b:d0:4f:84';</div>
              <div>SET @identifier_value=UNHEX(REPLACE(@identifier_mac,
                ':', ''));</div>
              <div><br>
              </div>
              <div>INSERT INTO hosts (dhcp_identifier,
                dhcp_identifier_type, dhcp4_subnet_id, dhcp6_subnet_id,
                ipv4_address, hostname)</div>
              <div>VALUES (</div>
              <div>    @identifier_value,</div>
              <div>    (SELECT type FROM host_identifier_type WHERE
                name=@identifier_type),</div>
              <div>    @dhcp4_subnet_id, </div>
              <div>    @dhcp6_subnet_id, </div>
              <div>    @ipv4_reservation, </div>
              <div>    @hostname</div>
              <div>)</div>
              <div>ON DUPLICATE KEY UPDATE </div>
              <div>    dhcp_identifier=@identifier_value, </div>
              <div>    dhcp4_subnet_id=@dhcp4_subnet_id, </div>
              <div>    dhcp6_subnet_id=@dhcp6_subnet_id, </div>
              <div>    ipv4_address=@ipv4_reservation, </div>
              <div>    hostname=@hostname</div>
              <div>;</div>
              <div>SET @inserted_host_id = (SELECT host_id FROM hosts
                WHERE dhcp_identifier=@identifier_value);</div>
              <div>INSERT INTO ipv6_reservations (address, type,
                host_id)</div>
              <div>VALUES (@ipv6_address_reservation, 0,
                @inserted_host_id)</div>
              <div>ON DUPLICATE KEY UPDATE </div>
              <div>    address=@ipv6_address_reservation, </div>
              <div>    type=0, </div>
              <div>    host_id=@inserted_host_id</div>
              <div>;</div>
              <div>COMMIT;</div>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>Cheers,</div>
            <div>Jason</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Feb 7, 2019 at 2:05 PM
          MRob <<a href="mailto:mrobti@insiberia.net"
            moz-do-not-send="true">mrobti@insiberia.net</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,
          I learned how to insert into mysql host reservations for the <br>
          dhcp_identifier column like this:<br>
          <br>
          INSERT INTO hosts (dhcp_identifier, hostname) VALUES <br>
          (UNHEX(REPLACE('AA:BB:11:22:CC:33', ':', '')), 'myhost')<br>
          <br>
          Can anyone help me understand how to insert IPv4 address into
          the <br>
          "ipv4_address" column, the data type is integer.<br>
          <br>
          Thank you.<br>
          _______________________________________________<br>
          Kea-users mailing list<br>
          <a href="mailto:Kea-users@lists.isc.org" target="_blank"
            moz-do-not-send="true">Kea-users@lists.isc.org</a><br>
          <a href="https://lists.isc.org/mailman/listinfo/kea-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kea-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>