Using custom variable to assign value to bootfile-name

karteek.challa at wipro.com karteek.challa at wipro.com
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.

fsname.conf:
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";
}

My-dhcpd.conf:
host target1 {
hardware ethernet 00:1a:ea:4e:5e:0a;
fixed-address 10.10.10.1;
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;
fixed-address 10.10.10.2;
group "target_2";
option boot-filename = tg2_fs;
unset tg2_fs;
}

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

host target4 {
hardware ethernet 00:1a:ea:4e:5e:0d;
fixed-address 10.10.10.4;
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.

BR,
Karteek
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. www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20151111/8ec68421/attachment.html>


More information about the dhcp-users mailing list