<div dir="ltr"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">I want to store client identifier in the server so that the server can refer to that value later on while trying to lease IP addresses to other clients.  </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">Each client sends out an identifier and if another client shows up with the same identifier, I assign them hostnames based on that identifier. ( Only 2 different identifiers are possible so I only need to store two identifiers).</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">This is what I added to the server to store this.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">#space to store the identifiers</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">option space local code width 2 length width 2;</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">option local.identifier1 code 1 = unsigned integer 8;</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">option local.identifier2 code 2 = unsigned integer 8;</span><div><br></div><div>#Custom option identifier sent by the client</div><div>option identifier code 189 = unsigned integer 8;</div><div>option switch code 190 = unsigned integer 8;<br><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">/// Storing  based on what client sent</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">class "acs"</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">  match if option dhcp-client-identifier = "ACS";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">if option switch = 1</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "acs-01";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option local.identifier1 = option identifier;</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">elsif option switch = 2</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "acs-02";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option local.identifier2 =  option identifier;</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">else</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "bos-cart-unknown";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">#Matching if the identifier matches or not.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">class "sra"</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">  match if option dhcp-client-identifier = "SRA";</span></div><div><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"># If what was sent matches what currently is<br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">if option local.identifier1 = option identifier</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "sra-01";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">elsif option local.identifier2 = option identifier</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "sra-02";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">else</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">        option host-name "bos-sra-unknown";</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">}</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">However this doesn't work and the second client always gets the hostname bos-sra-unknown.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">Please let me know if I am doing something wrong here / there is a different way to approach this.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:16px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">Thanks</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:16px">vipul </span><br></div></div>