Using custom variable to assign value to bootfile-name

karteek.challa at karteek.challa at
Wed Nov 11 13:08:47 UTC 2015

Hi All,

I am facing problem when assigning the variable to the option bootfile-name. Request your help in solving this.

As we need to test multiple software packages, we need to change the bootfile-name frequently in the dhcp configuration file.
So, thought of assigning the bootfile-name option to a variable and passing the filename to the variable in a different file.

Generally the testers will always edit the dhcp configuration file to assign bootfile-name to their required software to test. In this process, so many times they are unknowingly changing the mac address of the target or some other which end up in problems.
Because of this issue, I am planning to make the dhcp configuration file as only readable to all users and create a separate file with write permission which contains the variables respective to each target and which are assigned with the required software.
Below is the example of my thought.

group target_1{
      set tg1_fs = "soft_1.tar";

group target_2 {
      set tg2_fs = "soft_2.tar";

group target_3{
      set tg3_fs = "soft_3.tar";

group target_4{
     set tg4_fs = "soft_4.tar";

host target1 {
hardware ethernet 00:1a:ea:4e:5e:0a;
group "target_1";
log (info, tg1_fs);
option boot-filename = tg1_fs;
log (info, boot-filename);
unset tg1_fs;

host target2 {
hardware ethernet 00:1a:ea:4e:5e:0b;
group "target_2";
option boot-filename = tg2_fs;
unset tg2_fs;

host target3 {
hardware ethernet 00:1a:ea:4e:5e:0c;
group "target_3";
option boot-filename = tg3_fs;
unset tg3_fs;

host target4 {
hardware ethernet 00:1a:ea:4e:5e:0d;
group "target_4";
option boot-filename = tg4_fs;
unset tg4_fs;

I tried with one host "host target1" by placing log() in its declaration.

I got "soft_1.tar" in the /var/log/messages 2 times.
This says that the variable fs and the option bootfile-name contains "soft_1.tar".
But the strange thing is that, in this way of assigning the bootfile-name, the software is not getting loaded in the target.
So, I have captured the tcpdump and observed in DHCP response packet that there is no option 67 Bootfile-name in Bootstrap Protocol.

Whereas, if I specify "option bootfile-name "soft_1.tar";" directly in the host declaration, the software is loading in the target.
In this case, in the tcpdump, in the DHCP response packet, option 67 Bootfile-name has "sample.tar"

Not able to get where is the problem.

Please help me.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dhcp-users mailing list