How to Use NSLookup and Trace Route on macOS, Windows, and Linux? Print

  • Windows - Traceroute Command Usage - Trace Network Routes ma, DNS Lookup Command - Troubleshoot Network Issues - NSLookup , Windows, DNS Lookup Command, Trace Network Routes macOS Terminal, NSLookup Examples macOS, Troubleshoot Network Issues, Linux, Traceroute Command Usage
  • 326

1. What is NSLookup?

NSLookup is a network utility that queries the Domain Name System (DNS) to resolve domain names to IP addresses or vice versa. It is used for DNS troubleshooting and domain verification.

2. What is Traceroute?

Traceroute tracks the path packets take from your computer to a specific server, showing all the intermediate hops along the way. It’s useful for identifying network bottlenecks and latency issues.

3. How to Use NSLookup

Windows:

Windows has a command-line tool for performing a DNS query. It is called "nslookup."

  1. Open Command Prompt (Start → Search "cmd").
  2. Type the following command to look up a domain:
    nslookup example.com
    
  3. To query a specific DNS server:
    nslookup example.com 8.8.8.8
    
  4. For detailed queries:
    nslookup -query=MX example.com
    

macOS / Linux

  1. Open Terminal (in macOS Terminal can be found by opening the Finder, select Applications and Utilities. To open a terminal session, double-click on "Terminal.app".).
  2. Basic DNS lookup:
    nslookup example.com
    
  3. Specify a DNS server:
    nslookup example.com 8.8.8.8
    
  4. For additional details (e.g., MX records):
    nslookup -query=MX example.com
    

4. How to Use Traceroute (or Tracert)

Windows

  1. Open Command Prompt.
  2. Run the following command:
    tracert example.com
    
  3. To modify hop limits or timeout settings:
    tracert -h 30 example.com
    

macOS / Linux

  1. Open Terminal.
  2. Use the traceroute command:
    traceroute example.com
    
  3. For IPv6 tracing:
    traceroute -6 example.com
    

5. Troubleshooting Tips

  • NSLookup fails: Check your network connection and DNS server settings.
  • Traceroute shows high latency: This indicates network congestion or issues on the intermediate hops.
  • Permission Denied: Use sudo with traceroute on Linux/macOS for privileged operations:
    sudo traceroute example.com
    

By using these tools effectively, you can diagnose DNS resolution problems and network connectivity issues across any platform.


Was this answer helpful?

« Back