iPXE discussion forum

Full Version: DHCP Option (iPXE View)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OK, I was using a Windows DHCP Server in conjunction with the Remote Boot Service for Windows Embedded: I wasn't sure what options it was offering up "under the covers". It looked a lot like DHCP Options 17 and 67, but I couldn't see those options populated with my input; so I wrote a quick and dirty little Windows script which belts out a semi-usable ipxe script: just change ",," to "&&" in a text editor...

Code:
@ECHO OFF

::Script to create DHCP option query

SETLOCAL

SET OPT_VALUE=0

ECHO #!ipxe>dhcp.ipxe

:LOOP
IF %OPT_VALUE% GEQ 254 GOTO END
SET /A OPT_VALUE=%OPT_VALUE%+1
ECHO echo %OPT_VALUE% ,, echo ${%OPT_VALUE%} ,, sleep 1 >>dhcp.ipxe

GOTO LOOP


:END

ECHO prompt>>dhcp.ipxe

ENDLOCAL
PAUSE

For the Record...what I was looking for was what the RBS handed out as far as a path and file... it used DHCP Option 253 to do the following where: %BOOTIMAGE% and %BOOTPARAMETERS% are the two variables I found in the RBS which I did not know the mechanics of: Microsoft, ever so thoughtful, did NOT document this...

Code:
[boot loader]
timeout=30
default=ramdisk(0)\windows
[operating systems]
ramdisk(0)\windows="Windows XP Embedded" /rdpath=net(0)\%BOOTIMAGE% %BOOTPARAMETERS%

Again, In the Remote Boot Server UI, these look a lot like DHCP Options 17 and 67, but alas, they are not...
If you have access to a packet trace that is usually much more helpful in figuring out what gets transmitted. The "config" iPXE command (http://ipxe.org/cmd/config) is also useful to see what you have.
Reference URL's