Send dhcp-users mailing list submissions to
        [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Using custom variable to assign value to bootfile-name
      ([email protected])
   2. Re: Using custom variable to assign value to bootfile-name
      (Niall O'Reilly)


----------------------------------------------------------------------

Message: 1
Date: Wed, 11 Nov 2015 13:08:47 +0000
From: <[email protected]>
To: <[email protected]>
Subject: Using custom variable to assign value to bootfile-name
Message-ID:
        
<hk2pr03mb0675779c7078bb566f62025684...@hk2pr03mb0675.apcprd03.prod.outlook.com>
        
Content-Type: text/plain; charset="us-ascii"

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-0001.html>

------------------------------

Message: 2
Date: Wed, 11 Nov 2015 20:47:32 +0000
From: "Niall O'Reilly" <[email protected]>
To: Users of ISC DHCP <[email protected]>
Subject: Re: Using custom variable to assign value to bootfile-name
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

On Wed, 11 Nov 2015 13:08:47 +0000,
<[email protected]> wrote:
> 
> 
> Below is the example of my thought.
> 
> fsname.conf:
> 
> group target_1{
> 
> set tg1_fs = ?soft_1.tar?;
> 
> }

  Variables don't do what you need.

  I'ld suggest something like this, repeated for the other groups:

group target_1 {
  option boot-filename = "soft_1.tar";
}

  Best regards,
  Niall O'Reilly
  


------------------------------

_______________________________________________
dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users

End of dhcp-users Digest, Vol 85, Issue 13
******************************************

Reply via email to