User Tools

Site Tools


dns:nslookup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dns:nslookup [2022/09/07 11:17] – external edit 127.0.0.1dns:nslookup [2023/11/16 19:37] (current) – [DNS NSLookup] bstafford
Line 2: Line 2:
  
 This is a Windows tool. This is a Windows tool.
 +
 +Remember, nslookup uses DNS suffix searches first and so may get timeouts. DIG is better. Use a . at the end of the query (e.g. ''google.com.'') to force the ignoring of DNS suffix search.
  
 To lookup TXT Records To lookup TXT Records
-<code>nslookup -q=TXT tester.jbstafford.co.uk</code> +<code>nslookup -q=TXT tester.jbstafford.co.uk 8.8.8.8</code> 
-<code>nslookup -type=TXT tester.jbstafford.co.uk</code>+<code>nslookup -type=TXT tester.jbstafford.co.uk 8.8.8.8</code>
  
 ===== Different Server ===== ===== Different Server =====
 Query a different DNS server than the one specified in Windows  Query a different DNS server than the one specified in Windows 
 <code>nslookup www.google.com 1.1.1.1</code> <code>nslookup www.google.com 1.1.1.1</code>
 +
 +===== Other =====
 +Query a different DNS server than the one specified in Windows 
 +<code>nslookup
 +> set norecurse 
 +>www.google.com</code>
  
 ==== Different Port ==== ==== Different Port ====
 In theory, you can use "set port=5353" to tell nslookup to query port 5353 instead of port 53. However, this documented feature is broken in Windows and doesn't work. Use dig instead. In theory, you can use "set port=5353" to tell nslookup to query port 5353 instead of port 53. However, this documented feature is broken in Windows and doesn't work. Use dig instead.
 +
 +===== TTL =====
 +To find the TTL of a DNS record, use
 +<code>nslookup -debug www.example.com</code>
 +You will see TTL in there and possibly Default TTL
 +
 +===== Debug =====
 +<code>set debug</code>
 +<code> set nodebug</code>
 +
 +===== End Dot =====
 +When you don't put a ''.'' at the end of the query, Microsoft will test "domain"."DNS Suffix". If you do put a ''.'' at the end, Microsoft will only query what you type.
 +
 +e.g. if you are connected to a network that hands out ''example.com'' as the DNS Suffix and you lookup ''www.google.com'', then the first DNS lookup is for ''www.google.com.example.com.'' However, if you lookup ''www.google.com.'' (note the ''.'' on the far right) then it will only lookup ''www.google.com''.
dns/nslookup.1662549422.txt.gz · Last modified: (external edit)