You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-36Lines changed: 46 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,62 +123,72 @@ Container images are configured using parameters passed at runtime (such as thos
123
123
124
124
## DHCP Configurations
125
125
126
-
This image requires the usage of a DHCP server in order to function properly. If you have an existing DHCP server, usually you will need to make some small adjustments to make your DHCP server forward requests to the netboot.xyz container. You will need to 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.
126
+
The netboot.xyz Docker image requires the usage of a DHCP server in order to function properly. If you have an existing DHCP server, usually you will need to make some small adjustments to make your DHCP server forward requests to the netboot.xyz container. The main settings in your DHCP or router that you will typically need to set are:
127
127
128
-
### Examples
128
+
*`tftp-server` also known as `next-server`, this option tells the client where to look for the boot file
129
+
*`boot-file-name`, this option tells the client which boot file to load
129
130
130
-
These are a few configuration examples for setting up a DHCP server. The main configuration you will need to change are `next-server` and `filename/boot-file-name`. `Next-server` tells your client to check for a host running tftp and retrieve a boot file from there. Because the docker image is hosting a tftp server, the boot files are pulled from it and then it will attempt to load the iPXE configs directly from the host. You can then modify and adjust them to your needs. See [booting from TFTP](https://netboot.xyz/docs/booting/tftp/) for more information.
131
+
## Examples
131
132
132
-
#### isc-dhcp-server
133
+
The following are some configuration examples for setting up a DHCP server to get started. The main configuration you will need to change are `SERVER_IP_ADDRESS` so that DHCP can direct the client to the server running the netboot.xyz Docker container. Because the Docker image is hosting a dnsmasq TFTP server, the boot files are pulled from it and then it will attempt to load the iPXE configs directly from the host. You can then modify and adjust them to your needs. See [booting from TFTP](https://netboot.xyz/docs/booting/tftp/) for more information.
133
134
134
-
To install the DHCP server under Debian and Ubuntu run:
135
+
### Setting up dnsmasq
136
+
137
+
To install dnsmasq as your DHCP server for Debian and Ubuntu, run:
135
138
136
139
```shell
137
-
sudo apt install isc-dhcp-server
140
+
sudo apt install dnsmasq
138
141
```
139
142
140
-
You must edit two files to configure `isc-dhcp-server`. Edit `/etc/default/isc-dhcp-server` and configure at least one of the INTERFACES variables with the name of the interface you want to run the DHCP server on:
143
+
For Redhat-based systems, run:
141
144
142
145
```shell
143
-
INTERFACESv4="eth0"
146
+
sudo dnf install dnsmasq
144
147
```
145
148
146
-
You'll also need a `/etc/dhcp/dhcpd.conf`looking something like this:
149
+
Set up your configuration file `/etc/dnsmasq.conf`with the following settings:
147
150
148
151
```shell
149
-
option arch code 93 = unsigned integer 16;
150
-
151
-
subnet 192.168.0.0 netmask 255.255.255.0 {
152
-
range 192.168.0.34 192.168.0.254;# Change this range as appropriate for your network
153
-
next-server 192.168.0.33;# Change this to the address of your DHCP server
154
-
option subnet-mask 255.255.255.0;
155
-
option routers 192.168.0.1;# Change this to the address of your router
156
-
option broadcast-address 192.168.0.255;
157
-
option domain-name "mynetwork.lan";# This is optional
158
-
option domain-name-servers 1.1.1.1;
159
-
if exists user-class and ( option user-class = "iPXE" ) {
To make the dhcp server start automatically on boot:
180
+
A breakdown of the configuration:
181
+
182
+
-`dhcp-range` sets the range of IP addresses and lease times that will be assigned to clients.
183
+
-`dhcp-option` sets the default gateway and DNS servers.
184
+
-`dhcp-boot` sets the boot file for different architectures, the `SERVER_IP_ADDRESS` should be replaced with the IP address of the host running the Docker container.
185
+
-`dhcp-match` sets the match criteria for different architectures.
186
+
187
+
Once the dnsmasq configuration is set, you can enable and start the service:
0 commit comments