<html><body>
<p>Hello,</p>
<p>I’m trying to find the appropriate logic to allow both Option 82 based static allocations to mix with dynamic allocations.</p>
<p>Right now, my setup looks like so and it works just fine.  Nice and simple for dynamic allocations.</p>
<p>class “rgw01.lab” {</p>
<pre>match if (substring(option agent.remote-id,2,9) = "rgw01.lab");
spawn with option agent.circuit-id;</pre>
<p>}</p>
<p>shared-network RGW01_LAB-RESI_INET {</p>
<pre>default-lease-time 180;
option ip-forwarding off;
subnet 192.168.63.192 netmask 255.255.255.248 {
  option dhcp-server-identifier 192.168.63.193;
  option routers 192.168.63.193;
  pool {
    allow members of "rgw01.lab";
    range 192.168.63.194 192.168.63.198;
    failover peer "failover";
  }
}</pre>
<p>}</p>
<p>shared-network blah {</p>
<pre>subnet 1.1.1.0 netmask 255.255.255.0 {
  pool{
    allow members of "rgw01.lab”;
    range 1.1.1.2 1.1.1.254
  }
}</pre>
<p>}</p>
<p>shared-network blah {</p>
<pre>subnet 2.2.2.0 netmask 255.255.255.0 {
  pool{
    allow members of "rgw01.lab”;
    range 2.2.2.2 2.2.2.254
  }
}</pre>
<p>}</p>
<p>Now, I have a requirement to add static allocations to this as well.  I drew up a config, but I believe there is a logic conflict because technically a match for class “CustomerOnPort2/1” is also a match for class "rgw01.lab”, so a request that I intended to be managed by subnet 10.0.0.0 could very well be managed by subnet 192.168.63.192 instead.</p>
<p>Does anyone have any clues on what DHCP hooks I might be able to employ here in a simple and elegant way to remove this conflict, thus having the client managed from the intended pool?</p>
<p>My hope is that the solution can be much simpler and more elegant than having to add a 'ignore (or deny) members of CustomerOnPortX/X’ for each of those customer classes to the pool that allows members of “rgw01.lab”.</p>
<p>Here’s what I drew up..</p>
<p>class “CustomerOnPort2/1" {</p>
<pre>match if (substring(option agent.remote-id,2,9) = "rgw01.lab") and
binary-to-ascii (10, 8, "", suffix ( option agent.circuit-id, 2)) = "21";
spawn with option agent.circuit-id;</pre>
<p>}</p>
<p>class “CustomerOnPort2/2” {</p>
<pre>match if (substring(option agent.remote-id,2,9) = "rgw01.lab") and
binary-to-ascii (10, 8, "", suffix ( option agent.circuit-id, 2)) = "22";
spawn with option agent.circuit-id;</pre>
<p>}</p>
<p>class “rgw01.lab” {</p>
<pre>match if (substring(option agent.remote-id,2,9) = "rgw01.lab");
spawn with option agent.circuit-id;</pre>
<p>}</p>
<p>shared-network RGW01_LAB-RESI_INET {</p>
<pre>default-lease-time 180;
option ip-forwarding off;
subnet 192.168.63.192 netmask 255.255.255.248 {
  option dhcp-server-identifier 192.168.63.193;
  option routers 192.168.63.193;
  pool {
    allow members of "rgw01.lab";
    range 192.168.63.194 192.168.63.198;
    failover peer "failover";
  }
subnet 10.0.0.0 netmask 255.255.255.0 {
  option dhcp-server-identifier 10.0.0.1;
  option routers 10.0.0.1;
     pool { range 10.0.0.2; allow members of "CustomerOnPort2/1"; }
     pool { range 10.0.0.3; allow members of “CustomerOnPort2/2"; }
}</pre>
<p>}</p>
<p>shared-network blah {</p>
<pre>subnet 1.1.1.0 netmask 255.255.255.0 {
  pool{
    allow members of "rgw01.lab”;
    range 1.1.1.2 1.1.1.254
  }
}</pre>
<p>}</p>
<p>shared-network blah {</p>
<pre>subnet 2.2.2.0 netmask 255.255.255.0 {
  pool{
    allow members of "rgw01.lab”;
    range 2.2.2.2 2.2.2.254
  }
}</pre>
<p>}</p>
<p>I trust this makes sense, and that I provided an appropriate amount of problem description and supporting work.</p>
<p>Thanks much in advance for your consideration.</p>

<img src="https://u3172041.ct.sendgrid.net/wf/open?upn=ACCrv1YsmRk7OIFHorUWbOb2iWQKFbpLYqhz6zRekANRGhfWEyZv-2FGnPUTVJr1-2Bi1NJqR0T-2Fuas9qSZ6Rxu6TGjr-2BaZkSFgt0EtsTakpqGyJKaCoE9c-2F0RS4zNkHusB77skYkNEEcUf1HR8vi0XViH1v-2FcbpZyYdQ-2BBuicmXPo9v08osalN8yYOgIYFBnd2PicGNlpz1fYpx5TnBPGVcci4KDZu7KFpN-2BIQKG3fviqY-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>