<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    version 4.1.1<br>
    yes. it is DHCPv6, by default.<br>
    <br>
    <div class="moz-cite-prefix">On 03/18/2015 06:21 AM, perl-list
      wrote:<br>
    </div>
    <blockquote
      cite="mid:937251164.686016.1426684887260.JavaMail.zimbra@network1.net"
      type="cite">
      <div style="font-family: Andale Mono; font-size: 10pt; color:
        #000000">
        <div style="font-family: Andale Mono; font-size: 10pt; color:
          #000000">What version of ISC DHCP, and is this DHCPv6 that you
          are trying to log?<br>
          <br>
          <hr id="zwchr" data-marker="__DIVIDER__">
          <div data-marker="__HEADERS__">
            <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:
              </b>"Sean McMurray" <a class="moz-txt-link-rfc2396E" href="mailto:sean@mvtel.com"><sean@mvtel.com></a><br>
              <b>To: </b>"Users of ISC DHCP"
              <a class="moz-txt-link-rfc2396E" href="mailto:dhcp-users@lists.isc.org"><dhcp-users@lists.isc.org></a><br>
              <b>Sent: </b>Tuesday, March 17, 2015 9:22:30 PM<br>
              <b>Subject: </b>Re: Logging circuit-id<br>
            </blockquote>
          </div>
          <div data-marker="__QUOTED_TEXT__">
            <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">I
              can tell it to log(error, "Hello") and it won't log.<br>
              <br>
              <div class="moz-cite-prefix">On 03/17/2015 06:15 PM,
                perl-list wrote:<br>
              </div>
              <blockquote
                cite="mid:1439414469.684071.1426641340236.JavaMail.zimbra@network1.net">
                <div style="font-family: Andale Mono; font-size: 10pt;
                  color: #000000">
                  <div style="font-family: Andale Mono; font-size: 10pt;
                    color: #000000"><br>
                  </div>
                  <div style="font-family: Andale Mono; font-size: 10pt;
                    color: #000000">Here is an example of how I have
                    done it:</div>
                  <div style="font-family: Andale Mono; font-size: 10pt;
                    color: #000000"><br>
                  </div>
                  <div style="font-family: Andale Mono; font-size: 10pt;
                    color: #000000">
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">if exists agent.circuit-id {</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">        log ( error,</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">                concat(
                      "agent.circuit-id,", binary-to-ascii (10, 8, ".",
                      leased-address),",",</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">                       
                      "circuit-id,",option agent.circuit-id,",",</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">                       
                      "time,",binary-to-ascii(10,32,"",encode-int
                      (lease-time,32)),",",</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">                       
                      "hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7))</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">                )</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">        );</p>
                    <p style="margin: 0px; font-size: 11px; font-family:
                      Menlo;">}</p>
                    <div><br>
                    </div>
                  </div>
                  <div style="font-family: Andale Mono; font-size: 10pt;
                    color: #000000">If that doesn't work then the
                    circuit-id may not be there (if no line appears at
                    all in the logs), or if it only logs a partial line
                    then the circuit-id is likely binary instead of
                    ASCII.  I'm not sure how to log if it is binary -
                    some use of binary-to-ascii will be necessary.<br>
                    <br>
                    <hr id="zwchr">
                    <div>
                      <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:

                        </b>"Sean McMurray" <a moz-do-not-send="true"
                          class="moz-txt-link-rfc2396E"
                          href="mailto:sean@mvtel.com" target="_blank"><sean@mvtel.com></a><br>
                        <b>To: </b><a moz-do-not-send="true"
                          class="moz-txt-link-abbreviated"
                          href="mailto:dhcp-users@lists.isc.org"
                          target="_blank">dhcp-users@lists.isc.org</a><br>
                        <b>Sent: </b>Tuesday, March 17, 2015 5:51:16 PM<br>
                        <b>Subject: </b>Logging circuit-id<br>
                      </blockquote>
                    </div>
                    <div>
                      <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">I
                        would like my dhcpd logs to include circuit-id.<br>
                        I have tried to use log() directives in my conf
                        file, but nothing I have <br>
                        tried works.<br>
                        <br>
                        Here is an example of a configuration I have
                        included in a subnet:<br>
                        <br>
                           log(info, concat(<br>
                             " Mac: ",binary-to-ascii(16, 8, ":",
                        substring(hardware,1, 6))<br>
                             ," IP: ",binary-to-ascii (10, 8, ".",
                        leased-address)<br>
                             ,"Circuit: ",option agent.circuit-id<br>
                           ));<br>
                        <br>
                        <br>
                        Standard logging is working fine to record
                        DHCPDISCOVER, DHCPOFFER, etc. <br>
                        I just can't get custom entries to show up in
                        the log.<br>
                        <br>
                        _______________________________________________<br>
                        dhcp-users mailing list<br>
                        <a moz-do-not-send="true"
                          class="moz-txt-link-abbreviated"
                          href="mailto:dhcp-users@lists.isc.org"
                          target="_blank">dhcp-users@lists.isc.org</a><br>
                        <a moz-do-not-send="true"
                          class="moz-txt-link-freetext"
                          href="https://lists.isc.org/mailman/listinfo/dhcp-users"
                          target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></blockquote>
                    </div>
                  </div>
                  <br>
                </div>
                <br>
                <fieldset class="mimeAttachmentHeader"></fieldset>
                <br>
                <pre>_______________________________________________
dhcp-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
              </blockquote>
              <br>
              <br>
              _______________________________________________<br>
              dhcp-users mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
              <a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></blockquote>
          </div>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>