Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Heuristic to break DHCP infinite loop
2020-04-03, 10:24 (This post was last modified: 2020-04-03 10:40 by alkisg.)
Post: #1
Heuristic to break DHCP infinite loop
I would like to propose a small heuristic to make it easier to break the DHCP infinite loop.

Currently, users that have microtik routers or pfsense servers are advised to build ipxe on their own, while embedding a script to break the loop.

My proposed heuristic is that ipxe would automatically prefer a special "ipxe-override-filename" DHCP option to the stock DHCP filename. That way, if users define both options in their DHCP, then the first request will use "filename" (e.g. ipxe.pxe), while the ipxe request will use "ipxe-override-filename" (e.g. menu.ipxe).

Avoiding custom iPXE builds has the following benefits:
  • Less work, no need to setup a development environment
  • Allows automatic updates from distribution packages
  • Allows ipxe.efi to be signed
Find all posts by this user
Quote this message in a reply
2020-04-05, 12:34 (This post was last modified: 2020-04-05 13:29 by alkisg.)
Post: #2
RE: Heuristic to break DHCP infinite loop
I just noticed the almost undocumented scriptlet option. This is even better than the heuristic that I suggested.

So now I just want to suggest that scriptlet gets documented in https://ipxe.org/cfg/scriptlet and in https://ipxe.org/howto/chainloading.

For dnsmasq, an example syntax is:
Code:
dhcp-option-force=encap:175,81,"ifopen && chain ltsp/ltsp.ipxe || shell"

P.S. keep in mind that scriptlet won't work if iPXE is booted locally, from ipxe.iso etc; it will only work if ipxe.pxe, undionly.kpxe etc are loaded over the network, so that scriptlet is there even before the "dhcp" command is run.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)