Friday, 21 October 2011

DNS Basics

DNS is used to translate the ipaddresses to names. To explain, how DNS works, please look at the diagram on left. There is a DNS client which is also known as resolver. If DNS Client needs to resolve admin.server2.com it will check its client cache for which it used HOSTS file. It is usually in
C:/>Windows/System32/Drivers/etc/
If the record is not found in that file, it looks for a dns server. You enter that under the IPv4 properties for the network adapter.
When it find the DNS server, the server looks for the record in the server cache. Cache.dns file is located in the server at the following location
C:/>Windows/System32/DNS/
If it does not find the entry on the root hint file, it goes on the internet and looks for the "." Once that is resolved, "." server will resolve for the ".com" server. In same way the ".com" server resolves for "server2.com" and in turn the "student.server2.com" address gets resolved. This all happens on UDP PORT 53. If there is another DNS server in and the zones have to be transferred, it used TCP PORT 53 to transfer.

There are two types of queries:

1. Recursive: When the server HAS to resolve the query
2. Iterative: When the server can look for other servers, if it cannot resolve the query




No comments:

Post a Comment