Thursday, April 8, 2010

DNS

1. Overview of DNS
Domain Name System (DNS) is an Internet Engineering Task Force (IETF) standard name service that allows your computer to register and resolve domain names . The DNS makes it possible to assign domain names to organizations independent of the routing of the numerical IP address. In other words, DNS is a system that translates domain names into IP addresses. This is necessary because computers only make use of IP addresses yet we use only human readable names since the names are easier to remember than IP addresses. Without this DNS resolution, the internet would be a very inconvenient place. DNS resolution is therefore a very important task.

The DNS is a large database that resides on various computers and it contains the IP addresses of various hosts on the Internet and various domains. The DNS is basically a distributed Internet directory the closest DNS computer machine which has the required information.

You need to install DNS on either the Windows 2003 server or Windows 2003 advanced server platform. Fully functional DNS is not supported on the Windows XP platform. Additionally, you need to have TCP/IP installed and configure before you processed DNS.
2. DNS Namespace
The domain namespace is a hierarchical, tree-structured namespace, starting at an unnamed root used for all DNS operations. In the DNS namespace, each node and leaf in the domain namespace tree represents a named domain. Each domain can have additional child domains. Figure 1-1 illustrates the structure of an Internet domain namespace.

The DNS provide the protocol which allows clients and server to communicate with each other. In DNS, a tree structure has been designed such that root of the tree behind the complete tree. The maximum levels of the tree are 128 and each level of the tree can have a string of 63 characters. The root of the DNS hierarchy is represented by period “.”.

Private Domain Namespace
In addition to the top-level domains on the Internet, organizations can also have a private namespace: a DNS namespace based on a private set of root servers independent of the Internet’s DNS namespace. Within a private namespace, you can name and create your own root server or servers and any subdomains as needed. Private names cannot be seen or resolved on the Internet. An example of a private domain name is mycompany.local.
3. Domain Names
Each node in the DNS domain tree or DNS hierarchy is identified by a FQDN. This is a DNS domain name that specifies the node.s location in relation to the DNS domain tree/hierarchy. A domain name can be defined as the list of labels along the path from the root of the DNS domain tree/hierarchy to a particular node. The FQDN is the entire list of labels for a specific node.
Each domain registered in DNS is connected to a DNS name server. The DNS server of a domain provides authoritative replies to queries for that particular domain.
4. Top-Level Domains
Below the root DNS domain are the top-level domains. These top-level domains are also managed by ICANN. The top-level domains managed by ICANN are:
1. Organizational Domains
2. Geographical Domains
3. Reserve Domains
Organizational domains: Organizational domains have the following characteristics:
(i) Organizational domains can be used globally.
(ii) They are named via a three-character code.
(iii) The code defines the main function of the organizations of the DNS domain.
Geographical domains: Geographical domains have the following characteristics:
(i) Geographical domains are usually used by organizations not residing in the United States.
(ii) They are named via a two-character country and region codes.
(iii) The codes were established by the International Organization for Standardization (ISO) 3166.
(iv) The codes identify a country, such as .uk for the United Kingdom
Reverse domains: These domains are used for IP address to name mappings. This is called reverse lookups.
Table 1-1 shows the TLDs in use today, as defined by RFC 1591.

Table 1-1. Top-Level Domains Used on the Internet
Domain Name
Use
aero Exclusively reserved for the aviation community
biz A TLD that is aimed at large and small companies around the world
com Commercial organizations, such as microsoft.com for the Microsoft
Corporation
coop A TLD for cooperatives
edu Educational institutions, now mainly four-year colleges and universities, such as cmu.edu for Carnegie Mellon University
gov Agencies of the U.S. Federal Government, such as fbi.gov for the U.S. Federal Bureau of Investigation
info An unrestricted domain aimed at providing information for worldwide consumption
int Organizations established by international treaties, such as nato.int for NATO
mil U.S. military, such as af.mil for the U.S. Air Force
museum A domain restricted to museums and related organizations and individuals
name A global domain for use by individuals, possibly developing into a global digital identity for users
net Computers of network providers, organizations dedicated to the Internet, Internet service providers (ISPs), and so forth, such as internic.net for the Internet Network Information Center (InterNIC)
org A TLD for groups that do not fit anywhere else, such as nongovernment or nonprofit organizations (for example, reiki.org for information about Reiki)
pro A TLD for professionals such as doctors, lawyers, and accountants
5. Understanding DNS Components and Terminology
The components which DNS is dependant on and the terminology used when discussing and managing DNS are listed below:
1. DNS Server
2. DNS Client
3. DNS Zones
4. Zone Files
5. DNS Resolvers
6. DNS Resource Records
7. DNS Root Server
8. Queries

1. DNS Server
This is a computer running the DNS Server service, or BIND; that provides domain name services. The DNS server manages the DNS database that is located on it. The DNS server program, whether it is the DNS Server service or BIND; manages and maintains the DNS database located on the DNS server. The information in the DNS database of a DNS server pertains to a portion of the DNS domain tree structure or namespace. This information is used to provide responses to client requests for name resolution.
When a DNS server is queried it can do one of the following:
i. Respond to the request directly by providing the requested information.
ii. Provide a pointer (referral) to another DNS server that can assist in resolving the query
iii.Respond that the information is unavailable
iv.Respond that the information does not exist

A DNS server is authoritative for the contiguous portion of the DNS namespace over which it resides.

2. DNS Client
This is a machine that queries the DNS server for name resolution. To issue DNS requests to the DNS server, DNS resolvers are used.
3. DNS Zones
A DNS zone is the contiguous portion of the DNS domain name space over which a DNS server has authority, or is authoritative. A zone is a portion of a namespace . it is not a domain. A domain is a branch of the DNS namespace. A DNS zone can contain one or more contiguous domains. A DNS server can be authoritative for multiple DNS zones.

