PXEClient, dhcp options 60, 66 and 67, what are they for? Can I use PXE without it ?

Published:
Updated:
Ever wondered why you had to use DHCP options (dhcp opt 60, 66 or 67) in order to use PXE?
Well, you don't!
DHCP Option 60

You have to create dhcp option 60 only if:
- You have a PXE Service and that runs on the same host that also runs a dhcp service (bound on UDP 67)
- You need this PXE Service to provide the "network boot program" details to your PXE clients.
These details are actually: TFTP server IP address (DHCP option 66) and network boot program file name (DHCP option 67)

If you know these details, you can perfectly make the economy of a PXE Service. Just fill these dhcp options (66 and 67) with the needed data.

For instance, if your TFTP server runs on the host with IP address 192.168.1.10, and if your network boot program file name is pxelinux.0, just configure your dhcp server so that its option 66 is "192.168.1.10" and option 67 is "pxelinux.0".
No dhcp option 60, no "PXEClient".
Note that your DHCP server can also run on the same host (192.168.1.10 in this example)

Also, do not set this dhcp option 60 if you have a PXE Service running on an host that does not run any dhcp or bootp service.

The problem is that if you have both a DHCP and a PXE service on the same host, they can't use the same listening port (dhcps, which is udp 66). In that case, the PXE standard specifies that the PXE Service can use udp 4011 as its listening port. Of course, the PXEClient must send their DHCPDISCOVER packets to that port too. The DHCP option 60, when set to "PXEClient" is used only to instruct the PXE clients to try to use a PXE Service bound on UDP port 4011.


DHCP options 66 and 67

One side effect of having a PXE service (whether running on the same host as the DHCP service, thus requiring Dhcp Opt 60 to be set to PXEClient or on another host) is that you should NOT set DHCP opt 66 and 67.
When using a PXEService, dhcp options 66 and 67 are sent to the PXE clients by the PXE service itself, not by DHCP service.
If you do set DHCP options 66 and 67, ALL the PXEClient are instructed to download and boot the same network boot program (NBP) and you then cannot have different architecture support, for instance, you can't have clients booting an x86-bios boot program and some other booting an x64-bios nbp nor an x64-efi nbp.


DHCP and PXE on different subnets

Of course, if your clients and servers are not on the same subnets, you need to set some kind of dhcp-relay (aka ip-helper or dhcp-forwarder) so that the dhcp broadcasts sent by your PXE clients are forwarded to the dhcp server on another subnet.
If your PXE server is not your dhcp server and is not in the same subnet as the PXE clients, then, in addition not to have any dhcp option 60 set to "PXEClient", you also must add the IP address of the PXE server to the list of IP addresses that get the dhcp broadcasts. In the Cisco world, it means adding the address of the PXE server to  "ip-helper" addresses on your routers or (Layer 3) switches. In that case, you would have both the DHCP server and PXE server(s) in ip-helper list of addresses
 
1
142,433 Views

Comments (2)

Author

Commented:
One side effect of having a PXE service (whether running on the same host as the DHCP service, thus requiring Dhcp Opt 60 to be set to PXEClient or on another host) is that you should NOT set DHCP opt 66 and 67.
When using a PXEService, dhcp options 66 and 67 are sent to the PXE clients by the PXE service itself, not by DHCP service.

Author

Commented:
Of course, if your clients and servers are not on the same subnets, you need to set some kind of dhcp-relay (aka ip-helper or dhcp-forwarder) so that the dhcp broadcasts sent by your PXE clients are forwarded to the dhcp server on another subnet.
If your PXE server is not your dhcp server and is not in the same subnet as the PXE clients, then, in addition not to have any dhcp option 60 set to "PXEClient", you also must add the IP address of the PXE server to the list of IP addresses that get the dhcp broadcasts. In the Cisco world, it means adding the address of the PXE server to  "ip-helper" addresses on your routers or (Layer 3) switches. In that case, you would have both the DHCP server and PXE server(s) in ip-helper list of addresses

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.