Conditional expression inside pool
Sharkey, Patrick M.
psharkey at draper.com
Thu Feb 1 13:47:56 UTC 2007
What is the correct syntax for conditionally setting the next-server and
filename directives inside a pool?
I have one subnet defined where I permit unknown clients to obtain a
lease. This is to accommodate systems performing a PXE boot. However, I
discovered that known clients were unable to obtain a lease when PXE
booting, so I added the next-server and filename directives to the known
clients pool. I would prefer to conditionally set these directives if
the client is a member of class "PXE" as defined below:
class "PXE" {
match if substring (option vendor-class-identifier, 0, 9) =
"PXEClient";
}
As it stands, all known clients receive the next-server and filename
options in the response (regardless of whether they PXE boot or not).
Although this does not appear to cause a problem, it is not ideal.
subnet 192.168.152.0 netmask 255.255.254.0 {
option routers 192.168.153.254;
# Unknown clients get this pool.
pool {
allow members of "PXE";
deny dynamic bootp clients;
max-lease-time 7200;
range 192.168.153.60 192.168.153.109;
allow unknown-clients;
next-server 192.168.153.26;
filename "OSChooser\\i386\\startrom.com";
}
# Known clients get this pool.
pool {
deny dynamic bootp clients;
max-lease-time 28800;
range 192.168.153.110 192.168.153.199;
deny unknown-clients;
next-server 192.168.153.26;
filename "OSChooser\\i386\\startrom.com";
}
}
What I would like to know is how to wrap the following directives in a
conditional (member of class "PXE"):
next-server 192.168.153.26;
filename "OSChooser\\i386\\startrom.com";
Thanks in advance.
More information about the dhcp-users
mailing list