[ previous ] [ next ] [ threads ]
 From:  Stephen Erisman <serisman at serisman dot com>
 To:  Monowall Support List <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Re: [m0n0wall] PXE Booting: Multiple next-server and filename entries?
 Date:  Sun, 21 Sep 2008 22:38:23 -0500

So I have partially answered my own question.

I was able to verify that the ISC DHCP server does indeed support what I 
am looking for.

I was able to successfully get the /var/etc/dhcpd.conf file to look the 
way the dhcp server is expecting by doing the following:

I started by adding the following lines of code:
                if ($sm['next-server'])
                    $dhcpdconf .= "    next-server {$sm['next-server']};\n";
                if ($sm['filename'])
                    $dhcpdconf .= "    filename \"{$sm['filename']}\";\n";

...to the /etc/inc/services.inc file at line 156, or right after these 
                if ($sm['ipaddr'])
                    $dhcpdconf .= "    fixed-address {$sm['ipaddr']};\n";

I then manually modified the config.xml document to have a staticmap 
entry that looks similar to this:
                <descr>Some Description</descr>
*                <next-server>xx.xx.xx.xx</next-server>
*            </staticmap>

After uploading the modified .xml file and rebooting m0n0wall, I then 
uploaded my modified /etc/inc/services.inc file and copied it from the 
/tmp directory.
Then I modified a different dhcp entry through the web ui which forced a 
reload of all the dhcp settings.
I then downloaded the /var/etc/dhcp.conf file which now contains a 
section similar to this:
            host s_lan_10 {
                hardware ethernet xx:xx:xx:xx:xx:xx;
                fixed-address xx.xx.xx.xx;
*                next-server xx.xx.xx.xx;
                filename "/some-pxe-filename";
*            }

I also verified that the config.xml file did not get overwritten by 
modifying other settings through the web ui.

I am still going to look into how to open up editing these fields 
through the web ui.

When I am done, how do I submit this as a patch to be included in an 
upcoming release?


Stephen Erisman wrote:
> I have been using m0n0wall's DHCP server to send the 'next-server' and 
> 'filename' options for a while now.
> So far I have always been directing all my PXE clients to the same 
> TFTP server, and the same boot filename (tftpboot/pxelinux.0).
> I now want to try to PXE boot a FreeBSD client which appears to use a 
> program called pxeboot instead of pxelinux.0.
> So, my questions are:
> 1. Does the DHCP server in m0n0wall support sending a different 
> 'filename' option by client or by group of clients?
> 2. If yes, how easy would it be to change the xml config loader to 
> load the 'next-server' and/or 'filename' options from a staticmap node 
> and override the root values for that client?
> 3. What about allowing the edit of these options from the 'Edit static 
> mapping' page?  (I noticed that the latest 1.3 beta already allows 
> editing of them from the 'DHCP server' page.)
> 4. If the above are not possible, does anyone know if the pxelinux.0 
> program can spawn the pxeboot program, or can is be used to directly 
> boot FreeBSD?
> FYI... If the answer to #1 is yes, I may be able to help with 
> implementing #2 and #3.  I just wanted to get other's thoughts before 
> jumping in.
> Thanks,
> Steve
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
> For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch