DEV Community

AdminPackStudio
AdminPackStudio

Posted on

Windows DHCP Server Not Leasing: A Read-First Event 1046, Event 1042, Unauthorized-in-AD, and Scope Exhausted Triage

Helpdesk: "Half the floor has 169.254 addresses. The DHCP server's System log has Event 1046 saying it is not authorized, and last month somebody mentioned the scope was almost full. Should we just authorize it again and extend the range?"

Maybe, but those are two different problems with two different events, and fixing the wrong one wastes the afternoon. Event 1046 is the authorization gate: the DHCP service decided it is not allowed to serve clients and stopped. Event 1063 is the pool: the service is running and has nothing left to hand out. Microsoft's DHCP server events reference lists them as separate entries, and the fixes do not overlap.

This post is a read-first order: tell the two apart from the event log, prove the authorization state in AD before touching it, check the scope numbers, and change one thing at a time. It is a sibling of the broader Windows Server DHCP not assigning IP addresses triage, narrowed to the 1046 / 1042 / 1063 events.

TL;DR

  • Read the System log first. 1046 or 1051 means unauthorized; 1063 means scope full; 1020 is the early warning before 1063; 1042 means this server saw another DHCP server.
  • 1046 stops the service from serving clients. Microsoft's text: it "has determined that it isn't authorized to start. It has stopped servicing clients."
  • The server re-checks Active Directory every hour over LDAP and deauthorizes itself if its IP address is not in the list (Microsoft's authorization troubleshooting guide).
  • Check Get-DhcpServerInDC before clicking Authorize. A missing entry, a conflict (CNF) object, or LDAP blocked to the DC each need a different fix.
  • 1063 is not an authorization problem. Read Get-DhcpServerv4ScopeStatistics, then look for bad (declined) leases and static addresses inside the range.
  • Do not widen a scope you have not read. A full pool is often declined addresses, short lifetimes on guest networks, or statics that were never excluded.

Step 1: Read the events (read-only)

Pull the DHCP-related System events from the server. The IDs below come from Microsoft's "DHCP server events in Windows Server" page.

Get-WinEvent -FilterHashtable @{ LogName='System'; Id=1020,1041,1042,1043,1044,1045,1046,1050,1051,1059,1063,1341; StartTime=(Get-Date).AddDays(-7) } -ErrorAction SilentlyContinue |
    Select-Object TimeCreated, Id, ProviderName, @{n='Msg';e={ ($_.Message -split "`n")[0] }} |
    Sort-Object TimeCreated
Enter fullscreen mode Exit fullscreen mode

Read the sequence, not just the last line:

Event Microsoft's name What it tells you
1020 EVENT_SERVER_LOW_ADDRESS_WARNING A scope is "percent full with only N IP addresses remaining" (early warning)
1041 DHCP_ROGUE_EVENT_NO_NETWORK No active interface with a static IPv4 address, so no DHCPv4 clients are served
1042 DHCP_ROGUE_EVENT_UNAUTHORIZED_INFO This service "has detected a server on the network" (the other server's IP is in the text)
1044 DHCP_ROGUE_EVENT_STARTED_DOMAIN Authorized to start; servicing clients
1046 DHCP_ROGUE_EVENT_STOPPED_DOMAIN Not authorized; "stopped servicing clients"
1050 DHCP_ROGUE_EVENT_NETWORK_FAILURE A network error during the authorization check
1059 EVENT_SERVER_COULDNT_SEE_DS The service "failed to see a directory server for authorization"
1063 EVENT_SERVER_SCOPE_FULL "There are no IP addresses available for lease in the scope or superscope"
1341 EVENT_SERVER_POLICY_RANGES_FULL No addresses left in the ranges of a policy inside a scope

A 1044 followed later by a 1046 means the server was authorized and then lost it (hourly check, deleted entry, or lost LDAP path). A 1063 with no 1046 means the server is authorized and simply out of addresses. Both can be true at once on a messy network.

Step 2: Read the service and the binding (read-only)

Microsoft's server troubleshooting checklist starts with whether the service is running and whether it binds to an address in the scope's subnet (unless relay is used).

Get-Service DHCPServer
Get-DhcpServerv4Binding
netstat -anb | findstr /R ":67 :68"
Enter fullscreen mode Exit fullscreen mode

Microsoft also says only the DHCP server should be listening on UDP 67 and 68, with no other process such as WDS or PXE occupying them. Event 1041 means there is no active interface with a static IPv4 address, which is a different cause than 1046.

Step 3: Prove the authorization state in AD (read-only)

Microsoft's guide says the authorized list lives in the Configuration container, and that the server validates its status in AD DS every hour using LDAP, deauthorizing itself if its IP address is not in the list. Check the list from the AD side:

Get-DhcpServerInDC
netsh dhcp show server
Enter fullscreen mode Exit fullscreen mode

Interpret the output:

  • Server is listed with the right IP: authorization is not the current problem. Look for a later 1042 (a second server) or a network error (1050, 1059).
  • Server is not listed: the entry was deleted or never created. Go to Step 4.
  • Server is listed with an old IP address: the hourly check matches on the IP address, so a renumbered server can fall out of the list. Compare against Get-NetIPAddress on the server.

You can also open adsiedit.msc, connect to the Configuration partition, and look under Services > NetServices. Microsoft lists this as the alternative check, and it is also where a conflict object would show up.

Then test the path from the DHCP server to a domain controller, because LDAP on TCP 389 is how the check works:

Test-NetConnection -ComputerName 'DC1.contoso.com' -Port 389
Enter fullscreen mode Exit fullscreen mode

Replace the name with one of your DCs. If that fails, authorization will fail until the firewall or routing is fixed. The symptom Microsoft documents for that case is "Error Code: 20070. The DHCP service could not contact Active Directory."

Step 4: Change one thing to restore authorization

Pick the row that matches Step 3, not the one that is fastest.

What Step 3 showed Microsoft's guidance Change
Entry missing, LDAP fine Authorize with an Enterprise Admin account Add-DhcpServerInDC -DnsName 'dhcp1.contoso.com' -IPAddress 10.10.10.2 or right-click the server and choose Authorize
LDAP to the DC fails Verify TCP/UDP 389 and firewall settings Fix the path first, then authorize
A CNF: conflict object under NetServices Delete the conflicting object after an AD backup, then reauthorize Take the backup first
Entry keeps disappearing Find out who deletes it Turn on Audit Directory Service Changes and auditing on the NetServices container, then read the delete event

Microsoft's guide explains why the last row matters: if you manually authorize and the server fails again days later, the entry is being deleted, and reauthorizing again only resets the clock. Microsoft's example is auditing Write All Properties, Delete, and Delete Subtree on the NetServices container for Everyone, then reading the "A directory service object was deleted" event when it happens.

After authorizing, confirm Event 1044 or 1043 appears and Get-DhcpServerInDC lists the server. If the AD side looks fine but authorization fails with replication symptoms, check AD replication first. See AD replication error 1722 and AD replication Event 1988.

Step 5: Read Event 1042 as a second-server question

1042 says the service "has detected a server on the network." That is not an error by itself. Read the text: it lists the other server's IP and domain, or an empty domain if it belongs to none. Microsoft's 1046 text lists a related cause: the local machine "can't reach its directory service enterprise and it has encountered another DHCP service on the network belonging to a directory service enterprise on which the local machine isn't authorized."

Practical read: find the other server by the IP in the event. If it is a legitimate DHCP server in another domain or a workgroup test box, decide which one should own that VLAN. If it is a router or a lab box nobody remembers, that is your finding. Do not authorize your server in a different domain's list just to silence the event.

Step 6: Read the scope numbers (read-only)

If the service is authorized and you see 1020 or 1063, the question is where the addresses went. Microsoft's cmdlet reference gives the statistics cmdlet and a filter on PercentageInUse:

Get-DhcpServerv4ScopeStatistics | Sort-Object PercentageInUse -Descending |
    Format-Table ScopeId, Free, InUse, PercentageInUse, Reserved, Pending -AutoSize
Enter fullscreen mode Exit fullscreen mode

Then look at the scope you care about (replace the scope ID):

Get-DhcpServerv4Scope -ScopeId 10.10.10.0 | Format-List ScopeId, StartRange, EndRange, LeaseDuration, State
Get-DhcpServerv4ExclusionRange -ScopeId 10.10.10.0
Get-DhcpServerv4Lease -ScopeId 10.10.10.0 -BadLeases
Get-DhcpServerv4FreeIPAddress -ScopeId 10.10.10.0 -NumAddress 5
Enter fullscreen mode Exit fullscreen mode

What to read:

  • Bad leases. Microsoft says a lease declined by a client because of a conflict with another client is marked bad, or declined, and -BadLeases returns only those. A pile of them means something else is using addresses inside your range.
  • Statics not excluded. The troubleshooting checklist asks you to check "whether any devices on the network have static IP addresses that haven't been excluded from the DHCP scope."
  • Lease duration against the client mix. A long lease on a network with transient clients holds addresses long after the device is gone. The cmdlet reference shows Set-DhcpServerv4Scope -LeaseDuration taking a time span.
  • Policy ranges (1341). If the scope looks fine but one device class fails, read the policy ranges. 1341 is a separate "ranges full" event.
  • Failover. If the scope is in a failover relationship, add -Failover to the statistics cmdlet so you are reading the shared picture, not one partner.

Step 7: Change one thing to fix a full scope

Pick the change that matches what Step 6 showed:

What Step 6 showed Change
Statics inside the range, never excluded Add an exclusion for them (Add-DhcpServerv4ExclusionRange), or move the devices to reservations
Many bad leases Find the device holding the address, fix it, then clear the bad lease
Lease duration far longer than clients stay Shorten it with Set-DhcpServerv4Scope -LeaseDuration on that scope only
The range is just too small for the subnet Extend the range or add a scope or superscope (the 1063 text covers "the scope or superscope"), after checking the subnet really has room

Do the change in a window, change one row, and watch the statistics for a lease cycle before the next change.

Step 8: Prove it (read-only)

Get-DhcpServerInDC
Get-DhcpServerv4ScopeStatistics | Where-Object { $_.PercentageInUse -gt 80 }
Get-WinEvent -FilterHashtable @{ LogName='System'; Id=1020,1042,1043,1044,1046,1063; StartTime=(Get-Date).AddHours(-24) } -ErrorAction SilentlyContinue
Enter fullscreen mode Exit fullscreen mode

You are done when the server is listed in the DC, a 1043 or 1044 is the latest rogue-detection event, no new 1046 or 1063 appears after the change, and a test client on that VLAN gets a lease (ipconfig /renew from a client, then read the lease on the server). Give the hourly authorization check one more hour before you call it fixed.

Common false starts

  • "Authorize it again." Fine as a first aid, but if the entry was deleted, it will be deleted again. Audit the container.
  • "1046 means the scope is full." It does not. 1063 is the pool event.
  • "Double the scope range." Overlapping a static or an unexcluded range makes the bad-lease pile bigger.
  • "The other DHCP server in 1042 is the problem." Check first whether it is a legitimate server; do not deauthorize something you have not identified.
  • "Disable the firewall to test." Test TCP 389 to the DC with Test-NetConnection and fix the specific rule.

Related posts

Free checklist

An unauthorized server is a change nobody reviewed, and the same habit applies to access policy. The free Conditional Access pre-enforcement checklist keeps break-glass accounts, pilot groups, and report-only review on one page:

👉 https://cashflow4375.gumroad.com/l/ujkqxb?utm_source=devto&utm_medium=article&utm_campaign=aps_first_sale&utm_content=dhcp-event-1046-scope-full

If you want the rest of the Intune runway written down for the team (enrollment hygiene, compliance phasing, break/fix cards and read-only PowerShell snapshots), the Intune & M365 Admin Starter Pack pairs with this triage: https://cashflow4375.gumroad.com/l/joonf?utm_source=devto&utm_medium=article&utm_campaign=aps_first_sale&utm_content=dhcp-event-1046-scope-full


Sources: Microsoft Learn, "DHCP server events in Windows Server"; "Troubleshooting guide: DHCP authorization failures"; "Troubleshoot problems on the DHCP server"; DhcpServer module cmdlet references (Get-DhcpServerInDC, Add-DhcpServerInDC, Get-DhcpServerv4ScopeStatistics, Get-DhcpServerv4Lease, Get-DhcpServerv4FreeIPAddress, Set-DhcpServerv4Scope). Commands are read-only unless a step says to change something. Test in a lab first.

Top comments (0)