Community discussions

 
FIPTech
Member
Member
Topic Author
Posts: 469
Joined: Tue Dec 22, 2009 1:53 am

Variable to read DHCP client options in a DHCP server lease script

Sun Oct 28, 2018 2:38 pm

Are there variables available to read DHCP client options in a DHCP server lease script ?

I would need to read the User Class option (code 77), to break the iPXE loop when booting an iPXE client (chainloading from a TFTP boot file).

https://ipxe.org/howto/dhcpd#pxe_chainloading

This is to select the boot file according to the client user class. After client TFTP PXE booting loading the iPXE code, a new boot file need to be presented by the DHCP server when the client request a second DHCP offer for the following iSCSI or http boot.


For example :
if exists user-class and option user-class = "iPXE" {
      filename "http://my.web.server/real_boot_script.php";
  } else {
      filename "undionly.kpxe";
  }

Who is online

Users browsing this forum: No registered users and 4 guests