Force PXElinux options in DHCP server

  • Hello all

    I'm using pfsense 2.0.1.

    When you use PXElinux to netboot workstations, you can send a few parameters to pxelinux.0 via some dhcp options. Specificaly you can use options 208, 209, 210 and 211. The problem is that the client never explicitly ask for these options, so you must "force" them down by adding those options to the original Parameter Request List, or else the dhcp server will not send them (b/c they were not requested). This is normal and documented behaviour.

    This setup was working when I was using a linux as dhcp server (and manually configured dhcpd.conf) but I could not replicate that behaviour after switching to pfsense as a dhcp server. At least not through the web interface.

    So I hacked the /etc/inc/ file and hardcoded the missing part there, and now it's working. I'm posting this for a number of reasons:

    1 - document it so others can benefit
    2 - ask if tere is a better way that I have not seen
    3 - ask if you think these could/should be incorporated as standard on upstream

    So to the solution:

    Edit /etc/inc/, and put the following, somewhere around line 145

    By token - workaround for pxelinux

    if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
            option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);

    Now you can add the options normally via web page (Additional DHCP Options button), and they will get sent to the client (without this patch, they will be ignored, because the client did not ask for them, even if they are specified).

    The first if checks for pxe clients, so it will not send them for anyone (i.e. operating systems asking for ip – not netbooting). The upstream solution could use a checkbox asking if the user wants to force these options, or they could just be forced all the time when the client is pxe.

    I can try to code and submit a patch, I just want to make sure this is something that would be wanted.


Log in to reply