pxe clients and pools

Brendan Kearney bpk678 at gmail.com
Sat Oct 15 18:17:59 UTC 2016


list members,

i have a bit of a quandary.  i use dhcp and pxe to build machines and 
that is working well.  once the machine is built, i have the machine on 
the same subnet, but want it to get an IP from a different pool.  this 
does not seem to be happening, and i am looking for a best practice.  
take the below config:

subnet 192.168.1.0 netmask 255.255.255.0 {
         allow client-updates;
         default-lease-time 7200;
         max-lease-time 86400;
         one-lease-per-client true;
         ping-check true;
         option domain-name "bpk2.com";
         option subnet-mask 255.255.255.0;
         option broadcast-address 192.168.1.255;
         option routers 192.168.1.254;
         option domain-name-servers ns01.bpk2.com,ns02.bpk2.com;
         option ntp-servers ntp.bpk2.com;
         option netbios-name-servers nas.bpk2.com;
         option wpad-url "http://wpad.bpk2.com/wpad.dat ";
         ddns-domainname "bpk2.com";
         # ignore bootp;

         pool {
                 # KNOWN HOSTS - COMPUTERS
                 # HOSTS IN THIS POOL MUST USE THE PROXY FOR INTERNET 
ACCESS, PER FIREWALL POLICY
                 class "MSFT" {
                         match if option vendor-class-identifier ~= "^MSFT";
                         vendor-option-space MSFT;
                         option MSFT.disable-netbios 2;
                 }
                 range 192.168.1.50 192.168.1.99;
                 allow members of "proxied-clients";
                 failover peer "dhcp-failover";
         } # END POOL

         pool {
                 # KNOWN HOSTS - GADGETS
                 # HOSTS IN THIS POOL CAN USE THE PROXY FOR INTERNET 
ACCESS, BUT DO NOT HAVE TO, PER FIREWALL POLICY
                 #max-lease-time 300;
                 class "MSFT" {
                         match if option vendor-class-identifier ~= "^MSFT";
                         vendor-option-space MSFT;
                         option MSFT.disable-netbios 2;
                 }
                 range 192.168.1.100 192.168.1.149;
                 allow members of "unproxied-clients";
                 failover peer "dhcp-failover";
         } # END POOL

         pool {
                 # UNKNOWN HOSTS
                 # HOSTS IN THIS POOL CAN USE THE PROXY FOR INTERNET 
ACCESS, BUT DO NOT HAVE TO, PER FIREWALL POLICY
                 #max-lease-time 300;
                 class "MSFT" {
                         match if option vendor-class-identifier ~= "^MSFT";
                         vendor-option-space MSFT;
                         option MSFT.disable-netbios 2;
                 }
                 range 192.168.1.150 192.168.1.199;
                 allow unknown-clients;
                 failover peer "dhcp-failover";
         } # END POOL

         pool {
                 # PXE BOOT HOSTS
                 # HOSTS IN THIS POOL ARE BOOTED FROM THE PXE SERVER
                 #max-lease-time 300;
                 # allow booting;
                 # allow bootp;
                 class "pxe-clients" {
                         match if substring(option 
vendor-class-identifier, 0, 9) = "PXEClient";
                         next-server tftp.bpk2.com;
                         filename "linux-install/pxelinux.0";
                 }
                 range 192.168.1.200 192.168.1.249;
                 failover peer "dhcp-failover";
         } # END POOL
} # END SUBNET

i built a machine, and it is defined as a member of the 
"proxied-clients" subclass, based on hardware identifier or mac 
address.  what happens is NetworkManager issues a DHCPREQUEST for the IP 
it has or had last.  Even if i were to clear the leases from the dhcp 
servers, NM would still request an IP from the pxe client range.

how can i manage this so that i can have pxe clients in the one pool 
when needed, but once they are done building, they get an ip from an 
appropriate pool, based on the criteria of that pool?

thanks,

brendan



More information about the dhcp-users mailing list