Review the importance of good network name resolution and common tools, including nslookup and the ipconfig DNS switches.
- [Instructor] On a simple network such as a peer to peer environment in a small office we can use network broadcasts to communicate between different devices. Effectively the devices shout at each other and they will respond but once we get to a larger network, perhaps with servers and across wide area networks, we need to use DNS for our network name resolution. Let's take a quick recap on DNS or the domain name system before we see how to troubleshoot it.
Within DNS we have domain name servers that hold a database of domain names and IP addresses and allow DNS agents to query or look up data in the database. For example the IP address for the website www.microsoft.com would be translated to 126.96.36.199. If you only know the website address you won't be able to load the website until a DNS server had provided the correct IP address successfully.
DNS is now integrated into Active Directory and represents an essential component of your networking infrastructure and needs to be maintained. Without good DNS you are likely to suffer poor network performance which may affect productivity across your users and systems. The two command line tools that you can use to validate and query DNS during troubleshooting are the ipconfig and nslookup tools. You can use the ipconfig tool to validate the current IP configuration on a device.
For example you can display the current TCP/IP configuration values, release and renew DHCP settings, display the subnet and the DNS server information used and display the default gateway information. Most client related DNS issues relate to either the device having the incorrect settings which you should be able to spot with ipconfig. There are three DNS related commands that you can use with ipconfig. Let's take a look.
Some DNS server can be cached on your device which helps speed up network browsing. However these can cause issues if a website changes server. For example if it has crashed or it's been load balanced. The DNS resolver cache records the IP address of websites so that if you visit the same website again the information can be accessed quicker by your computer. You can view the data stored in your DNS resolver cache by typing ipconfig /displaydns.
This displays the contents of the DNS client resolver cache. Now if one of these entries is stale or incorrect your user will get the wrong or old webpage each time. So clearing out the DNS resolver cache will reset the contents. We can do this by typing ipconfig /flushdns then click Enter. Let's now run the ipconfig /displaydns command again.
We can see that the DNS resolver cache is empty. If you run the ipconfig /displaydns command again and find a lot of DNS entries are still present then you may want to look at your HOSTS file which is located in the System32\Drivers\ folder as displayed onscreen. Finally the ipconfig /registerdns command will refresh your DHCP address lease and manually register your device with a local DNS server database.
This is useful if you find other devices are failing to resolve your IP address using a DNS lookup query. Alternatively you could restart the client machine as this registration process is normally automatic during bootup. Know that this last procedure requires administrative credentials. The last command line tool that you can use to validate and query DNS is nslookup. Nslookup, which stands for name server lookup, allows you to test dns name resolution.
That is to test if DNS is working as it should. I'll clear the screen and then type nslookup and press Enter. The tool will automatically locate the nearest DNS name server as we can see here. Notice the small chevron at the bottom of the command's output. Nslookup remains running in the background after the command is issued. If I now ask a question such as I want to resolve the name of my PC I'll type my hostname and press enter.
I'm given the IP address. Effectively DNS knows the answer. If I want to ask the IP for an external device or website I can also type the website. Such as www.microsoft.com and then press Enter. DNS responds with a non authoritative answer and provides an IP address. The reason that this is non authoritative is because the DNS server that I used own these DNS records.
It got the answer from a third party DNS server such as your ISP. It's a bit like a child's game of Chinese whispers. If you know which DNS server is authoritative you can query that server directly and also query other types of DNS record such as mx or mail exchanger records. I'll enter set type=mx to change the query to the mail exchange records and then type sellsnowtoeskimos.com which is my domain that I use for demonstrations.
We can now see that nslookup has queried the mx servers and produced the Internet addresses for the mx records for sellsnowtoeskimos.com. Finally to exit nslookup we need to type exit or Ctrl + C.
- Common sign-in issues and resolutions
- Network connectivity tools
- Installing and running the Microsoft Office 365 Support and Recovery Assistant tool
- Troubleshooting Exchange ActiveSync
- Outlook profile repair
- Troubleshooting OneDrive for Business issues
- Delegated mailbox issues
- Troubleshooting common Office 365 SharePoint problems
- Common Skype for Business Online problems