DHCP settings checks only one interface IP via ifconfig to validate settings
|Affected version:||2.0||Affected Architecture:||All|
The DHCP configuration checks the IP address of an interface to ensure that the range is valid. However, it only checks one IP address on an interface.
Technically it would be valid to run DHCP on any IP alias subnet as well, even if it is ugly.
The main problem here is if you do have multiple IPs on an interface, only one is checked, so even if your LAN IP is on the interface, if another IP is returned first by the check, it's discarded as invalid even if it is proper.
See #1522 for an example of how this can be problematic.
#1 Updated by Ermal Luçi about 2 years ago
Well i would like this to be closed or turned to a feature.
The way dhcpd is configured from GUI is trhough tabs that refer to the interface.
Unless you show tabs for ipaliases this is very wrong to do behind the scenes.
The bug this was related to has been fixed yesterday.
#2 Updated by Jim P about 2 years ago
- Target version changed from 2.0 to Future
Well you can't have two active subnets on an interface for DHCP, so it doesn't make sense to make another tab when it can't be active at the same time as the LAN subnet. It would be nicer to just relax the check a little so that the IP alias subnet could be used instead. (Though arguably if someone really wanted to do that they could just swap the LAN IP for the IP alias...)
Though the original bug is fixed, I did confirm that earlier today. Moving it to 'future' since it's not really that important to have any time soon.
#3 Updated by Larry Titus 8 months ago
D'oh! I wish I had looked here before typing up a ticket that is exactly that same issue as in this ticket. In my case I have several subnets on an interface most of which the IPs are assigned statically. I recently needed to DHCP just a single specific subnet for PXE that was not the primary subnet and ran into this issue.