Monday, August 24, 2015

DNS Queries

Queries:
Recursive lookup: If a PC needs to access www.http-cloud.com he will ask his DNS server (the DNS server that he has statically or he received from the DHCP server with the DHCP lease), if the DNS server is authoritative for the zone “http-cloud.com”, it will fetch the IP address of the record “www” and it will give to the clientPC. The clientPC will cache this resolution and it will use the IP address received to communicate with the www.http-cloud.com server
Forward Query:
•If there is a user who has an address in hotmail. The Client-PC needs to access www.hotmail.com he will ask his server for the IP address of this hostname. In case the DNS server is not authoritative for the zone “hotmail.com”, and in case the DNS server have an IP address of a forwader ( example an ISP server), he will forward the query  to the IP address of the ISP-DNS server. The ISP-DNS server will be responsible for finding the record for www.hotmail.com and send it to the DNS server of the client. The DNS server of the Client will cache this record and will return the record to the client-PC.
Recursive Query:
If a client PC query his DNS server for the IP of www.centos.org and if DNS server is not authoritative for the zone “centos.org” and if that DNS-server doesn’t have the IP of a forwarder. The DNS server will do a recursive query:
The DNS-Server will ask the root name servers for the NS records (name servers records) of the “.org” zone
Once the DNS-Server have the an IP address of a Name server of the “.org” zone, he will query it for the NS records (name servers records) of the zone centos
Once the DNS-Server get an IP address of a name server of the “centos.org” zone, he will query that  name server for the hostname “www”.
Once the DNS-Server will get the reply, he will cache it and send it back to the client.

As the root zone is the parent zone of the zone “org”, so the root zone should have NS records for the “org” zone. As well as the “org” zone is the parent zone for the “centos”, the “org” zone will have the NS records for the “centos” zone
Using the dig utility:
Dig utility is a command line tool that allows to perform DNS lookups and debug a nameserver configuration.:
To lookup a nameserver for a particular domain name  (means to know the DNS server responsible for  that particular domain name):
Dig name NS
  Example: DIG http-cloud.com ns
To get root servers in the world “dig . NS”
To get the com servers “dig com NS”
To lookup for the IP address of a specific A record:
Dig name A
   Example: Dig www.http-cloud.com A
The PTR lookup: to lookup for a hostname if we have the IP address:
Dig –x address
  Example: Dig –x 192.168.10.10
If you want to get a short answer:
Dig www.http-cloud.com +short
Dig get1get.com mx +short
Another DNS client tool “nslookup” is used by windows and Linux. Dig utility is more recent.

Looking for a flexible part-time job ? Check these opportunities:
https://www.cv-cloud.com/job/

You can our IT services on http://www.http-cloud.com


I hope this was helpful, and I would like to thank you for reading

No comments:

Post a Comment