(Note: This article deals with Windows products that were years old.) Only to do the training materials used)
What is the order of name resolution in Windows? Many Chinese technical articles or inconsistencies, or vague, are they wrong? No, it's just that I didn't make the specific conditions clear.
For example, this common description of the name of the resolution sequence of pictures:
But is this order necessarily correct? The answer should be, on a specific occasion, to be correct. This particular situation refers to the 1 OS is Windows 2000 or later, and 2 uses the H-mode node mode. But these, many of the documents that refer to this picture are not explained.
2 important factors that determine the order of name resolution: first, OS version, second, node mode
The OS version determines the name resolution priority DNS or the priority query NetBIOS. Node mode determines whether to first check WINS or broadcast first.
After Windows 2000 (including 2000, XP, Vista, Win7, 2003, 2008), check DNS first, then NetBIOS.
Windows 9x/nt before, all the NetBIOS, check DNS.
The node mode is explained in the following text.
Next we'll explain some of the common problems in a question-and-answer way.
Query order for Q:dns name:
DNS cache→hosts file →dns Server
Query order for Q:netbios name:
If it's H-mode: NetBIOS cache→wins server→ broadcast →lmhosts files
In other modes, the order of wins and broadcasts is different, see below.
Location of Q:hosts and Lmhosts files
%systemroot%\system32\drivers\etc
%systemroot% are usually c:\windows,nt under the C:\WINNT.
(View the systemroot path, you can enter the set command under CMD)
By default, the Lmhosts file does not exist, the system has a Lmhosts sample file Lmhosts.sam, you can write your Lmhosts in imitation of Lmhosts.sam file
Q: How do I look at the current node mode?
Ipconfig/all