DHCPv6 options to lease

Markus Varjola markus at varjola.net
Thu Jan 30 10:56:40 UTC 2014



You Sir, are awesome.
I hereby declare our utmost appreciation for you.
-Markus Varjola
Date: Thu, 30 Jan 2014 10:45:14 +0100
Subject: Re: DHCPv6 options to lease
From: espen.tallaksen at gmail.com
To: dhcp-users at lists.isc.org

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

BestRegardsEspen 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 postan 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 gettingsomething 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 metand logging certain options is a necessity.

So anyone? Any real working examples of gathering dhcp6.options to the lease file or some otherpermanent record?
Thanks in advance.

-Markus Varjola 		 	   		  

_______________________________________________

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/20140130/fa074a5c/attachment.html>


More information about the dhcp-users mailing list