News: This forum is now permanently frozen.
Pages: [1]
Topic: DHCP Scopes  (Read 9087 times)
« on: March 20, 2007, 16:28:04 »
vergilis *
Posts: 2

Any plans to include DHCP scopes as configurable options for DHCP Server configuration?
« Reply #1 on: March 21, 2007, 16:13:48 »
randyc *
Posts: 9

I too would like this, as I would like to be able to configure DHCP options myself, such as setting NTP servers and my own options.

This should be in feature requests though.

Call me baby.

I'm running m0n0wall, on an old Pentium II machine.
« Reply #2 on: March 22, 2007, 02:05:24 »
cmb *****
Posts: 851

Some hidden options are available (see FAQ on hidden config.xml options).

Aside from that, Manuel has stated in the past that m0n0wall isn't intended to be a full fledged DHCP server and it's not likely it'll get additional options in the future.
« Reply #3 on: March 22, 2007, 02:39:17 »
rpsmith
Guest

I use m0n0wall's DHCP Server for all my Customers.  However, I have to edit the config file to add the DNS Servers I want it to hand out.  Would really lite to see this added to the GUI.

Roy...
« Reply #4 on: March 23, 2007, 22:48:08 »
slick *
Posts: 8

I found an easy way to add "option root-path" to the config.xml with PC-BSD in qemu or on a spare PC using the workon.sh script.
This could be a good start example to customize the DHCP options.
If interested, post reply.
-slick
« Reply #5 on: March 24, 2007, 02:19:44 »
vergilis *
Posts: 2

Slick,

Your sample script would be greatly appreciated.

vergilis at yahoo.com
« Reply #6 on: March 24, 2007, 13:42:11 »
slick *
Posts: 8

K, here go's
My example shows my need for "option root-path" for Linux Terminal Server" and PXE booting

Install PC-BSD on a spare PC or Virtual Machine.
Make a new directory. I used "mono".
Download your needed monowall image into this directory.
Download "workon.sh" script from http://chrisbuechler.com/index.php?id=20 into this same directory.
Note: The "workon.sh" script has more instruction's on how to use it.

Open a terminal and type "su". enter your root password
cd into your mono directory and type "chmod +x workon.sh"

Now to extract the image type, for example "./workon.sh net48xx-1.23.img"
Now you can modify the image how you want before repacking it.

K, now I'm not real comfortable using VI for editing. I like to use a GUI editor and will explain how I used "KEdit" as root to do it. You need to edit as root.
Open a new terminal and type "su" and enter your root password.
Now type "kedit". Your are running KEdit as root

Now the changes to the image.
With KEdit, click "File" then "Open" and Browse to and open <your-home-dir>/mono/mnt2/etc/inc/services.inc

Look for these lines in services.inc
      if ($dhcpifconf['next-server'])
         $dhcpdconf .= "   next-server {$dhcpifconf['next-server']};\n";
      if ($dhcpifconf['filename'])
         $dhcpdconf .= "   filename \"{$dhcpifconf['filename']}\";\n";
Enter this line directly under it.
      if ($dhcpifconf['root-path'])
         $dhcpdconf .= "   option root-path \"{$dhcpifconf['root-path']}\";\n";

Save and exit KEdit.
Type "exit" in the terminal where you started the "workon.sh" script to repack the image.

That it, Your done.
Upload your new image
Now you have and extra option in your config.xml
Mine looks like this.
         <next-server>192.168.1.101</next-server>
         <filename>/ltsp/i386/pxelinux.0</filename>
         <root-path>/opt/ltsp/i386</root-path>

Hope this helps get what you need.
You could probably setup something like this.
<option1>time server</option1>
<option2>something else</option2>
<option3>something else</option3>
<option4>something else</option4>

If you don't enter the tag in the config.xml, it doesn't get written to the dhcpd.conf.
Good Luck,
-slick

Kudo's/Credits:
Manuel Kasper
Jeb Campbell
Chris Buechler
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines