2

I need to configure Mountain Lion (10.8.2) OS X Server BOOTP to provide DHCP options 66 and 67 to provide PXE booting for PCs on my network. I have tried following the bootpd MAN pages, but they are not specific enough. I have also read conflicting information on the net, but nothing definitive for Mountain Lion DHCP.

From bootpd man page:

bootpd has a built-in type conversion table for many more options, mostly those specified in RFC 2132, and will try to convert from whatever type the option appears in the property list to the binary, packet format. For example, if bootpd knows that the type of the option is an IP address or list of IP addresses, it converts from the string form of the IP address to the binary, network byte order numeric value.

If the type of the option is a numeric value, it converts from string, integer, or boolean, to the proper sized, network byte-order numeric value.

Regardless of whether bootpd knows the type of the option or not, you can always specify the DHCP option using the data property list type

<key>dhcp_option_128</key>
<data>
AAqV1Tzo
</data>

My TFTP server is 172.16.152.20 and the bootfile is pxelinux.0

I have edited /etc/bootpd.plist and added the following to the subnet dict:

<key>dhcp_option_66</key>
<data>
LW4gLWUgrBCYFAo=
</data>
<key>dhcp_option_67</key>
<data>
LW4gLWUgcHhlbGludXguMAo=
</data>

According to the man page, the data elements are supposed to be Base64 encoded, but no matter what I try, I cannot get PXE clients to boot.

I have tried encoding 172.16.152.20 using various methods:

Encoding pxelinux.0 with the above methods likewise yields different encodings.

I have tried using all three methods of encoding the data elements, but nothing seems to work i.e. my PXE boot clients do not get directed to my TFTP server. Can anyone help?

Regards, Paul Adams.

Paul Adams
  • 21
  • 1
  • 2

1 Answers1

2

I finally get this working thanks to a thread in the Apple Forums:

https://discussions.apple.com/thread/4561762?start=15&tstart=0

In OS X Mountain Lion Apple are now expecting null terminated strings for certain DHCP options. Contributor John Lockwood has created a utility that will generate the correct bootpd XML including null terminated option strings. Refer to the thread above, and download the utility here:

http://jelockwood.blogspot.co.uk/2013/06/dhcp-server-on-os-x-server.html

Adding the generated codes to my bootpd.plist enabled me to PXE boot PCs using only the OS X DHCP Service.

Paul A.
  • 121
  • 2