<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><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="">ntp.mydomain.com</a>;<br class=""> option tftp-server-name "<a href="https://tftp.mydomain.com" class="">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="">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="">ntp.mydomain.com</a>;<br class="">
option tftp-server-name "<a href="https://tftp.mydomain.com" class="">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="">ntp.mydomain.com</a>;<br class="">
option tftp-server-name "<a href="https://tftp.mydomain.com" class="">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="">dhcp-users@lists.isc.org</a><br class="">https://lists.isc.org/mailman/listinfo/dhcp-users</div></blockquote></div><br class=""></body></html>