Page 1 of 1

[Resolved] Question on DHCP and changing pool

Posted: Wed Aug 25, 2021 2:51 pm
by maxburn
First of all is this even necessary? I am using CCD files for "some" clients, for the other clients that connect will DHCP issue IP addresses that are reserved in a CCD file for another client or is it smart enough to not do that?

If DHCP isn't smart enough to avoid those collisions I need to move the pool to avoid it. According to the manual
For example, --server 10.8.0.0 255.255.255.0 expands as follows:
mode server
tls-server

if dev tun:
ifconfig 10.8.0.1 10.8.0.2
ifconfig-pool 10.8.0.4 10.8.0.251
route 10.8.0.0 255.255.255.0
if client-to-client:
push "route 10.8.0.0 255.255.255.0"
else
push "route 10.8.0.1"
I am using client-to-client.

If I simply add "ifconfig-pool 10.8.0.200 10.8.0.250" to my server config I get errors that it conflicts with the already existing "server 10.8.0.0 255.255.255.0" entry in the config.

Following the example in the quote above if I change my config to look like this;

Code: Select all

;server 10.8.0.0 255.255.255.0
ifconfig 10.8.0.1 10.8.0.2
ifconfig-pool 10.8.0.200 10.8.0.250
route 10.8.0.0 255.255.255.0
push "route 10.8.0.0 255.255.255.0"
This breaks all my LAN routing to some clients, I have other route / push route statements in the config file for those clients.

Seems I'm not getting something about the explanation in that manual.

Re: Question on DHCP and changing pool

Posted: Wed Aug 25, 2021 3:40 pm
by TinCanTech
You can use the 'nopool' option to --server and then specify your own pool.

Re: Question on DHCP and changing pool

Posted: Wed Aug 25, 2021 5:27 pm
by maxburn
Nice, that works great! Thanks.