Improve flexibility of DHCPD config #3836
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've minimally tested this. It's mostly for comment at this point.
This is a very minimal effort to allow creation of dhcpd static host configurations on ipalias subnets. It is enabled by checking the "Virtual IPs" checkbox on the DHCPD service configuration view. Once enabled, the user will be able to create static mappings with addresses that match any subnet bound to the interface, including ipalias address subnets.
In order to facilitate this change, once enabled, the dhcpd.conf is modified to include all subnets of a given interface within a "shared-network" block named for the interface the subnets live on. No options are allowed within ipalias subnets.
This is as far as I'd like to go with this feature, but it could be expanded to allow for "Additional Pools" to be created within the ipalias subnets. I did some work towards this, but have stopped as it becomes very difficult to validate the new pools and all of their options without a major refactor if services_dhcp.php.
Know issues: