DHCP testing, v2.1.x

Fajar A. Nugraha list at fajar.net
Wed Jan 25 10:01:32 CET 2012

(changed subject to better match content)

On Tue, Jan 24, 2012 at 10:00 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> 2012/1/24 Marinko Tarlać <mangia81 at gmail.com>:

>> I'm using CentOS so I'll try with the latest 2.1.x from git

>> The problem which bothers me is that I need more than classic ip-mac
>> pairing. Beside the IP address I need to return a few other parameters to
>> cable modems/MTA.
>> For example ISC DHCP config for regular modems is:
>> host blaBlaBla {
>>        filename "confingFile.cm";
>>        fixed-address;
>>        hardware ethernet 00:cc:ab:11:cc:22;
>>        }
>> As you can see, I'm returning the IP address and the name for config file.
>> Is this possible with FreeRadius DHCP ?
> Should be. The IP address assignment (whether static or dynamic) is
> easy enough with a special instance of sqlipool like in the example.
> If you only want static IP then you can even use only files without
> db.
> As for the filename, dictionary.dhcp has DHCP-Boot-Filename attribute,

Just tested pxe boot (with the help of virtualbox and linux
containers), and it works as expected. Some notes though:

(1) the option "filename" in ISC's dhcp should refer to pxe boot
image, something like

host clientname {
  filename "/tftpboot/tftpboot.img";

If your system is x86, and the OS/kernel loaded is linux or can be
booted with multiboot (e.g. solaris), then usually you can just use
pxelinux in "filename" option. pxelinux can then load the correct
config file for each host using a host-specific configuration file
(based on the hosts' MAC or IP address), or it can load the default
config file: http://www.syslinux.org/wiki/index.php/PXELINUX

Are you sure you're actually using per-host filename option instead of
a common one?

(2) I tested by adding this block in FR's DHCP-Discover and
DHCP-Request section:

	update reply {
		DHCP-Boot-File-Name = "/boot/pxelinux.0"

it works as expected. The attribute is sent to all hosts requesting
DHCP address, but only hosts doing network boot will acttually use it.
A cleaner approach would probably be checking if the client sends

	DHCP-Parameter-Request-List = DHCP-Boot-File-Name

... and only send the reply then.


More information about the Freeradius-Users mailing list