DNS Lookup   «Prev  Next»
Lesson 1

DNS and the Program NSLookup

This module will explore DNS and use the program nslookup to probe the DNS[1] database. The nslookup[2] program is free software, available under all UNIX versions as well as Windows. It generates name server queries on command, and is useful for debugging DNS. By the end of this module, you will be able to describe the following terms.
  1. Domain Name Service (DNS): In UNIX network administration, the Domain Name Service (DNS) is a critical system that translates human-readable domain names (https://www.google.com) into numerical IP addresses that computers use to communicate. This allows users to access resources by name, while the underlying network infrastructure relies on IP addresses for routing and delivery of data.
  2. name server: In UNIX network administration, a name server is a dedicated server program that responds to queries about domain names, providing IP addresses and other DNS information to clients. System administrators configure UNIX clients to use specific name servers, either locally hosted or provided by an ISP or other service provider, to ensure reliable name resolution for network services.
  3. DNS Database: In UNIX network administration, the DNS database is a hierarchical collection of files and distributed databases that store the mappings between domain names and IP addresses, along with other DNS records. This database is maintained and updated by DNS name servers, allowing UNIX systems to efficiently resolve domain names for various network services.
  4. nslookup program: In UNIX network administration, the `nslookup` program is a command-line tool used to query DNS name servers for information about domain names. Administrators use `nslookup` to troubleshoot DNS problems, verify DNS records, and diagnose network connectivity issues.

  1. Explain the basic use of the nslookup program
  2. Use nslookup to read other types of Resource Records
  3. Use nslookup to use a different name server and to list an entire zone
  4. Describe the components of the BIND package
  5. Define the elements of the name server configuration file

nslookup is a command-line tool used for querying Domain Name System (DNS) servers to obtain domain name or IP address mapping, or for any other specific DNS record. Here's a brief overview of how it works and some of its uses:
  • Functionality:
    • Querying: You can use nslookup to find the IP address associated with a domain name or to find the domain name associated with an IP address.
    • Debugging: It's particularly useful for diagnosing DNS problems. You can check if DNS resolution is working correctly or if there are issues with DNS server configuration.
  • Availability:
    • nslookup is available on most UNIX-like operating systems, including Linux and macOS, and also on Windows. This makes it a versatile tool across different platforms.
  • Usage:
    • Basic Query: On the command line, you simply type nslookup followed by the domain name or IP address you want to query. For example:
      nslookup example.com
      
      This command will return the DNS records for example.com.
    • Interactive Mode: Running nslookup without parameters opens an interactive mode where you can perform multiple queries, change servers to query, and so on.
    • Specific Record Types: You can also query for specific types of DNS records like MX (mail exchanger) records or NS (name server) records:
      nslookup -type=mx example.com
      

  • Troubleshooting:
    • If you're experiencing connectivity issues, nslookup can help determine if the problem lies with DNS resolution. For instance, if nslookup can resolve a hostname but you can't access the site via a web browser, the issue might be with the browser or a network firewall rather than DNS.
  • Security Considerations:
    • While nslookup can be very useful, it's worth noting that it sends queries in plain text over the network. For secure DNS queries, tools like dig with DNS over HTTPS (DoH) or DNS over TLS (DoT) might be preferred.

Red Hat Enterprise Linux 9 Administration

Domain Name System (DNS)

Domain Name System (DNS) translates between domain names and IP addresses, and is supported by nearly every operating system. All Internet based name resolution utilizes DNS. DNS is organized as a hierarchy. Consider the following translation:
www.google.com = 209.85.225.104

The above domain name represents a Fully Qualified Domain Name (FQDN)
  1. .com represents a top level domain.
  2. .google represents a secondary level domain
  3. www represents a host computer in the .google.com domain.

Other top level domains include .org, .net, and .gov. Top level domains can also include country codes, such as .ca, .nl, and .de
[1] Domain Name Service (DNS) DNS: Domain Name Service (DNS) is an Internet-wide service for converting numeric IP addresses to host names and back.
[2] name server: A name server is a process that accepts queries into the DNS database. It is also fairly common usage to refer to the computer on which this process is running as a name server.

SEMrush Software 1 SEMrush Banner 1