nslookup command usage

Source: Internet
Author: User
Tags nameserver nslookup nslookup command

The nslookup command is used to query DNS records to see if domain name resolution is normal and to diagnose network problems in the presence of a network failure. The use of Nslookup is relatively simple, mainly the following several uses. 1. Direct Inquiry

This may be used most, query a domain name of a record.

nslookup domain [dns-server]

If Dns-server is not specified, use the system default DNS server. Here is an example:

C:\users\jackie>nslookup www.ezloo.com 8.8.8.8
Server:google-public-dns-a.google.com
address:8.8.8.8

Non-authoritative Answer:
Name:www.ezloo.com
address:70.32.68.136

2, query other records

The direct query returns a record, we can specify the parameters, query other records, such as AAAA, MX and so on.

Nslookup-qt=type Domain [Dns-server]

Where the type can be the following types:

A Address record
AAAA Address record
AFSDB Andrew File system database server records
ATMA ATM Address Records
CNAME alias Record
HINFO hardware configuration records, including CPU, operating system Information
ISDN number corresponding to ISDN domain name
MB the server that holds the specified mailbox
MG Mail Group record
MINFO information records for mail groups and mailboxes
e-Mail Records of MR renamed
MX Mail server Records
NS Name Server Records
PTR Reverse Record
RP owner Record
RT Routing penetration Record
SRV TCP Server information logging
TXT domain name corresponding to the text information
X25 domain name corresponding to the X.25 address record

For example:

C:\USERS\JACKIE>NSLOOKUP-QT=MX ezloo.com 8.8.8.8
Server:google-public-dns-a.google.com
address:8.8.8.8

Non-authoritative Answer:
ezloo.com MX preference = ten, mail exchanger = aspmx.l.google.com
ezloo.com MX preference =, mail exchanger = alt1.aspmx.l.google.com
ezloo.com MX preference = mail exchanger = alt2.aspmx.l.google.com
ezloo.com MX preference =, mail exchanger = aspmx2.googlemail.com
ezloo.com MX preference = $, mail exchanger = aspmx3.googlemail.com 3, query for more specific information

Query syntax:

nslookup–d [Other parameters] domain [dns-server]

As long as the query, plus the-d parameter, you can query the domain name cache.

C:\users\jackie>nslookup-d www.ezloo.com
------------
Got Answer:
HEADER:
opcode = QUERY, id = 1, rcode = NoError
Header flags:response, want recursion, recursion avail.
Questions = 1, answers = 1, authority records = 2, additional = 2

QUESTIONS:
196.134.191.60.in-addr.arpa, type = PTR, class = In
ANSWERS:
-> 196.134.191.60.in-addr.arpa
Name = tzdns1.tzptt.zj.cn
TTL = 11568 (3 hours mins secs)
Authority RECORDS:
-> 191.60.in-addr.arpa
nameserver = dns-noc.zjhzptt.net.cn
TTL = 11537 (3 hours mins secs)
-> 191.60.in-addr.arpa
nameserver = ns.zjnbptt.net.cn
TTL = 11537 (3 hours mins secs)
ADDITIONAL RECORDS:
-> dns-noc.zjhzptt.net.cn
Internet address = 202.96.103.36
TTL = 11522 (3 hours mins 2 secs)
-> ns.zjnbptt.net.cn
Internet address = 202.96.104.18
TTL = 11522 (3 hours mins 2 secs)

------------
Server:tzdns1.tzptt.zj.cn
address:60.191.134.196

------------ 
Got answer: 
    header: 
         opcode = QUERY, id = 2, rcode = noerror 
        Header Flags:&nb Sp Response, want recursion, recursion avail. 
        questions = 1,  Answers = 1,  authority records = 2,  Additional = 0

    questions: 
        www.ezloo.com, type = A, class = IN&NBSP
    answers: 
   ->  www.ezloo.com 
         Internet address = 70.32.68.136 
         TTL = 2732 (mins secs)  
    Authority records: 
   ->&nbs P EZLOO.COM&NBSP
        nameserver = ns61.domaincontrol.com 
         ttl = 2365 (mins secs)  
   ->  ezloo.com 
        nameserver = ns62.domaincontrol.com 
         ttl = 2365 (mins secs)

------------ 
non-authoritative answer: 
------------ 
Got answer: 
     header: 
        opcode = QUERY, id = 3, Rcode = noerror          Header flags:  response, want recursion, recursion avail. 
        questions = 1,  answers = 0,  authority records = 1,  Additiona L = 0

    questions: 
        www.ezloo.com, type = AAAA, class = in 
    authority records: 
   ->  ezloo.com 
        ttl = 10800 (3 hours)  
      & nbsp Primary name server = ns61.domaincontrol.com 
        Responsible Mail addr = dns.jomax.net 
        serial  = 2011032900 
 & nbsp;      Refresh = 28800 (8 hours)  
        retry   = 7200 (2 hours)  
        expire  = 604800 (7 days) & nbsp
        Default TTL = 86400 (1 day)

------------ 
name:    www.ezloo.com 
address:  70.32.68.136

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.