Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Issues with dhcp options 66|67

Hi,


I'm trying to get Apple's bootpd to work with a remote tftpd, but somehow I'm unable to get this config to work. I've already looked through a couple threads here for the last few hours and tried out using John Lockwood's DHCP Option Code Utility, but I still don't see any traffic (via tcpdump) coming in on my tftpd server.


Below you'll find my current /etc/bootpd.plist, the TFTP Server is listening on 192.168.100.12, the file I'd like to get is pxelinux.0. I usually stop bootpd before making changes to the file and start it up again afterwards.


Accessing the tftpd from another client and retrieving files from it works like a charm. Any ideas what could be wrong?


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>NetBoot</key>

<dict/>

<key>Subnets</key>

<array>

<dict>

<key>allocate</key>

<true/>

<key>dhcp_domain_name</key>

<string>home.local</string>

<key>dhcp_domain_name_server</key>

<array>

<string>192.168.100.10</string>

</array>

<key>dhcp_domain_search</key>

<array>

<string>home.local</string>

</array>

<key>dhcp_option_66</key>

<data>

wKhkDAo=

</data>

<key>dhcp_option_67</key>

<data>

cHhlbGludXguMAA=

</data>

<key>dhcp_router</key>

<string>192.168.100.1</string>

<key>lease_max</key>

<integer>604800</integer>

<key>name</key>

<string>home.local</string>

<key>net_address</key>

<string>192.168.100.0</string>

<key>net_mask</key>

<string>255.255.255.0</string>

<key>net_range</key>

<array>

<string>192.168.100.150</string>

<string>192.168.100.200</string>

</array>

<key>selected_port_name</key>

<string>en0</string>

<key>uuid</key>

<string>EA41FE70-7C2B-47E1-8C24-77597F94BD23</string>

</dict>

</array>

<key>allow</key>

<array/>

<key>bootp_enabled</key>

<false/>

<key>deny</key>

<array/>

<key>detect_other_dhcp_server</key>

<false/>

<key>dhcp_enabled</key>

<array>

<string>en0</string>

</array>

<key>old_netboot_enabled</key>

<false/>

<key>relay_enabled</key>

<false/>

<key>relay_ip_list</key>

<array/>

<key>timeServiceStarted</key>

<string>2013-04-19 18:58:54 +0000</string>

</dict>

</plist>



Regards,
Mike

Server-OTHER, OS X Mountain Lion (10.8.3)

Posted on Apr 19, 2013 12:10 PM

Reply
Question marked as Best reply

Posted on Apr 19, 2013 4:30 PM

Well,


After spending half a day trying out almost any possible combination, I've bypassed the issue with a 4-line dnsmasq config which makes dnsmasq act as a DHCP proxy answering PXE requests.


Here's what I've configured dnsmasq with:


port=0

dhcp-no-override

dhcp-range=192.168.100.0,proxy

pxe-service=x86PC, "Install Linux", pxelinux, 192.168.100.12


Regards,

Mike

7 replies
Question marked as Best reply

Apr 19, 2013 4:30 PM in response to fooforge

Well,


After spending half a day trying out almost any possible combination, I've bypassed the issue with a 4-line dnsmasq config which makes dnsmasq act as a DHCP proxy answering PXE requests.


Here's what I've configured dnsmasq with:


port=0

dhcp-no-override

dhcp-range=192.168.100.0,proxy

pxe-service=x86PC, "Install Linux", pxelinux, 192.168.100.12


Regards,

Mike

Apr 22, 2013 2:01 AM in response to fooforge

The current (first) version of my DHCP Option Code Utility a) has a bug in Lion/Mountain Lion, and b) cannot directly generate what is known as a 'null terminated string'.


Most DHCP option codes containing a string that you are likely to come across e.g. for VoIP setups, use 'normal' strings. PXE boot definitions however need a 'null terminated string' which has an extra ASCII Null (hexadecimal 00) character at the end.


Ignoring the Lion/Mountain Lion bug, if you used my current version in say Snow Leopard and converted the desired string to hexadecimal using another utility or one of the many websites that can do this and then added a 00 at the end, and used the hexadecimal option rather than the string option in my utility, you would be able to generate the correct value.


I do intend at some point to address these issues in a new version.

Apr 23, 2013 7:39 AM in response to John Lockwood

John,


Thanks for your answer! I think I've read almonst any of the threads touching the DHCP options topic you were involved in.


Now I've got it. It's not only dhcp_option_67 that has to be null terminated, it's also 66. Until now I thought this would only affect the bootfile name, but not the TFTP server name. And I was wondering for quite some time, why the initial connection to the TFTP server failed... Doh!


Looking forward to the new release. Let me know if there's anything I can do to help speeding up this process.



Regards,

Mike

Apr 23, 2013 8:53 AM in response to John Lockwood

John Lockwood wrote:


If you could point me to a free webpage hosting solution that would be great, I used to use MobileMe but of course that is no more. I would not need much space or bandwidth.


I'd simply create a git repository at GitHub and use GitHub Pages to create a page for the project. However, this'd require some skills with git and it would mean that you have to open source the project (git repositories on GitHub are public by default when using a free plan).

Another solution would be to create a dropbox account and to share the public URL for the file, e.g. on a GitHub Pages backed website without making the code Open Source.


That said, I could also host this for you at fooforge.com (hosted on a vServer near Frankfurt, Germany) and give you access to the server via SSH so that you can manage uploads by yourself. In this case I'd use your SSH public key. Ping me via mike@fooforge.com or mike@github.com if interested.

Apr 23, 2013 9:22 AM in response to John Lockwood

John Lockwood wrote:


I am not needing to host the source, I am wanting to provide a webpage describing it and providing a download link.

Yes, you could easily do that by using Dropbox and GitHub Pages. See the cucumber-nagios page for instance. The page is just a branch called gh-pages in this repository. All you'd have to do is to signup at GitHub, create a repository, go to the repository's settings and click on the Automatic page generator button. This'll create the gh-pages branch which you then can fill with content to your liking, e.g. a link to the file in Dropbox. There's no need to host the code in that repository at all.

Issues with dhcp options 66|67

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.