Feature Request: DHCP Server - Option to add Null Terminator

Some older PXEBoot gear actually expects a Null (0) terminated string even though it’s not in the RFC - I’d like to request the option to enable this on the DHCP Server Settings.

Currently a work around on linux is to Symlink the file with the added FF:

Example: ln -s pxelinux.0 `echo -e “pxelinux.0\xff\x00”

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 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.

Try to add option 67 to the DHCP configuration, specify its contents in hex and add a trailing zero.

I’m not sure if this is the correct format of the string in RouterOS.

/ip dhcp-server option add code=67 name=pxe value=0x7078656c696e75782e3000

The following should work with ISC’s DHCP server.

dhcp-option=pxe,67,70:78:65:6c:69:6e:75:78:2e:30:00

ascii.gif