DHCP user class setting




Type String
DHCP option number 77
ISC dhcpd syntax option user-class


Specify a custom DHCP user class

  iPXE> set user-class thinclient

Detect the DHCP user class in ISC dhcpd

  # in /etc/dhcpd.conf
  if exists user-class and option user-class = "thinclient" {
      filename "thinclient.ipxe";

Avoid an infinite loop when chainloading

  # in /etc/dhcpd.conf
  if exists user-class and option user-class = "iPXE" {
      filename "http://my.web.server/real_boot_script.php";
  } else {
      filename "undionly.kpxe";


Specifies the user class sent by iPXE in DHCP requests. If no user class has been explicitly specified, iPXE will send the user class “iPXE”.

The DHCP user class can be used to identify groups of related clients to the DHCP server.

See also


The DHCP user class can be used to avoid the problem of an infinite loop when chainloading iPXE from an existing PXE ROM.

RFC 3004 defines the DHCP user class as a set of length-value tuples, but iPXE treats it as a string.1) You can choose to manually construct a value which conforms to RFC 3004 using the set command. For example:

  # Length 4, value 'i' (0x69), 'P' (0x50), 'X' (0x48), 'E' (0x45)
  set user-class:hex 04:69:50:48:45
This is a long-standing bug both in iPXE and in the reference DHCP server implementation (ISC dhcpd). There is a substantial amount of documentation which suggests checking option 77 for the value “iPXE” to identify iPXE clients, and using “set user-class <text>” to specify a custom user class. To avoid breaking existing setups, iPXE will continue to provide option 77 as a plain string for DHCPv4.
cfg/user-class.txt · Last modified: 2017/08/22 07:59 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.