programming4us
         
 
 
Windows Server

Windows Server 2008 : Using nslookup - Verifying Records with nslookup

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
7/20/2013 7:21:06 PM

You can use the nslookup command to query the Domain Name System (DNS) server and diagnose different issues with DNS. The most common reason to use nslookup is to check for records. For example, you can use it to determine whether an A or Host record exists for a specific hostname. If the record exists, DNS can resolve it to an IP address. The basic syntax is

nslookup Hostname

Figure 1 shows the results of two simple nslookup queries. The first query looks for an A record for a server named Web1 to resolve it to an IP address. The second query looks for a PTR (pointer) record to resolve the IP address to a host name. Both queries succeed and return the desired information. Notice that the DNS server that responded is dc1.pearson.pub, identified by name and IP address in the first two lines after each query.

Figure 1. Querying DNS with nslookup

The following table outlines what is shown in Figure 1.

Using nslookup to Verify RecordsComments
c:\>nslookup
Default Server:  dc1.pearson.pub
Address:  192.168.1.5

This puts nslookup into interactive mode as a shell. It’s also possible to enter the complete nslookup command without entering interactive mode. It also identifies the name and IP address of the DNS server.
> web1
Server:  dc1.pearson.pub
Address:  192.168.1.5

The first part of the response is only related to DNS. Because the system is configured with 192.168.1.5 as the IP address of the DNS server, nslookup shows that IP address. nslookup also tries to do a reverse lookup to determine the name of the system with that IP address. If a PTR record exists in the reverse lookup zone, the query is successful (as shown here), and it displays the name of the DNS server (dc1.pearson.pub in the example).
Name:    web1.pearson.pub
Address:  192.168.1.41

The next part of the response queries DNS for an A or host record for the host (web1 in this example). If a record exists, DNS gives the IP address of the host.
> 192.168.1.41
Server:  dc1.pearson.pub
Address:  192.168.1.5

The next example gives the IP address of a computer with the goal of getting the name. As before, the first two lines provide information on the server that is answering.
Name:    web1.pearson.pub
Address:  192.168.1.41

Because the DNS server includes a PTR record for the server, the response shows the IP address.

Figure 2 shows the DNS console for the pearson.pub domain. Notice that an A (Host) record exists for web1.pearson.pub.

Figure 2. DNS console forward lookup zone in pearson.pub

Pointer (PTR) records exist in the reverse lookup zone of a DNS console, and Figure 3 shows the reverse lookup zone in the pearson.pub domain. Notice the PTR record for dc1.pearson.pub exists. This allows the nslookup query to identify the name of the DNS server’s IP address.

Figure 3. DNS console reverse lookup zone in pearson.pub

Note

The reverse lookup zone is optional, and pointer records are optional. You’ll see different results depending on whether the reverse lookup zone exists and the PTR record exists within the reverse lookup zone.


In contrast, the following listing shows the result if an A record doesn’t exist and if a PTR record doesn’t exist.

C:\Users\Administrator>nslookup
Default Server:  dc1.pearson.pub
Address:  192.168.1.5

>  web2
Server:  dc1.pearson.pub
Address:  192.168.1.5

*** dc1.pearson.pub can't find web2: Non-existent domain
> 192.168.1.42
Server:  dc1.pearson.pub
Address:  192.168.1.5

*** dc1.pearson.pub can't find 192.168.1.42: Non-existent domain
Other -----------------
- Windows Small Business Server 2011 : Understanding the Update Process (part 2) - Monitoring WSUS Activity
- Windows Small Business Server 2011 : Understanding the Update Process (part 1) - Understanding the WSUS Default Settings, Installing Server Updates Manually
- Windows Small Business Server 2011 : Managing Printers Using the Windows SBS Console
- Windows Small Business Server 2011 : Sharing Printers - Deploying Printers on Clients
- Windows Home Server 2011 : Setting Up a Fax Server (part 3) - Receiving Faxes
- Windows Home Server 2011 : Setting Up a Fax Server (part 2) - Sending a Fax
- Windows Home Server 2011 : Setting Up a Fax Server (part 1) - Configuring a Shared Fax Printer, Configuring the Fax Modem, Starting Windows Fax and Scan
- Windows Home Server 2011 : Controlling Services (part 2) - Controlling Services at the Command Prompt, Controlling Services with a Script
- Windows Home Server 2011 : Controlling Services (part 1) - Controlling Services with the Services Snap-In
- Windows Home Server 2011 : Configuring the Microsoft Management Console (part 2) - Creating a Custom Taskpad View, Controlling Snap-Ins with Group Policies
- Windows Home Server 2011 : Configuring the Microsoft Management Console (part 1) - Adding a Snap-In
- Windows Server 2012 : Monitoring, Tuning, and Troubleshooting Hyper-V - Using VM Monitoring
- Windows Server 2012 : Monitoring, Tuning, and Troubleshooting Hyper-V - Using Perfmon for logged monitoring
- Windows Server 2012 : Monitoring, Tuning, and Troubleshooting Hyper-V - Using real-time monitoring tools
- Windows Server 2008 : Licensing and Activation - Forcing Registration of KMS Server SRV Records, Manually Creating an SRV Record for KMS
- Windows Server 2008 : Licensing and Activation - Managing Activation Tasks with slmgr
- Windows Server 2008 : Migrating Printers with printbrm, Controlling the Print Queue with prnqctl.vbs
- Windows Server 2008 : Publishing Printers to Active Directory with pubprn.vbs
- Windows Small Business Server 2011 : Deploying Network Printers (part 4) - Sharing a Printer
- Windows Small Business Server 2011 : Deploying Network Printers (part 3) - Creating a DHCP Reservation for a Printer
 
 
Youtube channel
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS