PXE DHCP Handover

Hello,

Just checking some logic:-

  1. A PXE client starts and does DHCPDISCOVER on its first interface;
  2. A PXE server responds and provides DHCPOFFER;
  3. The client uses DHCPREQUEST to formally request from what was offered by the server;
  4. The server performs accounting and responds with DHCPACK;
  5. The client performs PXE actions (download, execute).

Assuming that this process would be starting a new instance of OpenWrt, is there a way to passthrough the obtained IP configuration to the instance? I’ve tried the “ip=“ kernel parameter but this appears to be NFS module specific and dmesg indicates that it isn’t picked up by anything in the default initramfs.

Is it expected for a DHCP-configured interface to obtain its configuration twice on startup, or can this be done more efficiently?

Can you clarify this part of your statement?

Are you saying that you're PXE booting an image of OpenWrt on the client?

Yes, so in an x86_64 VM environment:-

First VM runs OpenWrt with a static IP configuration and dnsmasq configured for PXE booting;

Second, third, fourth VMs run iPXE to obtain IP address and OpenWrt kernel/initramfs from the first VM.