DHCPv6 options to lease

espen.tallaksen espen.tallaksen at gmail.com
Thu Jan 30 09:45:14 UTC 2014


Hi
I did it like this (see under), docsis-things might not be applicable to
you. Maybe you want/need to remove or change it to something else. This
config is actually running on the alfa release as of today. It will do both
logging and set some additional attributes to the object in the lease-file.

on commit {
        if option dhcp6.ia-na = option dhcp6.ia-na{
set iana = binary-to-ascii(16,16,":",substring(suffix(option
dhcp6.ia-na,24),0,16));
}
if option dhcp6.ia-pd = option dhcp6.ia-pd{
        set iapd = binary-to-ascii(16,16,":", suffix(option
dhcp6.ia-pd,16));
set pdsize = binary-to-ascii(10,8,":",substring(suffix(option
dhcp6.ia-pd,17),0,1));
}

set cm = v6relay(1, (binary-to-ascii(16, 8, ":", option
docsis.cm-mac-address)));
set ifname = v6relay(1, option dhcp6.interface-id);
set lla = (binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6)));

        if option dhcp6.ia-na = option dhcp6.ia-na{
log(info, concat("ONCOMMIT IA_NA: ", iana, " To: ", lla, " CM-mac: ", cm, "
INT: ", ifname));
}
if option dhcp6.ia-pd = option dhcp6.ia-pd{
log(info, concat("ONCOMMIT IA_PD: ", iapd, "/", pdsize, " To: ", lla, "
CM-mac: ", cm, " INT: ", ifname));
}
    }


BestRegards
Espen Tallaksen


On Thu, Jan 30, 2014 at 8:35 AM, Markus Varjola <markus at varjola.net> wrote:

> Hello.
>
> If anyone has managed to write something additional to the dhcpd6.lease
> file could you post
> an example of how you did it?
>
> We have been having some major problems achieving this. We are using the
> latest 4.3.0rc1
> and have managed to log some of the important options with v6relay
> command, but getting
> something into the lease file other than the normal output has been a
> failure.
>
> Other viable solution would be to build a lease like file by outputting
> some of the logging information
> to a different file, but achieving that has also eluded us.
>
> The unfortunate part is that we can not take IPv6 into production until
> the right conditions are met
> and logging certain options is a necessity.
>
> So anyone? Any real working examples of gathering dhcp6.options to the
> lease file or some other
> permanent record?
>
> Thanks in advance.
>
> -Markus Varjola
>
> _______________________________________________
> 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/20140130/ac32b152/attachment.html>


More information about the dhcp-users mailing list