<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks for your reply.<br>
      <br>
      I would like the flexibility of putting different options in the
      classes and pulling them all together in the "Printers" class. 
      That way there is just one <font color="#993300">allow members of
        "Printers";</font> in each pool.  We have a lot of different RF
      guns from several vendors where this might come in handy.<br>
      <br>
      Yeah, I could repeat the  <tt><font color="#993300">substring(hardware,
          1,3)<font color="#000000"> </font></font></tt> in the
      "Printers" class but was wanting to know if that could be avoided.<br>
      <br>
      The ISC DHCP server is so configurable I was thinking maybe it was
      possible.  I wish the documentation had more examples.  It took me
      hours to figure out:<br>
      <font color="#993300">class "NoName" {<br>
                match if not (<br>
                        exists server.ddns-hostname<br>
                        or exists fqdn<br>
                        or exists host-name<br>
                );<br>
                set member_of = "NoName";<br>
        <br>
                ddns-hostname = concat("NoName-", binary-to-ascii(16, 8,
        "", substring(hardware, 4, 3)));<br>
                option dhcp.host-name = config-option
        server.ddns-hostname;<br>
        }</font><br>
      which works although I'm not sure everything in the match
      statement is 100% correct.<br>
      <br>
      I use a couple of variables to I can log decisions:<br>
      <font color="#993300">                        ,"  MemberOf:",
        pick-first-value(member_of, "(none)")<br>
                                ,"  PoolType:",
        pick-first-value(pool_type, "(none)")<br>
      </font><br>
      Bill<br>
      <br>
      <br>
      On 9/29/2014 4:32 PM, Patrick Trapp wrote:<br>
    </div>
    <blockquote
cite="mid:1D507D610594D14F86D40D77C17E9E661A0803C9@EXCHANGEDSB.ruralnex.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">I don't know, but honestly, in my case
        here, I've just included the "match if" from the subgroup again
        to include the device in the larger group and used comments to
        indicate what that subgroup was.<br>
        <br>
        I presume you have something that needs to happen to members of
        some subgroups and something different that needs to happen to
        members of other subgroups, but you have something in common
        that needs to happen to all of them?<br>
        <br>
        Patrick<br>
        <br>
        <div style="font-family: Times New Roman; color: #000000;
          font-size: 16px">
          <hr tabindex="-1">
          <div style="direction: ltr;" id="divRpF582211"><font
              color="#000000" face="Tahoma" size="2"><b>From:</b>
              <a class="moz-txt-link-abbreviated" href="mailto:dhcp-users-bounces@lists.isc.org">dhcp-users-bounces@lists.isc.org</a>
              [<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users-bounces@lists.isc.org">dhcp-users-bounces@lists.isc.org</a>] on behalf of Bill
              Shirley [<a class="moz-txt-link-abbreviated" href="mailto:Bill@Henagar.PolymerIndustries.biz">Bill@Henagar.PolymerIndustries.biz</a>]<br>
              <b>Sent:</b> Monday, September 29, 2014 3:28 PM<br>
              <b>To:</b> Users of ISC DHCP<br>
              <b>Subject:</b> Class matching<br>
            </font><br>
          </div>
          <div><tt>Is there a way to include a device in a class based
              on its membership in another class?:<br>
              <font color="#993300">class "Kyocera" {<br>
                        match if substring(hardware, 1,3) = 00:c0:ee;<br>
                        set member_of = "Kyocera";<br>
                }<br>
                class "Brother" {<br>
                        match if substring(hardware, 1,3) = 30:05:5C;<br>
                        set member_of = "Brother";<br>
                }</font><br>
              <br>
              Such as:<br>
              <font color="#993300">class "Printers" {<br>
                        match if (<br>
                            option server.class = "Kyocera"<br>
                            or option server.class = "Brother"<br>
                        );<br>
                }</font><br>
              if so, what do a replace "<font color="#993300">option
                server.class</font>" with?<br>
              <br>
              I've also tried using the variable "member_of" set above:<br>
              <font color="#993300">class "Printers" {<br>
                       match if (<br>
                               member_of = "Kyocera"<br>
                               or member_of = "Brother"<br>
                       );<br>
                }</font><br>
              which doesn't work.<br>
              <br>
              TIA,<br>
              Bill<br>
              <br>
            </tt></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>