DHCPv4 Server, is it normal to set in this way?

Started by sw.mok, November 15, 2019, 07:31:29 AM

Previous topic - Next topic
version of my OPNsense: OPNsense 19.1.10_1-amd64
The DHCPv4 server is set to ON
When the range for IP leasing is set "From 10.100.130.1 to 10.100.132.254",
the unwanted IP will be leased out e.g 10.100.130.255, 10.100.131.0

Is it normal to lease these IP to clients?
If "NO", is it a bug need to be fixed?
If "YES", I can prevent the problem by set into 3 ranges 10.100.130.(1--254), 10.100.131.(1--254), 10.100.132.(1--254) ==> problem solved

Your network mask needs to match your DHCP range. For the 10.100.130.1 - 10.100.130.254 range this will be 10.100.130.0/22. The unusable addresses for that subnet are 10.100.130.0 (the network address) and 10.100.133.255 (the broadcast address). There is nothing to stop you using 10.100.130.255 and 10.100.131.0 since they are well in the middle of your range.

The next question of course, is if you really need over a thousand IP addresses  ;D

Bart...


surely, the netmask is set correctly
what I mean is:
Should the OPNsense let the DHCP server lease the IPs like xxx.xxx.xxx.0 or xxx.xxx.xxx.255?
or can hide these IPs in the DHCP server?

Quote from: sw.mok on November 15, 2019, 01:25:24 PM
Should the OPNsense let the DHCP server lease the IPs like xxx.xxx.xxx.0 or xxx.xxx.xxx.255?
Every DHCPv4 server should do this. These are perfectly fine IPv4 addresses within the range you specified. What's wrong with them? What "problem" are you trying to solve?

Cheers

Maurice
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

thanks for you reply
now, I found that I misunderstand the meaning of 0 and 255
after reading few passages, I just keep unleasing the first and last IPs

thanks for your reply again