variables in configuration

Rask, Curt Curt_Rask at
Tue Jun 30 17:07:07 UTC 2009

So, to summarize your intent, it sounds like you want to dynamically generate a bootfile name based off of something learned from the DHCP Discover / Request, in this case the Circuit ID and Remote ID from option 82.  One way to accomplish this is to use something like the following:

        option bootfile-name = concat((option agent.circuit-id),".",(option agent.remote-id),".cfg");


-----Original Message-----
From: dhcp-users-bounces at [mailto:dhcp-users-bounces at] On Behalf Of Nenad Tomasevic
Sent: Tuesday, June 30, 2009 8:31 AM
To: dhcp-users at
Subject: variables in configuration


I'm trying to get configuration file which will be assigning config files to clients based on predefined variables, more precise based on option 82 parameters in the dhcp request, so, if in dhcp request the option agent.circuit-id is "switch01" and option agent.remote-id is "01", the bootfile-name in dhcp offer will be "switch01.01.cfg".

here is my lame attempt to do that, dhcpd.conf;


agent-id="option agent.remote-id";
circuit-id="option agent.circuit-id";

#local subnet
subnet netmask {

  option subnet-mask;
  option routers;
  option tftp-server-name "";
  option bootfile-name "$circuit-id.$agent-id.cfg";

  default-lease-time 259200;
  max-lease-time  518400;

and that don't work, dhcp offer takes $circuit-id.$agent-id.cfg as bootfile-name, suprise, suprise (actually, i'm showing you the file only to make my idea more understandable)... :))

question is, is it possible to make such thing and if it is, in which direction I must look to achieve that?
point of the hole thing is to make dhcp server with 100% uptime because it wont need restart every time when configuration is changed.


dhcp-users mailing list
dhcp-users at

More information about the dhcp-users mailing list