netboot.xyz-docs icon indicating copy to clipboard operation
netboot.xyz-docs copied to clipboard

Suggestion: Add ProxyDHCP support

Open lars18th opened this issue 1 year ago • 3 comments

Hi,

The use case is very easy (and common): you can't replace the current DHCP server on your network and you can't edit the configuration to add the next-server option to it.

In this case the only option is to use the ProxyDHCP way. How it works? It uses a non-standard booting method where your booting client receives two DHCP OFFER packets. One is from the stock DHCP server with the IP address and all other information. And another one from your booting server with the PXE data. You can read more from here https://github.com/pypxe/PyPXE/blob/master/DOCUMENTATION.md#proxydhcp

So because this project https://github.com/pypxe/PyPXE includes support for this extension, the idea is to include it. I've done some tests with it sudo python -m pypxe.server --dhcp-proxy --tftp and it works with success.

The suggestion is then to add this package to this container and use it to enable this mode. I hope you want to explore it. Regards.

lars18th avatar Jul 31 '24 12:07 lars18th

ProxyDHCP is already supported, if you drop a local-vars.ipxe in your local tftp root and set:

set use_proxydhcp_settings true

That will enable the proxydhcp code path:

https://github.com/netbootxyz/netboot.xyz/blob/development/roles/netbootxyz/templates/disks/netboot.xyz.j2#L31

antonym avatar Aug 01 '24 00:08 antonym

Wow, that's great! I'll try it.

However, perhaps it has sense to add this description in the main README.md because this information has no visibility. And also I suggest to include a toggle in the UI to enable it, instead of a manual setting. Do you agree with that?

lars18th avatar Aug 01 '24 06:08 lars18th

Moving to docs project to make a note to write some.

antonym avatar Aug 04 '24 02:08 antonym