DNS is a tiered distributed name mechanism for systems, facilities, or any commodity linked to the net or an isolated network. It includes diverse pieces of data to domain names allocated to every one of the participants. Most notably, it converts domain names that are important to people into the numeric IP addresses required to update computer devices and applications throughout the globe.

The Domain Name System is indeed an important part of the Web’s operation since it provides a globally distributed keyword-based redirecting facility. NSLOOKUP is a command-line utility included with Microsoft Windows. In this guide, we will learn about the DNS lookup in the windows system. So, let’s get started.

Search the command prompt from the search bar of your windows desktop. The command prompt will be poped-up. Click on it to launch it. Now the command prompt has been opened, we can start doing a DNS lookup on it. First of all, we need to look at the current settings of our DNS. For that purpose, we have to just use the below ipconfig command followed by the keyword “displaydns” with a backslash sign in our shell and press the Enter key. You will see a long record of DNS settings that are currently held by our system.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/1-24.jpg" data-lazy- height="352" src="data:image/svg xml,” width=”524″>

Between these DNS settings, we have an entry of www.google.com and its information as shown in the below image. Remember the given data of Google provided in the image.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/2-20.jpg" data-lazy- height="136" src="data:image/svg xml,” width=”351″>

These settings have also a record about www.youtube.com and its information as presented below. Make sure to remember the provided information on Youtube as well.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/3-17.jpg" data-lazy- height="394" src="data:image/svg xml,” width=”506″>

As we have a lot of DNS settings in our system, let’s just quickly delete all of them at once. For this reason, use the ipconfig command with the keyword “flushdns” along with the backslash sign and tap the Enter button. You will see that it will flush all the previous entries from the cache as the success message is presenting in the image below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/4-14.jpg" data-lazy- height="85" src="data:image/svg xml,” width=”372″>

Check the DNS settings once again using the previous displaydns command as below. You can see, this time it displays nothing because all the entries are flushed out.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/5-13.jpg" data-lazy- height="101" src="data:image/svg xml,” width=”331″>

As all the DNS data has been flushed, we need to do the DNS lookup now. So, we will ping the Google address first by using the below instruction followed by the Enter key in the cmd shell.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/6-12.jpg" data-lazy- height="196" src="data:image/svg xml,” width=”524″>

Let’s ping the Youtube address using the below query of ping and hit the Enter key from the keyboard.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/7-9.jpg" data-lazy- height="196" src="data:image/svg xml,” width=”612″>

Now, let’s have a look at the DNS settings once again by utilizing the displaydns command in the command prompt as below and tap Enter. You can see it shows the Google and Youtube entries in the settings while all the other settings are flushed out. You will see that the settings of Google mentioned below are different from the information provided before the flush of DNS.

The IP address, as well as other details, must be included in DNS data for www.youtube.com and www.google.com. A TTL value typically differs from TTL inside an IP packet, which seems to be another entry inside the DNS buffer. The DNS server that manages the Youtube and Google record sends this DNS TTL value. It is calculated in seconds and also instructs the DNS client about how long to buffer the DNS data to avoid clients lingering on to DNS information which IP addresses ought to update.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/8-8.jpg" data-lazy- height="193" src="data:image/svg xml,” width=”442″>

Youtube entry is as below. The information regarding Youtube given below is very different from the previous information before the flush action taken place.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/25.jpg" data-lazy- height="619" src="data:image/svg xml,” width=”472″>

Now, it’s time for us to open our system’s host file. For that purpose, search “Notepad” from the search bar of your windows desktop. Right-click on it to open it via the “Run as Administrator” option. Tap on “Run as Administrator”. As the notepad has been opened, click on the “File” menu and select the option of “Open”. It will open a dialogue box on your screen.

Navigate towards the C:\WindowsSystem32Driversetc. Select the option of “All Files” from the dialogue box to see all the files residing in the “Etc” folder. You will get a list of some files. Double-click on the “hosts” file to open it in a notepad.

C:\WindowsSystem32Driversetc.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/10-6.jpg" data-lazy- height="465" src="data:image/svg xml,” width=”655″>

Now, the “hosts” file has been opened in the notepad as presented below with some service records.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/11-5.jpg" data-lazy- height="432" src="data:image/svg xml,” width=”630″>

Add the below-shown IP address with a name at the bottom of the notepad file. Save your file and quit it quickly.

<img alt="" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/24.jpg" height="26" src="data:image/svg xml,” width=”254″>

Let’s check the DNS settings once again to look up the new entry in the host file using the ipconfig command of displaydns, and tap on Enter. The output image is showing the new entry “university” in the cache.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/12-4.jpg" data-lazy- height="436" src="data:image/svg xml,” width=”502″>

Ping the new entry with our server using the below query and tap Enter.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/13-5.jpg" data-lazy- height="166" src="data:image/svg xml,” width=”522″>

Let’s flush out the records of DNS settings once again by ipconfig command followed by the Enter key.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/14-4.jpg" data-lazy- height="90" src="data:image/svg xml,” width=”358″>

Now, check the DNS settings one more time by displaydns keyword in the ipconfig command. Try the below query followed by the Enter button. You can see it doesn’t delete the record of entry “university” even after the flush of DNS settings. This is because we have added this IP address into the host file as host file IP addresses cannot be removed.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/15-3.jpg" data-lazy- height="441" src="data:image/svg xml,” width=”571″>

Add the below path of a site with the “nslookup” keyword in the command prompt. The title and Source IP of the DNS server, as well as the identity and IP of www.ulster.ac.uk, are shown. You can search for a host’s IP without even connecting with it by using Nslookup.

nslookup scisweb.ulster.ac.uk

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/16-3.jpg" data-lazy- height="116" src="data:image/svg xml,” width=”384″>

Let’s use the nslookup command in the command prompt and tap Enter. We would then be in the interactive environment of Nslookup. An arrowhead prompting should appear.

<img alt="" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/17-2.jpg" height="82" src="data:image/svg xml,” width=”249″>

Enter the below site path in the interactive mode and hit the Enter button. You can see it returns many IP addresses.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/18-2.jpg" data-lazy- height="129" src="data:image/svg xml,” width=”328″>

Retype the same site path and press Enter. This time it returns the different IP addresses for the same site with a different pattern. This implies we can access the site www.google.com by using many different IP addresses.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/19-2.jpg" data-lazy- height="136" src="data:image/svg xml,” width=”348″>

You can use the below command to check how many of the “A” records are there in your DNS.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/20-2.jpg" data-lazy- height="164" src="data:image/svg xml,” width=”441″>

If you want to check how many of the “ns” records are there in your DNS system, then try out the below query in the command prompt. The output shows a 1 “ns” record.

nslookup –type=ns example

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/21.jpg" data-lazy- height="260" src="data:image/svg xml,” width=”549″>

If a user wants to check the start of authority in its system, they can do so by the following below query in the command prompt.

nslookup –type=soa example

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/22.jpg" data-lazy- height="258" src="data:image/svg xml,” width=”588″>

If we want to check the mail servers’ “MX” records in our DNS system, we can do so by utilizing the below query.

nslookup –query=mx example

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/23.jpg" data-lazy- height="264" src="data:image/svg xml,” width=”557″>

Conclusion

In this guide article, we have performed every step to do DNS lookup in Windows 10 system. All the instructions are perfectly functional on all previous versions of Windows.

About the author

<img alt="" data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/Author-Image-150×150.jpg610b442a9b053.jpg" height="112" src="data:image/svg xml,” width=”112″>

Aqsa Yasin

I am a self-motivated information technology professional with a passion for writing. I am a technical writer and love to write for all Linux flavors and Windows.