Table of Contents

Premature

About this page

Desired Long term name

Please don't link to this premature page

Using dnsmasq

dnsmasq provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot. It can be configured to support iPXE.

Dnsmasq is configured using the file /etc/dnsmasq.conf. You can instruct iPXE to boot using the dhcp-boot directive:

  dhcp-boot=pxelinux.0

or

  dhcp-boot=http://boot.ipxe.org/demo/boot.php

TFTP server

To enable the TFTP server set

  # Enable dnsmasq's built-in TFTP server
  enable-tftp
  # Set the root directory for files availble via FTP.
  tftp-root=/var/lib/tftpboot/

PXE chainloading

A chain

To use PXE chainloading, you need to set up dnsmasq to hand out undionly.kpxe to legacy PXE clients, and then hand out the “real” boot configuration only to iPXE clients. You can do this by telling dnsmasq to use different configurations based on the DHCP user class:

  dhcp-boot=undionly.kpxe
  dhcp-match=set:iPXE,175
  dhcp-boot=tag:iPXE,http://my.web.server/real_boot_script.php

This will ensure that the iPXE image (undionly.kpxe) is handed out only when the DHCP request comes from a legacy PXE client. Once iPXE has been loaded, the DHCP server will direct it to boot from http://my.web.server/real_boot_script.php. You should replace filename "http://my.web.server/real_boot_script.php" with whatever you want iPXE to boot from.

iPXE-specific options

There are several DHCP options that are specific to iPXE and that are not recognised by the standard ISC dhcpd installation. To add support for these options, place the following at the start of your /etc/dhcpd.conf:

Dnsmasq can do “encapsulation” with configuration item dhcp-option.

Work in progress WIP FIXME text to REMOVE

ISC dhcpd syntax:

  option space ipxe;
  option ipxe-encap-opts code 175 = encapsulate ipxe;
  option ipxe.priority code 1 = signed integer 8;
  option ipxe.keep-san code 8 = unsigned integer 8;
  option ipxe.skip-san-boot code 9 = unsigned integer 8;
  option ipxe.syslogs code 85 = string;
  option ipxe.cert code 91 = string;
  option ipxe.privkey code 92 = string;
  option ipxe.crosscert code 93 = string;
  option ipxe.no-pxedhcp code 176 = unsigned integer 8;
  option ipxe.bus-id code 177 = string;
  option ipxe.san-filename code 188 = string;
  option ipxe.bios-drive code 189 = unsigned integer 8;
  option ipxe.username code 190 = string;
  option ipxe.password code 191 = string;
  option ipxe.reverse-username code 192 = string;
  option ipxe.reverse-password code 193 = string;
  option ipxe.version code 235 = string;
  option iscsi-initiator-iqn code 203 = string;
  # Feature indicators
  option ipxe.pxeext code 16 = unsigned integer 8;
  option ipxe.iscsi code 17 = unsigned integer 8;
  option ipxe.aoe code 18 = unsigned integer 8;
  option ipxe.http code 19 = unsigned integer 8;
  option ipxe.https code 20 = unsigned integer 8;
  option ipxe.tftp code 21 = unsigned integer 8;
  option ipxe.ftp code 22 = unsigned integer 8;
  option ipxe.dns code 23 = unsigned integer 8;
  option ipxe.bzimage code 24 = unsigned integer 8;
  option ipxe.multiboot code 25 = unsigned integer 8;
  option ipxe.slam code 26 = unsigned integer 8;
  option ipxe.srp code 27 = unsigned integer 8;
  option ipxe.nbi code 32 = unsigned integer 8;
  option ipxe.pxe code 33 = unsigned integer 8;
  option ipxe.elf code 34 = unsigned integer 8;
  option ipxe.comboot code 35 = unsigned integer 8;
  option ipxe.efi code 36 = unsigned integer 8;
  option ipxe.fcoe code 37 = unsigned integer 8;
  option ipxe.vlan code 38 = unsigned integer 8;
  option ipxe.menu code 39 = unsigned integer 8;
  option ipxe.sdi code 40 = unsigned integer 8;
  option ipxe.nfs code 41 = unsigned integer 8;

Work in progress WIP FIXME text to REMOVE

Proxy DHCP

Work in progress WIP FIXME text to ADD

  dhcp-range=proxy

Speeding up DHCP

Work in progress WIP FIXME

NOTE this is again: Can dnsmasq encapsulate further options in option 175?

The PXE specification requires iPXE to wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay using:

  option ipxe.no-pxedhcp 1;    FIXME

(Do not do this if you are using a ProxyDHCP server; it will cause iPXE to ignore whatever the ProxyDHCP server sends!)

Testing for specific features

FIXME

NOTE another encapsulate option …

You can use the feature indicator options to determine whether or not iPXE supports a specific feature. For example,

  if exists ipxe.fcoe {
      option root-path "fcp:20:00:52:54:00:aa:b7:01:0";
  }

would hand out an FCoE root path only to iPXE clients with FCoE support enabled.