Domain join error 0x40 (ERROR_NETNAME_DELETED, 64): the Kerberos ticket for the SMB session to the DC never arrives. Reproduce it with net use, read the TGS request in a trace, check WAN accelerators and firewalls, collect logs.
Home › Guides › Domain join error 0x40
Last updated 21 November 2026
Domain join error 0x40 is ERROR_NETNAME_DELETED (64 in decimal): The specified network name is no longer available. Microsoft ties it to getting a Kerberos ticket for the SMB session to the DC: the client's TGS request for cifs/<DC> goes out, but a valid TGS response never makes it back. Microsoft names two causes:
To narrow it down, reproduce the problem with net use to the same UNC path and take a network trace (ideally on the DC side too).
The join fails with The specified network name is no longer available. and netsetup.log contains:
NetUseAdd to \\dc1.adatum.com\IPC$ returned 64 NetpJoinDomain: status of connecting to dc '\\dc1.adatum.com': 0x40 NetpJoinDomainOnDs: Function exits with status of: 0x40
| Hexadecimal | Decimal | Symbolic name | Friendly error |
|---|---|---|---|
| 0x40 | 64 | ERROR_NETNAME_DELETED | The specified network name is no longer available. |
The first line is the connection to the DC's IPC$ share: it returns 64, which is 0x40, and the join stops with the same status.
Use the net use command to access the same UNC path the join used (the \\<DC>\IPC$ path from the NetUseAdd line) and collect a network trace while it runs.
In Microsoft's example (client CLIENT1, DC DC1.ADATUM.COM, Kerberos over TCP 88) the key frames are:
| Frames | What happens |
|---|---|
| 1534-1538 | TCP handshake from the client to the DC on port 88 (Kerberos). |
| 1539 | KerberosV5 TGS Request, Realm ADATUM.COM, Sname cifs/DC1.ADATUM.COM. |
| 1541, 1542, 1545 | The client retransmits the TCP segment and then reduces the frame size; 1546 acknowledges the data in 1545. |
| 1550-1558 | The client finishes sending (Push bit in 1550, acknowledged in 1555) and sends another request in 1552 and 1556, acknowledged in 1558. Only one data frame from the DC (1553) reaches the client. |
| 1559 | The client ends the session (FIN). |
| 1564 | The DC resets the TCP connection (RST). |
The DC acknowledges the TGS request at TCP level, which suggests it received it, but no valid TGS response arrives and the client finally terminates the connection. The sequence numbers show the DC did send other data the client never saw: the DC's first sequence numbers are 2785282676 in frame 1540, 2785284426 in frame 1555 and 2785284136 in frame 1563, and the client keeps acknowledging 2785282676 throughout. Microsoft calls that discrepancy a direct sign of problems with the flow of network traffic.
1539 CLIENT1 DC1.ADATUM.COM KerberosV5 KerberosV5:TGS Request Realm: ADATUM.COM Sname: cifs/DC1.ADATUM.COM 1541 CLIENT1 DC1.ADATUM.COM TCP TCP:[ReTransmit #1539]Flags=...A...., SrcPort=59259, DstPort=Kerberos(88), PayloadLen=1460, ... 1559 CLIENT1 DC1.ADATUM.COM TCP TCP:Flags=...A...F, SrcPort=59259, DstPort=Kerberos(88), PayloadLen=0, ... 1564 DC1.ADATUM.COM CLIENT1 TCP TCP:Flags=...A.R.., SrcPort=Kerberos(88), DstPort=59259, PayloadLen=0, Win=0, ...
A full understanding needs a trace from the DC's network as well; it might also show why the client doesn't reset the session earlier.
Look at what sits between the client and the DC. For the WAN accelerator case Microsoft notes that IP Time to Live (TTL) values in the frames are generally 64 or lower, because 64 is the TTL used by Unix-like devices and WAN accelerators are generally based on Linux. For the firewall case, the concurrent trace of the DC traffic shows more detail about the dropped KDC response. TCP 88 (Kerberos, Kerberos Key Distribution Server) is one of the ports Microsoft lists for a domain join; the full list is in the 0x6BA guide.
To troubleshoot domain join issues, Microsoft's guidance collects netsetup.log (%windir%\debug\netsetup.log, on by default) and a network trace from the client. Three ways to get both:
| Method | How | Where the files end up |
|---|---|---|
| Manually | Install Wireshark on the client, start it as administrator, start capturing, reproduce the join and record the error, stop and save the trace, then copy netsetup.log. | Wherever you save the trace, plus %windir%\debug\netsetup.log. |
| Auth Scripts | Extract the scripts, open PowerShell as administrator in that folder, run start-auth.ps1, reproduce the join, then run stop-auth.ps1. | The authlogs subfolder: Netsetup.log and the trace (Nettrace.etl). |
| TSS tool | Extract TSS, open PowerShell as administrator in that folder, run TSS.ps1 -scenario ADS_AUTH -noSDP -norecording -noxray -noupdate -accepteula -startnowait, reproduce the join, then run TSS.ps1 -stop. | C:\MS_DATA, zipped as TSS_<hostname>_<date>-<time>-ADS_AUTH.zip with Netsetup.log and <hostname>_<date>-<time>-Netsh_packetcapture.etl. |
Accept the EULA if prompted and allow execution if you're warned about an untrusted publisher. If execution policy blocks the scripts, see about_Execution_Policies.
Microsoft's networking-errors article (KB 4341920) covers nearby messages: for Network name cannot be found it says to verify that the client uses a DNS server that can resolve the target domain (check with nltest /dsgetdc:<DNS domain name> /force), type the DNS name rather than the NetBIOS name, and update the network adapter driver. If the dialog says a domain controller could not be contacted, see 0x54B; for RPC failures see 0x6BA and 0x6D9.
Look up events logged on the client at the time of the join in the Windows Event ID Lookup, copy the TSS.ps1 and nltest lines from the PowerShell Cheat Sheet, filter the TGS request and retransmit lines in an exported trace with the Regex Tester, check which subnets sit behind the WAN accelerator or firewall with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the vendor of a WAN accelerator or firewall from its MAC address in the trace with the MAC Vendor Lookup. Related guides: domain join status 0x6BA, domain join error 0x6D9, domain join error 0x54B and common AD replication errors.
Every AD replication error code with its cause and fix: common Active Directory replication errors.
0x40 is ERROR_NETNAME_DELETED (64): The specified network name is no longer available. NetSetup.log shows NetUseAdd to the DC IPC$ share returning 64 and the join exiting with status 0x40.
Microsoft ties it to getting Kerberos tickets for the SMB session. Either a WAN accelerator acknowledges the TGS request but the response does not arrive at the KDC, or a firewall between the client and the DC drops the KDC response.
Use net use to access the same UNC path and reproduce the issue, and collect a network trace while it runs. Look for a TGS request for the cifs SPN of the DC that the DC acknowledges at TCP level without a valid TGS response.
Microsoft notes that IP TTL values in such frames are generally 64 or lower, because 64 is the TTL Unix-like devices use and WAN accelerators are generally based on Linux. A trace from the DC network helps too.
Collect netsetup.log from %windir%\debug and a network trace on the client: by hand with Wireshark, with Auth Scripts (start-auth.ps1 and stop-auth.ps1) or with the TSS tool using the ADS_AUTH scenario.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.