Update docs and examples for ProxyDHCP required network modes

This commit is contained in:
Robert Coleman 2024-11-03 09:43:38 +13:00
parent f36963f39d
commit 17c1813597
2 changed files with 7 additions and 2 deletions

View File

@ -66,6 +66,8 @@ docker run -d \
-p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \ -p 8080:80 `# optional, destination should match ${NGINX_PORT} variable above.` \
-v /local/path/to/config:/config `# optional` \ -v /local/path/to/config:/config `# optional` \
-v /local/path/to/assets:/assets `# optional` \ -v /local/path/to/assets:/assets `# optional` \
--cap-add NET_ADMIN `# only required for DHCP Proxy mode` \
--network host `# only required for DHCP Proxy mode` \
--restart unless-stopped \ --restart unless-stopped \
ghcr.io/netbootxyz/netbootxyz ghcr.io/netbootxyz/netbootxyz
``` ```
@ -127,7 +129,7 @@ Container images are configured using parameters passed at runtime (such as thos
This image requires the usage of a DHCP server in order to function properly, unless you enable the **optional proxy-DHCP mode**. If you have an existing DHCP server, you will need to make some small adjustments to forward requests to the netboot.xyz container. You will typically set your `next-server` and `boot-file-name` parameters in the DHCP configuration. This tells DHCP to forward requests to the TFTP server and then select a boot file from the TFTP server. This image requires the usage of a DHCP server in order to function properly, unless you enable the **optional proxy-DHCP mode**. If you have an existing DHCP server, you will need to make some small adjustments to forward requests to the netboot.xyz container. You will typically set your `next-server` and `boot-file-name` parameters in the DHCP configuration. This tells DHCP to forward requests to the TFTP server and then select a boot file from the TFTP server.
If you prefer not to modify your existing DHCP server, you can enable the **proxy-DHCP mode** by setting the `DHCP_RANGE_START` environment variable to the first IP in your DHCP range (e.g. 192.168.1.1). This mode allows netboot.xyz to provide PXE boot configuration while your existing DHCP server continues to handle IP address assignment. If you prefer not to modify your existing DHCP server, you can enable the **proxy-DHCP mode** by setting the `DHCP_RANGE_START` environment variable to the first IP in your DHCP range (e.g. 192.168.1.1). This mode allows netboot.xyz to provide PXE boot configuration while your existing DHCP server continues to handle IP address assignment. This mode requires the docker (or docker compose) parameter `--cap-add NET_ADMIN` be added and for the container to be running directly on the network to see the DHCP messages, i.e. with network mode set to `host` or via `ipvlan`/`macvlan` or a bridge.
### Examples ### Examples

View File

@ -8,7 +8,7 @@ services:
- MENU_VERSION=2.0.47 # optional - MENU_VERSION=2.0.47 # optional
- NGINX_PORT=80 # optional - NGINX_PORT=80 # optional
- WEB_APP_PORT=3000 # optional - WEB_APP_PORT=3000 # optional
- DHCP_RANGE_START=192.168.0.1 # optional, enables DHCP Proxy mode. set to your network's DHCP range first IP - DHCP_RANGE_START=192.168.0.1 # optional, enables DHCP Proxy mode. set to your network's DHCP range first IP.
volumes: volumes:
- /path/to/config:/config # optional - /path/to/config:/config # optional
- /path/to/assets:/assets # optional - /path/to/assets:/assets # optional
@ -17,3 +17,6 @@ services:
- 69:69/udp - 69:69/udp
- 8080:80 # optional, destination should match ${NGINX_PORT} variable above. - 8080:80 # optional, destination should match ${NGINX_PORT} variable above.
restart: unless-stopped restart: unless-stopped
# cap_add:
# - NET_ADMIN # required for DHCP Proxy mode.
# network_mode: host # required for DHCP Proxy mode - network mode host, (or ipvlan/macvlan or a bridge).