<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I think Chris is right about the classes being mapped first.<br>
    <br>
    Try a group:<br>
    <font color="#993300"><tt>group {</tt><tt><br>
      </tt><tt>  option ntp-servers ntp.mydomain.com;</tt><tt><br>
      </tt><tt>  option tftp-server-name <a class="moz-txt-link-rfc2396E" href="https://tftp.mydomain.com">"https://tftp.mydomain.com"</a>'</tt><tt><br>
      </tt><tt>  default-lease-time 600;</tt><tt><br>
      </tt><tt>  max-lease-time 600;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  host tel132 {</tt><tt><br>
      </tt><tt>    hardware ethernet 12:04:13:87:1c:41;</tt><tt><br>
      </tt><tt>    fixed-address 172.30.20.32;</tt><tt><br>
      </tt><tt>    option host-name "phone132";</tt><tt><br>
      </tt><tt>  }</tt><tt><br>
      </tt></font><font color="#993300"><tt><font color="#993300"><tt> 
            host tel133 {</tt><tt><br>
          </tt><tt>    hardware ethernet 12:04:13:87:1c:42;</tt><tt><br>
          </tt><tt>    fixed-address 172.30.20.33;</tt><tt><br>
          </tt><tt>    option host-name "phone133";</tt><tt><br>
          </tt><tt>  }</tt><tt><br>
          </tt></font>}</tt><tt><br>
      </tt></font><br>
    Bill<br>
    <br>
    <div class="moz-cite-prefix">On 11/15/2017 1:18 PM, Chris Buxton
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:714C0906-D5B2-480F-9184-BB6AB6DD69EE@buxtonfamily.us">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class="">Classes will work the way you think they should,
        with one exception. Client devices are mapped to classes before
        options values are set. Therefore, you won't be able to match on
        a hostname that you set in a host declaration, only on the
        hostname sent by the phone in its request.</div>
      <div class=""><br class="">
      </div>
      <div class="">It might be better to just match on MAC addresses,
        since that's effectively what you want to do anyway. Something
        like this (untested):</div>
      <div class=""><br class="">
      </div>
      <div class="">class "phones" {</div>
        option ntp-servers <a href="http://ntp.mydomain.com" class=""
        moz-do-not-send="true">ntp.mydomain.com</a>;<br class="">
        option tftp-server-name "<a href="https://tftp.mydomain.com"
        class="" moz-do-not-send="true">https://tftp.mydomain.com</a>";<br
        class="">
        default-lease-time 600;<br class="">
        max-lease-time 600;<br class="">
      <div class="">  match hardware;</div>
      <div class="">}</div>
      <div class=""><br class="">
      </div>
      <div class="">subclass "phones" 1:12:04:13:87:1c:41; # host
        phone132</div>
      <div class=""><br class="">
      </div>
      <div class="">Note that the hardware field is 7 octets long,
        including a leading 1 that is there for historical reasons.</div>
      <div class=""><br class="">
      </div>
      <div class="">Regards,</div>
      <div class="">Chris</div>
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">On Nov 15, 2017, at 8:42 AM, <a
              href="mailto:MA2412@gmx.de" class=""
              moz-do-not-send="true">MA2412@gmx.de</a> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div class="">
              <div style="font-family: Verdana;font-size: 12.0px;"
                class="">
                <div class="">Hello, i have a central dhcp server
                  serving multiple remote networks. I want to assign the
                  same group of options to Clients wo are on different
                  Networks, based on MAC adress or better on hostnames.
                  I tried to solve it over a "class" declaration, but it
                  seams that classes are only woking in conjunction with
                  "pools" or "subnets" or "ranges", a class declaration
                  itself has no effect is this correkt?</div>
                <div class=""> </div>
                <div class="">For example i try:</div>
                <div class=""> </div>
                <div class="">
                  <div class="">class "phones" {<br class="">
                      option ntp-servers <a
                      href="http://ntp.mydomain.com" class=""
                      moz-do-not-send="true">ntp.mydomain.com</a>;<br
                      class="">
                      option tftp-server-name "<a
                      href="https://tftp.mydomain.com" class=""
                      moz-do-not-send="true">https://tftp.mydomain.com</a>";</div>
                  <div class="">  default-lease-time 600;<br class="">
                      max-lease-time 600;<br class="">
                      match host-name;</div>
                  <div class="">}</div>
                  <div class=""> </div>
                  <div class="">host tel132 {<br class="">
                       hardware ethernet 12:04:13:87:1c:41;<br class="">
                       fixed-address 172.30.20.32;<br class="">
                       option host-name "phone132";<br class="">
                    #Location: office<br class="">
                    }<br class="">
                    subclass "phones" "phone132";<br class="">
                     </div>
                  <div class=""> </div>
                  <div class="">The phone should get a fixed IP adress
                    and the options defined in the class.</div>
                  <div class="">I also tried the following declaration:</div>
                  <div class=""> </div>
                  <div class="">
                    <div class="">class "phones" {<br class="">
                        option ntp-servers <a
                        href="http://ntp.mydomain.com" class=""
                        moz-do-not-send="true">ntp.mydomain.com</a>;<br
                        class="">
                        option tftp-server-name "<a
                        href="https://tftp.mydomain.com" class=""
                        moz-do-not-send="true">https://tftp.mydomain.com</a>";</div>
                    <div class="">  default-lease-time 600;<br class="">
                        max-lease-time 600;<br class="">
                        match if substring(option host-name,0,7) =
                      "phone132";<br class="">
                      }<br class="">
                      host tel132 {<br class="">
                         hardware ethernet 12:04:13:87:1c:41;<br
                        class="">
                         fixed-address 172.30.20.32;<br class="">
                         option host-name "phone132";<br class="">
                      #Location: office<br class="">
                      }</div>
                    <div class=""> </div>
                    <div class="">Should have the same effect, but also
                      des not work, as expected above, i thind class
                      declaration does not work if not assigned to a
                      pool or subnet or range.</div>
                    <div class=""> </div>
                    <div class="">Can a client be assigned to multiple
                      classes, is this possible or can a client only be
                      member of one class?</div>
                    <div class=""> </div>
                    <div class="">Thanks for your help!!</div>
                  </div>
                </div>
              </div>
            </div>
            _______________________________________________<br class="">
            dhcp-users mailing list<br class="">
            <a href="mailto:dhcp-users@lists.isc.org" class=""
              moz-do-not-send="true">dhcp-users@lists.isc.org</a><br
              class="">
            <a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></div>
        </blockquote>
      </div>
      <br class="">
      <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>