DHCP Boot Server Options in pfsense are currently implemented only via the next-server option method, requiring the server IP and boot file. This works great... if you only have one device to netboot. Or if you have a complex dhcpd.conf serving different images according to the requesting MAC. But that's not an option on pfsense and doesn't make sense anyway.

Most commonly these days, DHCP Boot Server Options are used for IP Phones--to deliver their config files and update firmware. Most IP phone systems these days that I've seen (currently using Shoretel) prefer the option 66 method, only requiring the server IP. The boot server (phone system) then determines what files to serve based on the requesting MAC. Its much easier to administer boot images on the boot server (phone system) than via DHCP. And makes more sense.

I originally made these modifications to a pfsense router at a remote site of ours to address this issue for their phones--which were not getting their expected firmware updates.
I thought I ought to share the mod with you all.

Its very minor.
It only adds boot-server option 66 method if you leave out the file image, and changes text in the GUI indicating as much.


--- services_dhcp.php.orig      2009-06-27 03:21:55.000000000 -0400
+++ services_dhcp.php   2009-06-27 03:09:53.000000000 -0400
@@ -585,12 +585,12 @@
                                        <input valign="middle" type="checkbox" 
value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " 
checked"; ?>>&nbsp;
                                        <b>Enables network booting.</b>
                                        <p>
-                                       <input name="nextserver" type="text" 
class="formfld" id="nextserver" size="20" 
value="<?=htmlspecialchars($pconfig['nextserver']);?>"><br>
-                                       Enter the IP address from the network 
boot server. 
+                                       <input name="nextserver" type="text" 
class="formfld" id="nextserver" size="20" 
value="<?=htmlspecialchars($pconfig['nextserver']);?>"> IP Address of boot 
server.<br>
+                                       This is used for both next-server and 
option 66 (boot-server) methods. 
                                        <p>
-                                       <input name="filename" type="text" 
class="formfld" id="filename" size="20" 
value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
-                                       Enter the filename used for network 
booting.<br />
-                                       Note: You need both a filename and a 
boot server configured for this to work! 
+                                       <input name="filename" type="text" 
class="formfld" id="filename" size="20" 
value="<?=htmlspecialchars($pconfig['filename']);?>"> Boot image filename.<br>
+                                       Note: You need both a filename and a 
boot server configured for the next-server option method to work!<br>
+                                       Leave blank for option 66 (boot-server) 
method.
                                </div>
                        </td>
                      </tr>
--- services.inc.orig   2009-06-27 03:09:53.000000000 -0400
+++ services.inc        2009-06-27 03:09:53.000000000 -0400
@@ -115,6 +115,7 @@
 
        $dhcpdconf = <<<EOD
 option domain-name "{$syscfg['domain']}";
+option boot-server code 66 = string;
 default-lease-time 7200;
 max-lease-time 86400;
 authoritative;
@@ -279,6 +280,10 @@
                                $dhcpdconf .= " next-server 
{$dhcpifconf['next-server']};\n";
                                $dhcpdconf .= " filename 
\"{$dhcpifconf['filename']}\";\n";
                        }
+/* Add option 066 TFTP boot server */
+                        else {
+                                $dhcpdconf .= " boot-server 
\"{$dhcpifconf['next-server']};\"\n";
+                        }
                }
                $dhcpdconf .= <<<EOD
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: support-unsubscr...@pfsense.com
For additional commands, e-mail: support-h...@pfsense.com

Commercial support available - https://portal.pfsense.org

Reply via email to