<div dir="ltr">Hi<div>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.</div>
<div><div><br></div><div>on commit {</div><div>        if option dhcp6.ia-na = option dhcp6.ia-na{</div><div><span class="" style="white-space:pre">            </span>set iana = binary-to-ascii(16,16,":",substring(suffix(option dhcp6.ia-na,24),0,16));</div>
<div><span class="" style="white-space:pre">    </span>}</div><div><span class="" style="white-space:pre">  </span>if option dhcp6.ia-pd = option dhcp6.ia-pd{</div><div><span class="" style="white-space:pre">        </span>        set iapd = binary-to-ascii(16,16,":", suffix(option dhcp6.ia-pd,16));</div>
<div><span class="" style="white-space:pre">            </span>set pdsize = binary-to-ascii(10,8,":",substring(suffix(option dhcp6.ia-pd,17),0,1));</div><div><span class="" style="white-space:pre">     </span>}</div><div><br>
</div><div><span class="" style="white-space:pre">        </span>set cm = v6relay(1, (binary-to-ascii(16, 8, ":", option docsis.cm-mac-address)));</div><div><span class="" style="white-space:pre">        </span>set ifname = v6relay(1, option dhcp6.interface-id);</div>
<div><span class="" style="white-space:pre">    </span>set lla = (binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6)));</div><div><br></div><div>        if option dhcp6.ia-na = option dhcp6.ia-na{</div><div>
<span class="" style="white-space:pre">               </span>log(info, concat("ONCOMMIT IA_NA: ", iana, " To: ", lla, " CM-mac: ", cm, " INT: ", ifname));</div><div><span class="" style="white-space:pre">      </span>}</div>
<div><span class="" style="white-space:pre">    </span>if option dhcp6.ia-pd = option dhcp6.ia-pd{</div><div><span class="" style="white-space:pre">                </span>log(info, concat("ONCOMMIT IA_PD: ", iapd, "/", pdsize, " To: ", lla, " CM-mac: ", cm, " INT: ", ifname));</div>
<div><span class="" style="white-space:pre">    </span>}</div><div>    }</div></div><div><br></div><div><br></div><div>BestRegards</div><div>Espen Tallaksen</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jan 30, 2014 at 8:35 AM, Markus Varjola <span dir="ltr"><<a href="mailto:markus@varjola.net" target="_blank">markus@varjola.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Hello.<div><br></div><div>If anyone has managed to write something additional to the dhcpd6.lease file could you post</div><div>an example of how you did it?</div><div><br></div><div>We have been having some major problems achieving this. We are using the latest 4.3.0rc1</div>
<div>and have managed to log some of the important options with v6relay command, but getting</div><div>something into the lease file other than the normal output has been a failure.</div><div><br></div><div>Other viable solution would be to build a lease like file by outputting some of the logging information</div>
<div>to a different file, but achieving that has also eluded us. </div><div><br></div><div>The unfortunate part is that we can not take IPv6 into production until the right conditions are met</div><div>and logging certain options is a necessity.</div>
<div><br></div><div>So anyone? Any real working examples of gathering dhcp6.options to the lease file or some other</div><div>permanent record?</div><div><br></div><div>Thanks in advance.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-Markus Varjola</div>                                      </font></span></div></div>
<br>_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></blockquote></div><br></div>