iPXE discussion forum

Full Version: DHCP option 203
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I need to base the IQN of my iPXE-booted initiators off of MAC addresses rather than uuid. I have multiple, identical hardware platforms, so the identical uuid is throwing off my iSCSI target software. I'm running dnsmasq on my network, and already have all the hardware mounting the iSCSI target and booting from it normally. I added the following to my dnsmasq.conf file:

dhcp-option=203,"iqn.2010-04.org.ipxe:${mac:hexhyp}"

This sort of works, as every iPXE booted machine uses that exact string for the IQN. Is there any way to use the variable like you would in a script via DHCP instead? I'm not using a script at all, and I'd like every needed option to come from DHCP.
(2012-10-09 17:06)digitalis99 Wrote: [ -> ]So, I need to base the IQN of my iPXE-booted initiators off of MAC addresses rather than uuid. I have multiple, identical hardware platforms, so the identical uuid is throwing off my iSCSI target software. I'm running dnsmasq on my network, and already have all the hardware mounting the iSCSI target and booting from it normally. I added the following to my dnsmasq.conf file:

dhcp-option=203,"iqn.2010-04.org.ipxe:${mac:hexhyp}"

This sort of works, as every iPXE booted machine uses that exact string for the IQN. Is there any way to use the variable like you would in a script via DHCP instead? I'm not using a script at all, and I'd like every needed option to come from DHCP.

You'll need to use a script to get that behaviour. Use something like:

Code:
#!ipxe

set initiator-iqn iqn.2010-04.org.ipxe:${mac:hexhyp}
sanboot ${root-path}

Michael
Thanks. I figured out how to do it by script, I was just hoping to not have to hit the TFTP server a second time, since I'm chainloading iPXE. If script is the only method, then script it is.
(2012-10-10 16:03)digitalis99 Wrote: [ -> ]Thanks. I figured out how to do it by script, I was just hoping to not have to hit the TFTP server a second time, since I'm chainloading iPXE. If script is the only method, then script it is.

You can embed the script within the iPXE binary: http://ipxe.org/embed

Michael
Reference URL's