How do I use the nslookup command to query MX records? and mail related records

Source: Internet
Author: User
Tags mail exchange mx record nslookup nslookup command

Nslookup is a command-line tool that monitors whether DNS servers in the network can correctly implement domain name resolution. It is available in Windows nt/2000/xp.

This article is mainly for the mailbox MX records and related query methods to do some reference:

Windows Start Menu-> run, enter Cmd/command (different versions of the system commands), and go to the Command Line window.

1. At the command prompt, type nslookup, and then press Enter.

2. Type server <ipaddress>, where IP address is the IP addresses of the external DNS servers, and then press

Enter.

3. Type set Q=MX, and then press Enter.

4. Type <domainname>, where domain name is the name of your domain, and then press Enter. At this point should

Displays the MX record for the field you entered. If the MX record is not displayed, DNS is not configured correctly.
Here's an example of XP

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents Andsettings\wangjingren>nslookup
Default Server:localhost
address:192.168.1.253

> Set TYPE=MX//Here Sets the query type to MX, which is the mail exchange record
> sina.net//Enter the domain name we want to query, here take sina.net for example.
Server:localhost
address:192.168.1.253

Non-authoritative Answer:
Sina.net MX preference = 10,mail Exchanger = Mx.sina.net
>

The following figure:

Of course, there are other ways to query, the results are the same as the following figure:

Or

So far, we know that the domain name sina.net corresponding MX record is mx.sina.net

> Set type=soa//Sets the query type to be an SOA (startof authority) record
> sina.net
Server:localhost
address:192.168.1.253

Non-authoritative Answer:
Sina.net
Primary name Server =ns.sina.net
Responsible Mail addr =hostmaster.sina.net
serial = 1249370404
Refresh = 16384 (4 hours 33mins 4 secs)
Retry = 2048 (mins 8 secs)
expire = 1048576 (12days 3 hours mins secs)
Default TTL = 2560 (mins 40secs)

At this point, we know the value of the SOA record, TTL, refresh time, expiration time, and so on.

Set Type=any indicates that when querying a domainname, it will be displayed with some related data of this DomainName

Nslookup can simulate your other encounter with the server to explain the domain name. We need to add the appropriate parameters to the nslookup. The instruction format for specifying the query record type is as follows:

nslookup–qt= type target domain name

Note Qt must be lowercase.

The type can be a character, case-insensitive:

A address record (IPV4)
AAAA address record (Ipv6)
AFSDB Andrew File System database server record (do not understand)
ATMA ATM address record (not automatic teller machine)
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 (explanation of domain name from IP address)
RP owner Record
RT Routing penetration record (do not understand)
SRV TCP Server information logging (will be of great use)
TXT domain name corresponding to the text information
X25 domain name corresponding to the X.25 address record


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.