How to perform DNS lookup and troubleshoot DNS How to perform DNS lookup...

How to perform DNS lookup and troubleshoot DNS

TIPS & TRICKS   LAUREN ANDERSON   0 COMMENTS

The Domain Name System (DNS), is a key component of the Internet that maps a domain name to an IP address. There are mainly 2 ways to lookup the DNS records of a domain name, via the Command Line or use an online GUI lookup tool.

1
NSLOOKUP with Windows

1. Launch Windows Command Prompt by navigating to Start > Command Prompt or via Run > CMD. Replace example.com with the domain that you want to test:
2. Type nslookup example.com to lookup the A record of example.com.
3. Type nslookup -type=ns example.com to lookup the name server records of example.com. If -type is not specified, it looks up the A record of the domain by default.
4. Type nslookup -type=MX example.com ns4.dynu.com to lookup the MX records of example.com against the server at ns4.dynu.com. ns4.dynu.com does not host domain name example.com so the query is refused.

DNS Lookup

2
DIG with Linux and Mac OSX

Linux and Mac OS use DIG to look up DNS records of a domain though you can use NSLOOKUP with MAC OSX Terminal as well. You can follow the below steps: 1. Open a terminal window. The procedure to do this depends on the operating system and desktop environment:
-On Mac OS X, click Applications, click Utilities, and then click Terminal.
-On Linux, open a terminal window.
2. At the command prompt, type the following command. Replace example.com with the domain that you want to test. dig example.com

To use a specific DNS server for the query, use the @ option. By default, dig displays the A record for a domain. To look up a different DNS record, add it to the end of the command. The below looks up the MX records of example.com using one of Dynu name servers ns4.dynu.com. dig @ns4.dynu.com example.com MX

3. Dig displays a QUESTION SECTION (the request) and an ANSWER SECTION (what the DNS server sends in response to the request). In this case, we used the default options for dig, which simply looks up the A record for a domain. From this, we can see that example.com currently points to IP address 93.184.216.119.

[user@localhost ~]# dig example.com ; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58057
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1


;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 21347 IN A 93.184.216.34


;; Query time: 8 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Sep 29 15:50:42 MST 2020
;; MSG SIZE rcvd: 56
3
Online DNS lookup tools

If you are not familiar with commands, you can always use our DNS Lookup and DNS Propagation tools. The DNS lookup tool allows you to lookup the DNS records of a given domain against any public DNS server or authoritative DNS servers. We will explain later the difference of these 2. When you make a DNS change, the change may take some time to propagate over the internet due to TTL and DNS caching. The DNS propagation tool allows you to view DNS resolution on public name servers all over the world.

4
Name servers

When you register a domain name, you need to set the name servers at the company where you bought the domain name and those name servers will be queried for resolving your domain name. If you host your DNS with us, you need to list our name servers at the registrar for your DNS settings with us to work.

You need to then set up the DNS zones which include all your DNS records with the name servers you listed at the registrar. In the DNS zone, there are also name server records and they should match the name servers you list at your registrar. These name servers are authoritative DNS servers for your domain name. Authoritative DNS servers only answer DNS queries for domain names whose zones are hosted with them, which is why ns4.dynu.com refused the query for example.com in section 1.

A public recursive name server (also called public DNS resolver) is a name server service that networked computers may use for query to the Domain Name System (DNS) of all domains. It queries the authoritative DNS servers for answers and returns the results to the end-users.







*
* (L'indirizzo email non verrà pubblicato.)
Loading...