4. Zone Files
Zone files store resource records for the zones over which a DNS server has authority.

5. DNS Resolvers

These are programs that use DNS queries to request information from the DNS servers. In Windows Server 2003, the DNS Client service performs the function of the DNS resolver. A DNS resolver can communicate and issue name queries to remote DNS servers, or to the DNS server running locally. When a DNS resolver receives a response from a DNS server, the resolver caches the information locally. The local cache is then used if the same information is requested.
6. Resource Records
The DNS database contains resource records (entries) that are used to resolve name resolution queries sent to the DNS server. Each DNS server contains the resource records it needs to respond to name resolution queries for the portion of the DNS namespace for which it is authoritative.

7. DNS Root Server
A root server performs the following functions when a query cannot be resolved from the local zone files:
i. Returns an authoritative answer for a particular domain.
ii. Returns a referral to another DNS server that can provide an authoritative answer

8. Queries
The types of DNS queries which can be sent to a DNS server are:
i. Recursive queries
ii. Iterative queries
6. Understanding How a DNS Query Works
A DNS client queries a DNS server to resolve a name. The query contains the following important information:
i. The DNS domain name in the FQDN format.
ii. The query type
iii. The class for the DNS domain name

A DNS client uses one of three query types to query a DNS server:
i. Iterative queries: The DNS server provides the best answer it can. This can be:
* The resolved name
*A referral to a different DNS server

ii. Recursive queries: The DNS server has to reply with the requested information, or with an error. The DNS server cannot provide a referral to a different DNS server.
iii. Inverse queries: The query sent to the DNS server is to resolve the host name associated with a known IP address. All the domains have to be queried to provide a correct answer to the query.

If a DNS server cannot find a match for a queried name in its zone information, or in its cache; the DNS server performs recursion to resolve the name. This is the default configuration for DNS servers. Recursion is the process whereby which the DNS server queries other DNS servers for the client. By the initial DNS server querying the other DNS servers, recursion actually ends up making the initial DNS server a DNS client!
In order to perform recursion, root hints assist the DNS server in determining where in the DNS namespace it should commence searching for the queried name. Root hints is a collection of resource records which the DNS Server service utilizes to locate DNS servers who are authoritative for the root of the DNS domain namespace structure. If you are using Windows Server 2003 DNS, a preconfigured root hints file named Cache.dns already exists. The file can be found in the WINDOWS\System32\Dns directory. Cache.dns contains the addresses of root servers in the Internet DNS namespace, and is preloaded to memory when the DNS Server service initiates.

If however recursion is disabled for the DNS server, and the DNS server cannot find a match for the queried name in its zone information, or in its cache; the client begins to perform iterative queries. The root hint referrals from the DNS server are used for iterative queries. When a client performs iterative queries, the client sends repeated requests to different DNS servers to resolve the queried name.

The events that occur to resolve a name requested in a query are explained below:
i. The resolver sends a recursive DNS query to its local DNS server, to request the IP address of a particular name.
ii. Because the local DNS server cannot refer the resolver to a different DNS server, the local DNS server attempts to resolve the requested domain name.
iii. The local DNS server checks its zones.
iv. If it finds no zones for the requested domain name, the local DNS server sends an iterative query for the requested name to the root DNS server.
v. The root DNS server is authoritative for the root domain. It responds with an IP address of a name server for the specific top-level domain.
vi. The local DNS server next sends an iterative query for the requested name to this name server who in turn replies with the IP address of the particular name server servicing the requested domain name.
vii. The local DNS server then sends an iterative query for the requested name to the particular name server servicing the particular domain.
viii. The name server responds with the requested IP address.
ix. The IP address is returned to the resolver.

The different query response types which can be returned from the DNS server are:
Authoritative answer: This is a positive response which is returned to a client. The authority bit set in the DNS message indicates that the reply was received from a DNS server that has direct authority for the name queried in the message.
Positive answer: This response type returns the queried resource record that corresponds to the name and record type queried in the original query.
Referral answer: A referral response is returned if the DNS server does not support recursion. A referral contains additional resource records for resolving the request.
Negative answer: A negative answer is returned to the client when the following events occur:
*The name queried does not exist in the DNS namespace. This information is obtained from an authoritative server.
*The authoritative server indicated that the name queried does exist in the DNS namespace. However, there are no resource records of this type present for the requested name.
7. Understanding How Caching Works
In DNS, caching is used to reduce traffic on the network that is generated from queries sent to DNS servers. The DNS Server service and the DNS Client service both utilize caching to improve DNS performance, and reduce DNS specific traffic.

DNS Server Cache: When the DNS server performs recursive queries for clients, the DNS server stores the resource records in its DNS server cache. If the same information is requested again, the cached information is used. The contents of the DNS server cache is removed when the DNS Server service is stopped. You can also manually remove the contents of the DNS server cache by using the DNS console, the management console for administering DNS.

DNS Client Cache: This cache is also referred to as the DNS resolver cache. Information is added to the DNS client cache when the following events occur:
*The DNS Client service starts: The records in the HOSTS file are loaded into the DNS client cache.
*The DNS server responds to a client.s request: When the DNS server returns a response to a query, the information is added to the DNS client cache.

The contents of the DNS client cache is removed when the DNS Client service is stopped.

1 comment:

  1. What is DNS and how its working and type of DNS server hosting related information through this blog.Above all the points are explained very clearly.web hosting companies

    ReplyDelete