Logging circuit-id

Sean McMurray sean at mvtel.com
Wed Mar 18 14:55:16 UTC 2015


hmmm...

If that is true, it makes the documentation more suspect.
The docs say that the default mode for dhcpd is DHCPv6. Is that true?

On 03/18/2015 07:21 AM, perl-list wrote:
> I believe those log() features (as well as oncommit()) do not work in 
> DHCPv6 until 4.3.2
>
> ------------------------------------------------------------------------
>
>     *From: *"Sean McMurray" <sean at mvtel.com>
>     *To: *"Users of ISC DHCP" <dhcp-users at lists.isc.org>
>     *Sent: *Wednesday, March 18, 2015 10:03:30 AM
>     *Subject: *Re: Logging circuit-id
>
>     version 4.1.1
>     yes. it is DHCPv6, by default.
>
>     On 03/18/2015 06:21 AM, perl-list wrote:
>
>         What version of ISC DHCP, and is this DHCPv6 that you are
>         trying to log?
>
>         ------------------------------------------------------------------------
>
>             *From: *"Sean McMurray" <sean at mvtel.com>
>             *To: *"Users of ISC DHCP" <dhcp-users at lists.isc.org>
>             *Sent: *Tuesday, March 17, 2015 9:22:30 PM
>             *Subject: *Re: Logging circuit-id
>
>             I can tell it to log(error, "Hello") and it won't log.
>
>             On 03/17/2015 06:15 PM, perl-list wrote:
>
>
>                 Here is an example of how I have done it:
>
>                 if exists agent.circuit-id {
>
>                         log ( error,
>
>                 concat( "agent.circuit-id,", binary-to-ascii (10, 8,
>                 ".", leased-address),",",
>
>                     "circuit-id,",option agent.circuit-id,",",
>
>                 "time,",binary-to-ascii(10,32,"",encode-int
>                 (lease-time,32)),",",
>
>                 "hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7))
>
>                                 )
>
>                         );
>
>                 }
>
>
>                 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.
>
>                 ------------------------------------------------------------------------
>
>                     *From: *"Sean McMurray" <sean at mvtel.com>
>                     *To: *dhcp-users at lists.isc.org
>                     *Sent: *Tuesday, March 17, 2015 5:51:16 PM
>                     *Subject: *Logging circuit-id
>
>                     I would like my dhcpd logs to include circuit-id.
>                     I have tried to use log() directives in my conf
>                     file, but nothing I have
>                     tried works.
>
>                     Here is an example of a configuration I have
>                     included in a subnet:
>
>                        log(info, concat(
>                          " Mac: ",binary-to-ascii(16, 8, ":",
>                     substring(hardware,1, 6))
>                          ," IP: ",binary-to-ascii (10, 8, ".",
>                     leased-address)
>                          ,"Circuit: ",option agent.circuit-id
>                        ));
>
>
>                     Standard logging is working fine to record
>                     DHCPDISCOVER, DHCPOFFER, etc.
>                     I just can't get custom entries to show up in the log.
>
>                     _______________________________________________
>                     dhcp-users mailing list
>                     dhcp-users at lists.isc.org
>                     https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>
>                 _______________________________________________
>                 dhcp-users mailing list
>                 dhcp-users at lists.isc.org
>                 https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>             _______________________________________________
>             dhcp-users mailing list
>             dhcp-users at lists.isc.org
>             https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>
>         _______________________________________________
>         dhcp-users mailing list
>         dhcp-users at lists.isc.org
>         https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>     _______________________________________________
>     dhcp-users mailing list
>     dhcp-users at lists.isc.org
>     https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150318/fe02c9c8/attachment.html>


More information about the dhcp-users mailing list