Specify different pxeclients "next-server" for different subnet?

Jeffrey Hutzelman jhutz at cmu.edu
Fri Jan 9 21:31:39 UTC 2009

--On Friday, January 09, 2009 03:57:57 PM -0500 Drew Weaver 
<drew.weaver at thenap.com> wrote:

> Hi there.
> Is it possible to specify a different pxeclient "next-server" for each
> subnet?
> Currently I have this in my dhcpd.conf:
> class "pxeclients" {
>         match if substring(option vendor-class-identifier, 0, 9) =
> "PXEClient";         next-server;
>         filename "linux-install/pxelinux.0";
> }
> I need to be able to specify the next-server for pxeclients for each
> subnet.
> Currently, even though we have next-server in the subnet declaration it
> still uses
> Any ideas?

IIRC, options specified for a class will take precedence over those present 
in a subnet declaration.  If you want a next-server for the subnet to have 
effect, you'll have to remove the option from the class.

Alternately, if you want to override next-server only for PXE clients, but 
set it to a per-subnet value, then you can include in each subnet 
declaration a statement like

  set pxe_server =;

and in the class a statement like

  option server.next-server = pxe_server;

-- Jeff

More information about the dhcp-users mailing list