PXELinux: Different PXE config for each subnet

PXE boot might need different configuration for different subnets (i.e. server names/IPs are different).

PXELinux has a neat feature: in the pxelinux.cfg/ directory, one can put different configuration files for different machines or subnets, identified by the file name:

The configuration file names can be:

  1. Machine UUID
  2. MAC Address i.e. 00-11-22-33-44-55
  3. IP or prefix IP - hexadecimal i.e. :
    1. C0 for 192.0.0.0/255.0.0.0 subnet
    2. C0A8 for 192.168.0.0/255.255.0.0 subnet
  4. default: if nothing else matches, PXELinux will load the config named "default".

Ref: official PXE documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *