How to check DNS resolution?

The hostnames, IPs, ports, required for checking DNS resolution are available in this document. https://docs.cleartax.in/cleartax-docs/clear-finance-cloud/cfc-api-reference#2.-production-environment

The objective of this step is to make sure that the hostnames are resolving to all of the IP’s mentioned in the document, from your ERP.

If you are using a proxy, you should run this from that proxy system.

  1. To verify this, you can try running the nslookup or ping alternative command from the terminal based on your OS and terminal. For more information, refer to the guide below.

  2. If the DNS is not resolving, please use a public DNS.

  3. If public DNS is not allowed as per your IT policy then make sure that the alternative (host file) includes mapping of each hostname to all of the redundant IP addresses.

If it is not successful, try to flush the DNS cache and retry the nslookup command or the alternatives such as Public DNS or the host file configuration or raise a support ticket with your infrastructure and network service provider.

Note: The DNS resolution has to be consistent and successful at any point of time from all the instances from where the API request might be made in future.

Next: If this step is successful, it only means that your system now knows the IP address of the respective hostnames. It still does not confirm that the hostname is reachable from your system.

DNS resolution guide

Make sure when you run the DNS resolution check commands mentioned in this document you are able to see all the IP’s to which the sandbox and production hostnames should resolve.

List of various commands and the terminals in which it will work.

CommandsCommand PromptPowerShellGitBashUbuntu

nslookup

YES

YES

YES

YES

Resolve-DnsName

NO

YES

NO

NO

ping

YES

YES

YES

YES

Command - nslookup

Steps to run nslookup in Command Prompt

The nslookup command is used to query the Domain Name System (DNS) to obtain information about a domain or hostname.

When you perform an nslookup command, it will query the DNS server to get information about the IP address associated with the domain name.

For ensuring if the hostname is resolving to the correct IP address, follow the below steps:

Go to Command Prompt and run the nslookup command as below for both sandbox and production hostnames separately.

Sandbox:

nslookup api-sandbox.clear.in

The output here is non-authoritative because it did not come from the authoritative DNS server for the "clear.in" domain.

If it is successful, you should see the response as shown in the above image which has both the IP addresses.

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Production:

nslookup api.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Steps to run nslookup in PowerShell

Go to Windows PowerShell and run the nslookup command as below for both sandbox and production hostname to check if it is resolving to correct IP’s

Sandbox:

nslookup api-sandbox.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Production:

nslookup api.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Alternatively you can also run the Resolve-DnsName command in PowerShell as below for both sandbox and production hostname to check if it is resolving to correct IPs.

Sandbox:

Resolve-DnsName api-sandbox.clear.in

Repeat the same with the below hostname as well.

Resolve-DnsName storage.clear.in

Production:

Resolve-DnsName api.clear.in

Repeat the same with the below hostname as well.

Resolve-DnsName storage.clear.in

Steps to run nslookup in GitBash

Go to GitBash and run the nslookup command as below for both sandbox and production hostname to check if it is resolving to correct IP’s

Sandbox:

nslookup api-sandbox.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Production:

nslookup api.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Steps to run nslookup in Ubuntu (Linux)

Go to Ubuntu App and run the nslookup command as below for both sandbox and production hostname to check if it is resolving to correct IP’s

Sandbox:

nslookup api-sandbox.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Production:

nslookup api.clear.in

Repeat the same with the below hostname as well.

nslookup storage.clear.in

Command - ping

Steps to run ping in Command Prompt

The ping command is used to check the connectivity between two networked devices by sending an ICMP echo request packet to the target device and waiting for a response.

Go to Command Prompt and run the ping command as below for both sandbox and production hostnames separately.

Sandbox:

ping api-sandbox.clear.in

This output shows that the ping was successful and that the average round trip time to reach the "api-sandbox.clear.in" server was 7 milliseconds.

The IP address associated with the domain name "api-sandbox.clear.in" is 99.83.130.139, and the ping command was able to reach the server with this IP address.

The 0% packet loss indicates that all the packets sent were received, which means there were no network connectivity issues.

Repeat the same with the below hostname as well.

ping storage.clear.in

Production:

ping api.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Steps to run ping in Powershell

Go to Powershell and run the ping command as below for both sandbox and production hostnames separately.

Sandbox:

ping api-sandbox.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Production:

ping api.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Steps to run ping in GitBash

Go to GitBash and run the ping command as below for both sandbox and production hostnames separately.

Sandbox:

ping api-sandbox.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Production:

ping api.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Steps to run ping in Ubuntu (Linux)

Go to Ubuntu App and run the ping command as below for both sandbox and production hostnames separately.

Sandbox:

ping api-sandbox.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Production:

ping api.clear.in

Repeat the same with the below hostname as well.

ping storage.clear.in

Last updated