TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.86k stars 401 forks source link

Feature Request: Allow Reservations Outside DHCP Scope #742

Closed laserjet25 closed 9 months ago

laserjet25 commented 9 months ago

Current status: When attempting to create a reservation outside the DHCP scope the following error is received: Error! Reserved address must be in scope range. (Parameter 'ReservedLeases)'

Suggestion: From my experience with PFSense the way this is currently doesn't make much sense to me. I have a range at the beginning and end of my subnets for static hosts and network equipment. Other than it being nice to see all IPs in the same place, if the device somehow resets to DHCP, it will get its own IP address assigned back to it and you don't have a loss of service. This is good for Printers and cheap switches.

ShreyasZare commented 9 months ago

Thanks for the post. This restriction is done for many reasons. If you have multiple scopes and reserved leases are allowed out of scope then the DHCP server has to search all scopes for reservation when renewing the lease. Even you yourself will find it tough to find the exact lease and will have to look in all scopes.

The solution is to use exclusion option to exclude a range within the scope so that the DHCP server does not assign them dynamically. Then create reserved lease within that excluded range. Even when you don't have an exclusion and convert a dynamic lease to reserved lease, it will work without any issues.

laserjet25 commented 9 months ago

It seems I overlooked the option to exclude a range in a DHCP scope. Thanks for helping out with this!

ShreyasZare commented 9 months ago

It seems I overlooked the option to exclude a range in a DHCP scope. Thanks for helping out with this!

You're welcome.