How to configure DHCP for manual PXE disc

Technote (troubleshooting)


Problem(Abstract)

Configuring your DHCP infrastructure to support PXE servers is usually limited to adding option 60 depending on where the PXE server is located. This article shows how to configure DHCP option 43 in order to modify how PXE clients find the PXE server.

Resolving the problem

In order to support PXE clients on a network, the DHCP server is usually configured in one of the following three modes:

Option 60 not set, Option 43 not set

Option 60 set to 'PXEClient', Option 43 not set

Option 60 set to 'PXEClient', Option 43 set


When neither option 60 nor option 43 is set, PXE clients will have no clue on where the PXE server is, and they will therefore wait until a PXE server contact them. In this mode, the PXE server must listen to DHCP discovery packets sent by PXE clients and answer at the same time as the DHCP server does.

When option 60 is set to 'PXEClient', it means that the DHCP server knows where the PXE server is. If option 43 is not set, the PXE server is on the same computer as the DHCP server (same IP address). If option 43 is set, PXE clients must decode option 43 to know how to reach the PXE server.

In most situations, option 43 does not need to be setup, because the PXE server will either listen to DHCP discovery packets (DHCPProxy), or be on the same computer as the DHCP server. However, if the PXE server is on a separate subnet (it cannot listen to DHCP discovery packets), or if there are several PXE servers on the same subnet, option 43 is the only viable solution in order to instruct PXE clients on what to do.

Option 43 is a binary buffer, containing a list of sub-options. Sub-options are packed in the binary buffer, in no specific order. Most sub-options are optional.

An exhaustive list of sub-options can be found in the PXE specifications.

We will only describe sub-options that are of interest in order to specify the IP address of the PXE server. Other configurations, like multicast discovery, multiple unicast servers, or multiple choices, will not be shown here.

PXE option 6: PXE_DISCOVERY_CONTROL. This option tells the PXE client how to contact PXE servers: using unicast, multicast or broadcast. In our example, we will use the value '7', meaning 'use PXE_BOOT_SERVERS list, disable multicast and broadcast discovery'. The format of this option is one byte.

PXE option 8: PXE_BOOT_SERVERS. This is a list of IP addresses, each address corresponding to one PXE server (when discovery_control is unicast). A PXE server is identified by a number (Rembo is 15) and its IP address. In our example, we will only use one IP address, the address of the PXE server we want to use for the host which will receive these DHCP options. The format of this option is two bytes for the server type (15 for Rembo), one byte for the number of servers to list (1 in our example), and four bytes per server address. In our example, the total length of this option will be 7 bytes.

PXE option 9: PXE_BOOT_MENU. This option contains a list of choices to prompt on the screen at boot time. In our example, we will have only one line that will go to server type 15 (Rembo). We need to have a PXE boot menu even if we do not use it (i.e. boot straight on the first line of the menu). The format of this option is two bytes for the server type (15 for Rembo), one byte for the length of the string to display, and the string to display on screen. In our example we will use 'RB' as the string to display. The total length of this option will therefore be 5.

PXE option 10 (0A): PXE_BOOT_TIMEOUT. This option is required to specify how long (in seconds) the boot menu should be displayed, and the text of a prompt that will be displayed during waiting time. In our example, we will set the timeout to 0 seconds, meaning that we do not want to wait, but we want to boot using the first line of the boot menu. The prompt text will not be displayed, but it must be at least one character long. In our example, we will set the prompt to 'R'. The format of this option is one byte for the timeout value, followed by the prompt text. In our example, the total length for this option will be 2 bytes.

PXE option 255 (FF): PXE_END. The binary buffer of DHCP option 43 must end with FF in order to be valid.

Now that we have described the options, let us try to build the binary buffer for option 43 for the following example: we want to have clients A and B boot on server 192.10.10.10, and clients C and D boot on server 192.10.11.10, which is on a different subnet (a valid gateway must be setup for C and D in order to locate the PXE server on a different subnet).

Here are the options we will have to insert in the binary buffer, with their values:

Note: Server type 15 is translated into 00:0F in hexadecimal. IP address 192.10.10.10 is translated into C0:0A:0A:0A, and 192.10.10.11 is translated into C0:0A:0B:0A. Letters 'R' and 'B' are translated into 52 and 42.


PXE option 6, length 1, value = 07
PXE option 8, length 7, value = 00:0F:01:C0:0A:0A:0A (clients A and B)
PXE option 8, length 7, value = 00:0F:01:C0:0A:0B:0A (clients C and D)
PXE option 9, length 5, value = 00:0F:02:52:42
PXE option A, length 2, value = 00:52
PXE option FF, to close the buffer


The format of the binary buffer that we must use for DHCP option 43 is similar to what is used for the DHCP packet itself: the buffer is a list of options, each option starting with its option number (one byte), followed by its length (one byte), and its value (a list of bytes).

Here is the transcription of the above example, for clients A and B:

Code:
Option 43 =
06:01:07:08:07:00:0F:01:C0:0A:0A:0A:09:05:00:0F:02:52:42:0A:02:00:52:FF


And for clients C and D:

Code:
Option 43 =
06:01:07:08:07:00:0F:01:C0:0A:0B:0A:09:05:00:0F:02:52:42:0A:02:00:52:FF


If your DHCP server is running on Windows NT, you can enter these values one by one in option 43, by selecting hexadecimal input.

If your DHCP server is ISC DHCP (version 2.x), then you can enter the above strings as is (bytes separated with colons) for parameter 'vendor-encapsulated-options' (exact name depending on the version you are using).

If your DHCP server is ISC DHCP (versoin 3.x), then you can use the explicit syntax to describe the PXE options, as follow:

Code:
# In the global section:
option space PXE;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.boot-server code 8 = { unsigned integer 16,
unsigned integer 8,

ip-address };
option PXE.boot-menu code 9 = { unsigned integer 16,
unsigned integer 8,
text};
option PXE.menu-prompt code 10 = { unsigned integer 8, text };


Code:
# In the scope/host section:
option dhcp-parameter-request-list 60,43;
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
option PXE.discovery-control 7;
option PXE.boot-server 15 1 192.160.160.160; # address of Rembo server
option PXE.boot-menu 15 5 "Rembo";
option PXE.menu-prompt 0 "Rembo";

Product Alias/Synonym

Rembo Auto-Deploy

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Tivoli Provisioning Manager for OS Deployment

Software version:

4.0, 5.1.1, 7.1.1

Operating system(s):

FreeBSD, Linux, Mac OSX, Solaris, Windows

Reference #:

1247032

Modified date:

2009-10-14

Translate my page

Machine Translation

Content navigation