Open jerrywoo96 opened 1 year ago
No, that is not what i meant. A dhcp in proxy mode provides the next server and boot file information, but does not provide ip addresses. The use case is that, on most consumer routers, it is not possible to configure next server and boot file information, and thus a proxy dhcp server fulfills only this role, while the main dhcp server only hands out ip addresses.
this is an example of dnsmasq.conf that configures dhcp to work in proxy mode and host a tftp file server, where 10.0.0.251 is the proxy dhcp and tftp file server address, working with another dhcp server that hands out ip addresses on another ip address in the network.
port=0
log-queries
log-dhcp
enable-tftp
tftp-root=/tftp
dhcp-range=10.0.0.251,proxy,255.255.255.0
dhcp-userclass=set:iPXE,iPXE
dhcp-boot=tag:iPXE,/boot.ipxe,,10.0.0.251
dhcp-boot=tag:!iPXE,/undionly.kpxe,,10.0.0.251
pxe-service=tag:!iPXE,2,,/ipxe.efi,10.0.0.251
pxe-service=tag:!iPXE,6,,/ipxe.efi,10.0.0.251
pxe-service=tag:!iPXE,7,,/ipxe.efi,10.0.0.251
pxe-service=tag:!iPXE,9,,/ipxe.efi,10.0.0.251
pxe-service=tag:!iPXE,10,,/ipxe.efi,10.0.0.251
pxe-service=tag:!iPXE,11,,/ipxe.efi,10.0.0.251
# https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
# https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml#table-options
# https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#table-processor-architecture
iVentoy currently doesn't support DHCP proxy mode. So you must provide another DHCP proxy server to work together with the main DHCP server. In iVentoy's eye the main DHCP server and the DHCP proxy server composite one virtual third-part DHCP server.
Is there any plan in mind this proxy dhcp feature would be added in the future so that external proxy dhcp is not needed? If not, are you able to provide me the path to the bootfile's location so i can configure the external proxy dhcp server?
ProxyDHCP may add value and completeness to iventoy supremacy. Later on a backup/restore image fanctionality will be astonishing.
To configure a similar PXE/iPXE boot setup on a MikroTik router, you will need to modify the DHCP and TFTP settings accordingly. Here's how you can translate your dnsmasq configuration into MikroTik commands:
bash
Copy code
/ip dhcp-server
add address-pool=dhcp_pool interface=
bash Copy code /ip dhcp-server option add code=66 name=tftp-server value="'10.0.0.251'" add code=67 name=boot-file value="'undionly.kpxe'" add code=67 name=ipxe-file value="'boot.ipxe'" Code 66: Specifies the TFTP server IP. Code 67: Specifies the boot file to use for PXE clients.
a. Create a DHCP Option Set for iPXE Clients bash Copy code /ip dhcp-server option add code=67 name=ipxe-boot value="'boot.ipxe'" b. Create a DHCP Option Set for non-iPXE Clients bash Copy code /ip dhcp-server option add code=67 name=pxe-boot value="'undionly.kpxe'" c. Assign DHCP Options to Specific Clients We use option sets to apply conditions. To differentiate between iPXE and non-iPXE, we need to use a script that checks the DHCP user class (dhcp-client-class). Unfortunately, MikroTik doesn't directly support matching user-class identifiers in the same way that dnsmasq does, so you might have to manually assign or adjust by MAC address.
However, you can manually assign options based on custom rules:
bash
Copy code
/ip dhcp-server lease
add mac-address=
bash Copy code /ip tftp add address=10.0.0.251 allow-remote-requests=yes src-path=/tftp-root Make sure the necessary files (boot.ipxe, undionly.kpxe, etc.) are placed in the src-path directory on the router.
Summary of MikroTik Configuration Commands: Set up DHCP server and pool. Create DHCP options for TFTP and boot files. Assign DHCP options to clients manually. Optionally, serve files via MikroTik’s TFTP. If your setup requires advanced matching like iPXE detection in user-class, you might need to use scripts or handle that in a more manual way with MikroTik.
I have a router providing dhcp, and would like iventoy to use proxy dhcp instead of changing dhcp server every time i use iventoy.