How can I overwrite global RIS server indecater

Steven Carr sjcarr at gmail.com
Tue Nov 19 08:55:24 UTC 2013


On 19 November 2013 07:46, Julie Xu <xll40 at hotmail.com> wrote:
>
> at global, I have configure:
>
>
> class "windowRIS" {
>
>      match if substring( option vendor-class-identifier, 0, 9 ) =
> "PXEClient";
>
>     option vendor-class-identifier "PXEClient";
>
>     server-identifier 10.10.10.2;
>
>   }
>
>
> now on one subnet I want the server as 10.1.1.3
> I have done:
>    subnet 10.1.1.0 netmask 255.255.254.0 {
>         option broadcast-address 10.1.2.255;
>         option routers 10.1.1.1;
>         pool {
>             failover “failover”
>     server-identifier 10.1.1.3;
>             deny dynamic bootp clients;
>             range 10.1.1.20 10.1.2.254;
>         }
> but, the client still insist to use 10.10.10.2, what I did wrong?

The order is host, class, pool, subnet, shared-network.

http://manpages.ubuntu.com/manpages/trusty/man5/dhcpd.conf.5.html

"When a client is to be booted, its boot parameters  are  determined  by
consulting that client's host declaration (if any), and then consulting
any class declarations matching  the  client,  followed  by  the  pool,
subnet  and  shared-network declarations for the IP address assigned to
the client.   Each  of  these  declarations  itself  appears  within  a
lexical scope, and all declarations at less specific lexical scopes are
also consulted for  client  option  declarations.    Scopes  are  never
considered  twice,  and  if  parameters  are  declared in more than one
scope, the parameter declared in the most specific  scope  is  the  one
that is used."

So in your case "class" is more specific than "subnet", so class will
win, you can't override for the subnet. If you want to override then
it would need to be in a host declaration.

Steve


More information about the dhcp-users mailing list