Selective logging of Option82 markets

project722 project722 at gmail.com
Wed Oct 12 14:28:52 UTC 2016


I'm using a global statement which allows me to log all data that comes
into the server with Option82 in it. Here is what I am using:

if((option dhcp-message-type = 3 or option dhcp-message-type = 5) and
      exists agent.circuit-id) {

    log(info, concat( "OPTION-82 | IP =",
        binary-to-ascii (10, 8, ".",leased-address),
        " | MAC=",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 1, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 2, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 3, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 4, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 5, 1))),2),":",
        suffix (concat("0", binary-to-ascii (16, 8, "",
        substring( hardware, 6, 1))),2),
        #" | CIRCUIT-ID=",
        #binary-to-ascii (10, 8, ".", option agent.circuit-id),
        #" | REMOTE-ID=",
        #binary-to-ascii (10, 8, ".", option agent.remote-id),
        " | CIRCUIT-ID=",
        substring( option agent.circuit-id, 0, 9999),
        " | REMOTE-ID=",
        substring( option agent.remote-id, 0, 9999)));
}

We have about 25 markets, or "pools", subnet declarations, whatever you
want to call it. Some of which are test markets we are using for internal
use. I need the ability to enable/disable option82 logging for these
markets. I'd rather keep the logging statement global then disable only the
few internal use markets that I need to. Is there a way to accomplish this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20161012/53c3b2a7/attachment.html>


More information about the dhcp-users mailing list