<div dir="ltr"><pre>:targetname${net0/ip}</pre></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 July 2013 21:26, Gruher, Joseph R <span dir="ltr"><<a href="mailto:joseph.r.gruher@intel.com" target="_blank">joseph.r.gruher@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, the _how_ is always the tricky part. :)<br>
<br>
Anyone know if it is possible to use the IP in an iPXE script? I know I could use MAC or UUID but I would like to avoid tying the target to a hardware parameter because clients will eventually need replacement and then you have to update the targets to match the new hardware. I could use the available IPs as target names and do something like this _if_ I can fetch the IP address in an iPXE script:<br>
<br>
sanboot --drive 0x80 iscsi:yourtarget.your.domain.name::::iqn.2013-07.name.domain.your:targetname${IP_ADDRESS}<br>
<div class="im HOEnZb"><br>
Thanks,<br>
Joe<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a> [mailto:<a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a>] On Behalf Of Robin Smidsrød<br>
</div><div class="im HOEnZb">Sent: Thursday, July 25, 2013 12:42 PM<br>
To: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
Subject: Re: [ipxe-devel] help pushing iscsi targets with DHCP<br>
<br>
</div><div class="HOEnZb"><div class="h5">On <a href="tel:25.07.2013%2017" value="+12507201317">25.07.2013 17</a>:11, Gruher, Joseph R wrote:<br>
> After doing some more reading last night it looks like it might at least be possible by using host or subclass statements, each having a unique root-path and being tied to a unique MAC, except then I have to capture all the client MAC addresses on the server. It would be nice if I could just tell the server when it hands out 10.0.0.1 hand out the root path for target01, and 10.0.0.2 hand out target02, and so on, so I can just pair targets to IPs. All the clients are identical so it doesn't actually matter if they get the same target every time and long as they each get a unique target.<br>
<br>
The root-path DHCP option uses the same sanboot URL syntax as sanboot/sanhook, so you can indeed use DHCP host blocks to target it directly to the specific nodes. Using the assigned IP address as the wildcard for specifying the target IQN is a viable solution, albeit a but uncommon. But for your use-case it seems to be a good option.<br>
<br>
I'm not sure _how_ to do what you're suggesting in ISC dhcpd, though.<br>
<br>
>From what I understand, you can have a generic subnet block, but you'll need to be able to pull out the DHCP response variable representing the currently assigned IP address for the host (before it's actually sent to the client) and use that to dynamically build up the root-path for the same client.<br>
<br>
I'd very much like to see the dhcpd config block that actually does that, as I have no idea how to do that myself.<br>
<br>
-- Robin<br>
_______________________________________________<br>
ipxe-devel mailing list<br>
<a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
<a href="https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel" target="_blank">https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel</a><br>
_______________________________________________<br>
ipxe-devel mailing list<br>
<a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
<a href="https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel" target="_blank">https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">❂ David Lutton<br>@ <a href="mailto:david.lutton@gmail.com" target="_blank">david.lutton@gmail.com</a><br>☎ 07792 560341<br>☏ 01245 226837</div>
</div>