ray c wrote: > Hello, I am using dnsmasq on my router and have included a few config > lines for pxe booting: > > dhcp-vendorclass=pxe,PXEClient > dhcp-boot=/pxelinux.0,192.168.1.8,192.168.1.8 > dhcp-option=pxe,67,pxelinux.0 > > The problem is that during a pxe boot, the client fails the tftp > portion with an error about not being able to find the file. Sniffing > revelas requests like the following: 11:42:39.617240 IP > 192.168.1.107.2070 > czar.tftp: 28 RRQ "pxelinux.0M-^?" octet tsize > 0 > > I did some searching and it seems that the M-^? is a 0xff character > which is being requested as a part of the filename. From what I've > found, people suggest turning on a "option pad" on in the dhcp server > software. (see > <http://lists.soekris.com/pipermail/soekris-tech/2005-May/023322.html>) > Is this a possiblity with dnsmasq? >
My guess is that the buggy PXE client is expecting option 67 to contain a zero-terminated string. In fact the DHCP standards say that it's a counted string, and doesn't have a zero at the end. The most likely DHCP packet in this case will have the DHCP "end" option after the filename, which is FF, so the bytes look like: 67 10 'p' 'x' 'e' 'l' 'i' 'n' 'u' 'x' '.' '0' 0xff 0x00 where 10 is the length of "pxelinux.0" and the 0xff is the "end" option and the 0x00 is padding after the end of the packet. Adding "option pad;" in the ISC config puts in a pad after the option 67 but before the end of the packet 10 'p' 'x' 'e' 'l' 'i' 'n' 'u' 'x' '.' '0' 0x00 0xff 0x00 which makes a valid zero-terminated string and keep the PXE client happy. There's no direct equivalent in dnsmasq, because dnsmasq never includes options in a reply unless they are requested by the client, but there are a couple of different workarounds you could try: 1) Just leave out the option 67. Option 67 is another way to specify the filename, which is specified (in another part of the packet) by the first part of the dhcp-boot option, so it's probably not needed anyway. 2) If it turns out that you really do need option 67, you will have to directly specify its contents in hex, and add a trailing zero, so dhcp-option=pxe,67,70:78:65:6c:69:6e:75:78:2e:30:00 HTH Simon.