Nslookup explained.

Nslookup is a very practical network administration command-line software. It is very useful, and it has a simple interface. Its name breaks to “ns” for nameserver and “lookup” for querying it. Primarily is used to find the IP address that corresponds to a host. Also, for a process called “Reverse DNS Lookup,” which is the domain name that matches an IP address. You can use it from the Terminal. Check domains, devices/IP addresses, or DNS records. It is available on the traditional computer operating systems Linux, macOS, and also Windows. 

For most Linux distros, it comes pre-installed, so you don’t have to download it by yourself. Network admins enjoy it because it also has extra options to adjust the query by picking a port, timeout period, and more. This command comes up with a clean and simple answer. 

You will receive the IP address – when you checked the domain.

Or you will receive the domain – for Reverse Lookup.

The command will tell you that and information such as if the answer comes from an authoritative or non-authoritative server. 

For what is it used?

Nslookup is appropriate in different situations. The command-line program is an essential tool when resolving DNS problems. 

  • A data query helps detect the cause of the issue.
  • Check if all involved servers are converted in the domain name system properly. 
  • When several subdomains are involved, you can check for connection problems.
  • Search for mail servers (SMTP, POP, IMAP) for the domain. Nslookup shows the servers based on the MX records that belong to the email provider’s domain. These records contain the IP addresses and names of the provider servers.

Nslookup guide

Try it Nslookup command with these examples of general use cases:

  • The A record of a domain (shows IP address)

nslookup example.com

You will see the address of the domain. 

  • The NS records of a domain (the authoritative nameserver)

nslookup -type=ns example.com

You will see which are the non-authoritative and which is the authoritative nameserver.

  • The SOA record of a domain (start of authority)

nslookup -type=soa example.com

This record will provide you the start of authority and general technical information about the zone.

  • The MX record, information about the email exchange

nslookup -query=mx example.com

View the MX records of the mail servers. 

  • See all DNS records of the domain.

nslookup -type=any example.com

You can also make a more general query, and you will see all available DNS records. 

  • Check a specific name server.

nslookup example.com ns1.nsexample.com

You can also perform a query and see data for a particular name server. You will see the domain name, IPv4, and IPv6 addresses. 

  • Reverse DNS lookup

nslookup 11.22.33.44

Make sure that an IP address is matching the domain. Do a reverse DNS lookup and verify it. 

  • Check a domain through a specific port.

nslookup -port=51 example.com

The same, but the difference is that we are doing it through port 51. You can replace the number with the port that you like. 

  • Check a domain with a specific reply timeout interval.

nslookup -timeout=20 example.com

You can change the reply timeout interval. Here is set to 20 seconds, but you can extend to more time or shorten it to less. You are giving more time to the name servers to respond if you increase it. 

  • Activate the debug mode

nslookup -debug example.com

The debug mode will provide a lot more information. Further data will be given both for the question and the answer to the query. 

Using a Dynamic DNS could be very beneficial for many people. Simply this DNS service is an automatic method for refreshing the new IP addresses. A static IP address might be very pricey. So let’s explain a little bit more about Dynamic DNS and what are the benefits of using it.

Dynamic DNS explained.

Dynamic Domain Name System is also called DDNS or Dynamic DNS.

The standard DNS links domain names to IP addresses through A or AAAA DNS records. The advantage of having Dynamic DNS is that it automatically updates and changes the host’s IP address. Even if its IP address changes, the visitors can reach it.

Dynamic DNS is a simple to use service. It lets you reach your hosted services easily when your ISP changes your IP address. For example, you can have a web hosting server, mail server, database server, or use your home network for CCTV cameras with DDNS. 

Why would the ISP change your IP address? The truth is that it is easier to administrate the network that way. The IP addresses are leased to the clients for a particular amount of time. This task is assigned to a DHCP server, which the ISP relies typically on. So when that limited time finishes, customers will receive a new IP address.

The Dynamic DNS is an easy-to-use and easy to set up solution. It is usually free and serves nearly every scenario.

How does Dynamic DNS work?

If you want to implement DDNS, you have to sign up with a Dynamic DNS provider. After that, you have to install their software on the host computer. It applies to that exact computer that is managed as the server, like a web server or a file server. 

The software watches the dynamic IP address for changes. When it detects a difference in the address, it reaches the DDNS service to update your account with the new IP address. 

The DDNS software has to be constantly running and able to identify a change in the IP address. Thus the DDNS name you have associated with your account will proceed to direct clients to the host server despite the fact that the IPs could change a severe number of times.  

If you have files that you want to be able to access no matter at what location you are, a Dynamic DNS service becomes a requirement. Also, another case would be if you want to host your website from home, you like to manage your home computer network from a distance, you like to remote into your computer when you are away, or whatever other similar reason.

A Dynamic DNS service is unnecessary for networks with static IP addresses. After the IP address is initially told the first time, the domain name doesn’t need to ask a second time. The reason is simple – static IP addresses don’t change.

Benefits from using it

Holds you online. It will decrease downtime by auto-update the IP addresses. So, the devices or services will still be available through the net.

Easy-to-use. You need to set it up once. For example, for IP cameras for monitoring. You will have to set up your router by going to settings and putting the user and the password for your Dynamic DNS service. 

More affordable than static IPs. It will be much cheaper to pay for just one DDNS service if you have several devices. To pay for every static IP address could be pricey.