Windows Troubleshooting Tip – NSLookup

Home > Blogs > Windows 7 > Windows Troubleshooting Tip – NSLookup

Windows Troubleshooting Tip – NSLookup

Like This Blog 0 Mike Danseglio
Added by December 13, 2013

I’ve published a number of articles on following a simple and straightforward troubleshooting methodology. I advocate a simple and focused approach shown in Figure 1. You can see that symptom identification is the first step, followed by root cause analysis and problem resolution.

Figure 1. MikeDan’s Quick and Dirty Troubleshooting Methodology.

There’s lots of great tools built right in to Windows that will actually help when narrowing down network communications problems. One of my favorites is NSLookup.

What is NSLookup?

Short for Name Server Lookup, NSLookup.exe is a command-line tool that queries a Domain Name System (DNS) server. Most Windows computers use DNS as part of, if not their primary and only means of resolving network names to IP addresses and locating network services like Active Directory.

When you’re troubleshooting a network communication issue like a client not reaching a web site or an application not finding a network server, you might split the possible causes into two questions:

1.  Can the client resolve the server name to an IP address?
2.  Can the client reach the resolved IP address?

NSLookup runs any DNS query that you want. So it directly contributes to answering the first question. There’s no sense trying to ping or open a SMB connection to a server (both of those steps assume name resolution works!) if name resolution is failing.

How Do I Use It?

Easy enough. These steps are written for Windows 7 but will work for virtually any version from Windows 2000 onwards.

1. Open a command prompt and type NSLookup. You’ll see the name and IP address of the primary DNS server configured on the computer as shown in Figure 2.

002-Windows-Troubleshooting-Tip-NSLookup

Figure 2. The default NSLookup output.

2.  Type the name of the target server you’re trying to reach and press Enter. In this example I’m troubleshooting connection issues to two computers: ISOServer and smartboard1-pc. So I just type their names one at a time, and each time DNS is queried and the result is provided.

003-Windows-Troubleshooting-Tip-NSLookup

Figure 3. ISOServer has no DNS entry and smartboard1-pc does.

3.  To check a different DNS server’s records for the same systems I tell NSLookup to use a specific server. In this example I use the DNS server at 10.1.0.100 and then re-run the queries as shown in Figure 4.

004-Windows-Troubleshooting-Tip-NSLookup

Figure 4. No results for either computer.

4.  I compare the results of these NSLookup queries against the known configuration or against a computer that’s not exhibiting the same symptoms.
5.  Note that I ran queries for internal resources against internal DNS. I can also run queries for external servers against either internal or external DNS. For example, in Figure 5 I query the public DNS provided by Level 3 for the IP address of http://www.yahoo.com/. I then compare it against my internal DNS resolution.

005-Windows-Troubleshooting-Tip-NSLookup

Figure 5. Name resolution consistency between DNS servers tends to rule out name resolution issues.

Comparing results between DNS resolvers and queries helps me either rule out name resolution or target it as a likely culprit.
Mike Danseglio -CISSP / CEH
Interface Technical Training – Technical Director and Instructor

Videos You May Like

Agile Methodology in Project Management

0 171 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

An Overview of Office 365 – Administration Portal and Admin Center

0 913 3

This is part 1 of our 5-part Office 365 free training course. In this Office 365 training video, instructor Spike Xavier introduces some of the most popular services found in Microsoft Office 365 including the Admin Portal and Admin Center. For instructor-led Office 365 training classes, see our course schedule: Spike Xavier SharePoint Instructor – … Continue reading An Overview of Office 365 – Administration Portal and Admin Center

Creating Users and Managing Passwords in Microsoft Office 365

0 740 4

In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365.   For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365    

Write a Comment

Share your thoughts...

Please fill out the comment form below to post a reply.