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

Drew Weaver drew.weaver at thenap.com
Fri Jan 9 21:56:16 UTC 2009

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;


Hi Jeff, and thanks for the idea.

class "pxeclients" {
        match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
        option server.next-server = pxe_server;
        filename "linux-install/pxelinux.0";
subnet netmask {
        option routers;
        option domain-name-servers;
        set pxe_server = "";

I added the above and it doesn't seem to work, was that pseudo config or should that have worked?

By 'didn't work' I mean that the dhcpd server didn't send a next-server.

I also tried replacing option server.next-server = pxe_server; with next-server pxe_server;


More information about the dhcp-users mailing list