Mac OS X Server Configure DHCP Options 66 and 67

Posted by Paul Adams on Server Fault See other posts from Server Fault or by Paul Adams
Published on 2012-12-01T23:20:52Z Indexed on 2013/06/27 4:23 UTC
Read the original article Hit count: 877

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:

  • echo "172.16.152.20" | openssl enc -base64 returns MTcyLjE2LjE1Mi4yMAo=
  • DHCP Option Code Utility (http://mac.softpedia.com/get/Internet-Utilities/DHCP-Option-Code-Utility.shtml) generating a string from 172.16.152.20 yields: LW4gLWUgMTcyLjE2LjE1Mi4yMAo= (used in the above example)
  • DHCP Option Code Utility generating an IP Addresss from 172.16.152.20 yields: LW4gLWUgrBCYFAo=

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.

© Server Fault or respective owner

Related posts about macosxserver

Related posts about pxeboot