Event 20287 DHCP (Out Of Available IP Addresses) On Server 2019 - But There Are Plenty

MISAdmin 386 Reputation points
2023-12-11T13:30:33.2533333+00:00

One of my DHCP scopes is giving me the 20287 events when I try to connect new clients. The start IP for the scope is .100 and the end IP is .150. I have 23 reservations and under Leases, the reservations are the only leases shown. The last reservation is .119 and when I issue a powershell Get-DHCPServerV4FreeIPAddress command on the scope, it shows all the other IPs as free. This is correct as I currently don't have any other leases. I previously had a policy enabled that would only allow certain MAC addresses but that policy is now disabled.

Reconcile shows the database is consistent. Statistics show 35 available addresses.

I've been searching for a solution but so far, I have been unsuccessful. Am I missing something here?

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Danish Gul Khattak 335 Reputation points
    2023-12-11T14:37:21.6466667+00:00

    It seems like you've covered several troubleshooting steps already. Since the issue persists, consider checking if there are any conflicting configurations in your network, such as duplicate IP addresses or conflicting DHCP settings on other devices. Additionally, ensure that the DHCP server has proper permissions.

    You might also want to restart the DHCP server service to see if it resolves the problem. If the issue persists, reviewing recent system and DHCP server logs for any relevant error messages could provide additional insights into the problem.

    Lastly, consider temporarily expanding the DHCP scope range to see if the problem persists with a broader range of IP addresses. This could help narrow down whether the issue is specific to the current scope or a more general DHCP configuration problem.

    0 comments No comments

  2. MISAdmin 386 Reputation points
    2023-12-11T15:22:47.6166667+00:00

    Thanks Danish. I restarted the DHCP server a couple times already and increased the scope a couple time also. Cannot find any conflicting configs anywhere. I have two DHCP servers, one on each DC and they are configured with load Balance Failover. I also checked permissions and they are good. I have an account configured for DNS dynamic updates. I have also been through all the logs I can find.

    0 comments No comments

  3. Danish Gul Khattak 335 Reputation points
    2023-12-12T12:35:50.2666667+00:00

    Hello Dear, sorry if i am repeating things but I am trying to look at things from the start.....One thing to check is whether there are any lingering DHCP reservations or leases that might not be visible in the management console. Double-check the DHCP database for any entries that might not align with your current configuration.

    Additionally, review your DHCP server logs for any specific error messages or warnings related to these events. The event ID 20287 might have additional details that could provide insights into the issue.

    If the problem persists, further investigation into the specific details of the event logs and DHCP server configuration may be necessary.

    0 comments No comments

  4. MISAdmin 386 Reputation points
    2023-12-12T18:58:45.0766667+00:00

    Hello. I checked the server logs completely and they don't provide anything useful. How do I check for lingering leases not visible in the console?


  5. Rt My 0 Reputation points
    2025-07-01T09:01:57.9866667+00:00

    I see this also. At 8:15 am there are 0 addresses in the scope available.

    At 8:20 I restart the DHCP server, still 0 addresses. Restart the DHCP server at 8:25am. 23 addresses available. Lease Duration on the scope is 12 hours so it shouldn't be from the previous morning.

    In powershell running..

    Get-DhcpServerv4Lease -ScopeId 192.168.123.0 -allleases 
    

    will include expired leases on that 192.168.123.0 scope that aren't shown in the management console. These usually persist for 4 hours when a client leaves without doing a DHCP release.

    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc783573(v=ws.10)

    There is a non obvious LeaseExtension registry DWORD that can be added to shorten this expiry. (value in minutes), last documented for Win Server 2003 that I find.

    But there is something else aside from these listed leases preventing DHCP IP allocations in Windows server DHCP scopes.

    There are still numerical unassigned IP gaps after running the above command with --allleases that are not assigned by the DHCP server until some unknown other background cleanup (in addition to the normal 60 minute DHCP cleanup ) deigns to allow us to make use of them again.

    Fixing DHCP servers (protocols standardized in 1997) not to be curseinducing is too boring for Microsoft staff. I get the impression that most small business Windows Server upgrades are bought in blind hope that some intern has fixed something by accident.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.