<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<base href="x-msg://557/"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2069107130;
        mso-list-template-ids:-1658964074;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yeah, that works! But it points out that I have hit yet another dead-end. I can’t use a variable that I construct
 as a host-identifier to provide a fixed address to the client.. I’ve been battling this for a week now and am becoming more convinced by the day that you just can’t get there from here with the current dhcpd.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">(background: I’m trying to use DHCP option 82 to assign fixed IP address to any device that asks for an address
 on a specific port on a switch, and agent.circuit-id is not globally unique, but  a combination of agent.remote-id and agent.circuit-id would be. Unfortunately, there doesn’t appear to be any way to concatenate them at the server and use that as a reference
 to assign a fixed IP or pool of 1. Hostidentifier allows ‘option <any option>’ but does not allow option <config-option> <…>)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></font></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
 dhcp-users-bounces+douglas.hughes=deshawresearch.com@lists.isc.org [mailto:dhcp-users-bounces+douglas.hughes=deshawresearch.com@lists.isc.org]
<b><span style="font-weight:bold">On Behalf Of </span></b>Michal Kostenec<br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, October 10, 2013 2:07 AM<br>
<b><span style="font-weight:bold">To:</span></b> Users of ISC DHCP<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: problems with log and options that are set.<o:p></o:p></span></font></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Hi Doug,<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">try change directive 'option' to  'config-option' in log function:<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">log (info, concat ("DHCPAGENT assigning user-class1: ", config-option porthash));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Regards<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Michal.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On 9. 10. 2013, at 20:25, "Hughes, Doug" <<a href="mailto:Douglas.Hughes@DEShawResearch.com">Douglas.Hughes@DEShawResearch.com</a>> wrote:<o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br>
<o:p></o:p></span></font></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Shouldn’t it work to set an option and then log what was set? Or to set any arbitrary (temporary) variable that you’ve
 created? I want to dynamically build a variable and then use that for the host identifier match to hand out a fixed address based upon the agent.remote-id *<b><span style="font-weight:bold">AND</span></b>* agent.circuit-id.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I see from googling for the last week that a lot of people have tried this with varying degrees of hackishness and
 success since the dhcpd doesn’t support this directly. I’ve tried subclassing, but you can’t do an allow from a subclass for a pool of 1 IP (another hack). I’ve even looked at patches released in the past for this problem.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">But, back to the specific problem, one of debugging.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Take this statement:<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">option porthash code 214 = text;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">if exists agent.circuit-id<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">{<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">        if option agent.circuit-id ~= ":" {<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                log (info, concat ("DHCPAGENT ", "stuff"));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                log (info, concat ("DHCPAGENT lease of ", binary-to-ascii (10,8, ".", leased-address), " for agent
 ", option agent.remote-id, " on ", option agent.circuit-id));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                option porthash = concat(substring(option agent.remote-id,0,10), "_", substring(option agent.circuit-id,
 0, 10));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                log (info, concat ("DHCPAGENT assigning user-class1: ", option porthash));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                log (info, concat ("DHCPAGENT assigning user-class2: ", option agent.remote-id, "_", option agent.circuit-id
 ));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">                log (info, concat ("DHCPAGENT", " post"));<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">       }<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">}<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It prints:<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">DHCPAGENT stuff<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">DHCPAGENT lease of 1.1.2.3 for agent s55-test on 53:0:26<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">DHCPAGENT assigning user-class2: s55-test_53:0:26<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">DHCPAGENT post<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">So:<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I have proven (to myself at least) that:<o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Symbol"><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">        
</span></font></span></span></font><![endif]><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">the concatenation of agent.remote-id “_” and agent.circuit-id is a string.<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Symbol"><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">        
</span></font></span></span></font><![endif]><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The above string will log correctly<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Symbol"><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">        
</span></font></span></span></font><![endif]><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">If I use any option (pre-existing, or defined. I have tried this with dhcp-client-identifier which is pre-defined) the
 log will fail, silently<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Symbol"><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">        
</span></font></span></span></font><![endif]><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">If I use any temporary variable in the log statement that I assign instead of the porthash example above, it will fail.<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Can anybody explain what is going on with the silent failure of the log statement? Why doesn’t it log? Why doesn’t
 it generate any error or output at all about the failure<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Of the log?  This makes debugging quite difficult…<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Calibri"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><font size="4" face="Helvetica"><span style="font-size:13.5pt;font-family:"Helvetica","sans-serif"">_______________________________________________<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">https://lists.isc.org/mailman/listinfo/dhcp-users</a><o:p></o:p></span></font></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>