Tracking domain name resolution process

Source: Internet
Author: User
Tags hmac domain name registration nslookup

Recently, I am preparing to put domain name resolution on a free DNS server outside China. To track the domain name resolution process, nslookup in Windows is too simple. It is not as good as the dig command in Linux.

Find the dig Command Used in Windows and share it with you: Download The dig-DNS query tool (for Windows ).

Dig is a DNS diagnostic tool that comes with UNIX/BSD systems. It is very flexible to use and is used by many DNS administrators for DNS diagnosis.

The usage is as follows:

  • Usage
    Dig [@ server] [-B address] [-c class] [-f filename] [-k filename] [-m] [-p port #] [-q name] [-t type] [-x addr] [-y [hmac:] name: key] [-4] [-6] [name] [type] [class] [queryopt...]

    Symbol Description: "[]" indicates that this option is optional.

    Dig is a complete command line tool. You need to remember the usage of each option. If you forget it, you can use the-h option to view all the parameters. The options are described as follows:

    • Server
      Specify the DNS Server.
    • Name
      Enter the domain name we want to query, which means the same as [-q name.
    • Type
      Specifies the record type to be queried, which means the same as [-t type. Types include a, any, mx, ns, soa, hinfo, axfr, and txt. The default value is.
    • Address
      Specify the NIC (IP address) that you want to query. this parameter is applicable to specifying the NIC in a multi-nic environment.
    • -FFilename
      Specify the filename file as the dig batch query condition. The file format is one query per row, and the "dig" command is omitted at the beginning of each line.
    • -KFilename
      Specify the filename file as the tsig key, or use-y to directly use the TSIG key.
    • -PPort
      Specifies the port used by the DNS Server. It can be used when the Server is not using the standard DNS port.
    • -XAddr
      Indicates reverse query.
    • -Y[Hmac:] name: key
      Specifies the TSIG Key used for the query. We recommend that you do not use TSIG key in the command line based on security considerations.
    • Queryopt...:
      Queryoptions is used to specify the detailed query settings and display items, and is identified by "+.

      1. + [No] tcp: Whether to use TCP query. Generally (AXFR and IXFR are not used), UDP is used.
      2. + [No] ignore: If the UDP protocol does not respond, check whether to use the TCP protocol to re-query. The default value is "yes ".
      3. + [No] search: Whether to use the list defined in resolv. conf for query. The default value is "no ".
      4. + [No] defname: It is equivalent to + [no] search and is not recommended.
      5. + [No] cl: Whether to display the record category in the query result.
      6. + [No] ttlid: Whether to display the TTL number in the query results.
      7. + [No] recurse: Whether to use recursive query. The default value is "yes ". However, recursive queries are automatically canceled when the + nssearch or + trace option is added.
      8. + [No] nssearch: Whether to display the SOA record and name server in the query results.
      9. + [No] trace: Whether to display the jump in the query result (find the appropriate name server according to the root server prompt ).
      10. + [No] cmd: Whether to display the dig version and input commands in the query results.
      11. + [No] short: Whether to provide simplified display in the query results. The default value is "no ".
      12. + [No] comments: Whether to display comments in the query results.
      13. + [No] stats: Whether to display statistics in the query results. The default value is "yes ".
      14. + [No] question: Whether to display the query content in the query results.
      15. + [No] answer: Whether to display the response segment in the query results.
      16. + [No] authority: Whether to display authoritative server information in the query results.
      17. + [No] additional: Whether to display the content of the additional segment in the query results.
      18. + [No] all: Set/cancel all display tags.
      19. + Time = T: Set the query timeout time. The default value is 5 seconds.
      20. + Tries = T: Set the number of query retries. The default value is 3. If the value is smaller than 1, the value is 1.
      21. + Retry = T: Sets the number of retries in a UDP query. The default value is 2, excluding the first query.
      22. + Bufsize = B: Set the high-speed buffer size (0 ~ 65535 ).
      23. + [No] multiline: Whether to display a record as multiple rows in the query result. The default value is single row.
      24. + [No] fail: Whether to query the next server if the server fails. The default value is "yes ".
      25. + [No] besteffort: Whether to display incomplete response information. The default value is "yes ".
      26. + Trusted-key ####: Specifies the file containing the authentication code. If not specified, dig looks for the trusted-key.key in the current directory and uses the-DDIG_SIGCHASE option during compilation.
  • Instance Introduction

    • Query A records:D: greensoftdig>Dig @ 202.96.209.5 www.docutek.com.cn
      ; <> DiG 9.3.2 <> @ 202.96.209.5 www.docutek.com.cn
      ; (1 server found)
      ; Global options: printcmd
      ; Got answer:
      ;-> HEADER <-opcode: QUERY, status: NOERROR, id: 456
      ; Flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0; question section:
      Www.doc utek.com.cn. IN

      ; Answer section:
      Www.docutek.com.cn. 259200 in a 202.132.10.161

      ; Query time: 124 msec
      ; SERVER: 202.96.209.5 #53 (202.96.209.5)
      ; WHEN: Wed Jan 07 19:30:56 2009
      ; Msg size rcvd: 52

      Dig output information is very detailed. The following is a simple description:

      1. Row 1: displays the current dig version and query content.
      2. Row 3: The global setting option displays the result directly in the window.
      3. Row 4 to row 6: displays the query results.
      4. Question section (query segment)
        The query condition is displayed. Currently, we want to query the record of www.docutek.com.cn.
      5. Answer section (Response SECTION)
        The answer 202.132.10.161 is displayed on the server.
      6. The end is other information, such as the query time of 140 microseconds, the query server is 202.96.209.5, the query time, and the response packet size.
    • Query reverse records:

      D: greensoftdig>Dig @ 192.168.8.246-x 202.132.10.161 + short

      Docutek.com.tw.

    • Query NS records:D: greensoftdig>Dig @ 192.168.8.246 docutek.asia ns + short
      Ns.docutek.asia.
      Ns.docutek.com.cn.
      Ns.docutek.com.tw.
    • Query MX records:D: greensoftdig>Dig @ 192.168.8.246 docutek.asia mx + short
      10 mail.docutek.asia.
      20 smtp.docutek.com.cn.
    • View region transfer:D: greensoftdig>Dig @ 192.168.8.246 docutek. local axfr
      ; <> DiG 9.5.1 <> docutek. local axfr
      ; Global options: printcmd
      Docutek. local. 28800 in soa ib42.docutek.asia. alvin.docutek.asia. 19 10800 3600 2592000
      Docutek. local. 28800 in ns ib42.docutek.asia.
      Database.doc utek. local. 28800 in cname db.doc utek. local.
      Db.doc utek. local. 28800 in a 192.168.1.247
      Db.doc utek. local. 28800 in a 192.168.1.248
      F.doc utek. local. 28800 in cname file.doc utek. local.
      File.doc utek. local. 28800 in a 192.168.1.246
      Finance.doc utek. local. 28800 in a 192.168.1.21
      Financem.doc utek. local. 28800 in a 192.168.1.20.
      Manager.doc utek. local. 28800 in a 192.168.1.239
      Marketm.doc utek. local. 28800 in a 192.168.1.231
      Orcale.doc utek. local. 28800 in cname db.doc utek. local.
      Www.doc utek. local. 28800 in a 192.168.1.249
      Docutek. local. 28800 in soa ib42.docutek.asia. alvin.docutek.asia. 19 10800 3600 2592000
      ; Query time: 15 msec
      ; SERVER: 192.168.8.246 #53 (192.168.8.246)
      ; WHEN: Wed Jan 07 16:10:25 2009
      ; XFR size: 15 records (messages 1, bytes 412)

During this time, the server was shut down everywhere. We couldn't do this. Now we can check the authenticity of the domain name registration information again. This is also acceptable, but the domain name resolution server can't stand it anymore. In the past few days, domain name servers in the Internet of times have been unstable. It may be annoying to break this server for a while.

Domain name transfer is troublesome, and we have not yet found a good club. domain names must be transferred abroad. There are too many one-size-fits-all policies in China. It is a bit annoying to start from time to time.

Simply put the domain name resolution on a free foreign DNS server, choose to choose, and use everydns, simple, and then want to track the domain name resolution process, in the past, we used nslookup to check whether the resolution was normal. dig commands were rarely used.

In the end, BS indicates that the domain name registered in the first year cannot be changed to dns. If you want to modify the domain name, you must renew it for at least one year.

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.