iPXE discussion forum
Request for new Mac Address varible expansion character - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Request for new Mac Address varible expansion character (/showthread.php?tid=1103)



Request for new Mac Address varible expansion character - Skeilio - 2012-01-08 23:29

Right now from the documentation the following is true
http://192.168.0.1/boot.php?mac=${net0/mac}
which would expand to a URL such as
http://192.168.0.1/boot.php?mac=52:54:00:12:34:56

What I would like to do is use varible expansion in the DHCP option 017.
Like the following
017 Root Path iscsi:192.168.0.1::::${net0/mac}
in which would expand to
017 Root Path iscsi:192.168.0.1::::52-54-00-12-34-56
or
017 Root Path iscsi:192.168.0.1::::525400123456

but by default the mac address varible returns ":" which do not work.

I do not want to use an ipaddress as there is no absolute gaurantee
unless you use a reservation that you will alwasy get that ip.

This way you do not need a web server to do the translation only that the iSCSI target has a registration for that mac address.

Thank You


RE: Request for new Mac Address varible expansion character - mcb30 - 2012-01-11 13:05

(2012-01-08 23:29)Skeilio Wrote:  What I would like to do is use varible expansion in the DHCP option 017.
Like the following
017 Root Path iscsi:192.168.0.1::::${net0/mac}
in which would expand to
017 Root Path iscsi:192.168.0.1::::52-54-00-12-34-56
or
017 Root Path iscsi:192.168.0.1::::525400123456

but by default the mac address varible returns ":" which do not work.

As described in the Notes section at http://ipxe.org/cfg/mac#notes, you can use ${net0/mac:hexhyp} to obtain the MAC address using a hyphen separator. Maybe this is what you want?

Michael