option 82 config help

project722 project722 at gmail.com
Fri Nov 10 01:04:08 UTC 2017


Hi all, we have a option 82 stanza setup on our rhel 6 server that includes
the following:


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)));
}

This only logs option 82 data and we don't use it for making DHCP based
decisions such as handing out IP's and such. The logs from this produce the
following format:

Nov  9 18:56:56 servername dhcpd: OPTION-82 | IP =192.168.100.101 |
MAC=00:0f:94:43:f4:10 | CIRCUIT-ID=Area1_TA5000 eth 2/6/15/1/1:200 |
REMOTE-ID=647653__DATA_ETH1

We now have a need to capture option 82 data from a specific DHCP pool that
can only send the MAC address in the CID and RID fields instead of the
fields that you see above. Is it possible to create a new additional option
82 stanza just for the IP pool that can only send the MAC in the CID and
RID fields without affecting the existing option 82 stanza above?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171109/19a0d52b/attachment.html>


More information about the dhcp-users mailing list