Saturday, March 12, 2011

DNS Files


  • CACHE.DNS - The DNS Cache file. This file is used to resolve internet DNS queries. On Windows systems, it is located in the WINNTROOT\system32\DNS directory and is used to configure a DNS server to use a DNS server on the internet to resolve names not in the local domain.

Example Files

Below is a partial explanation of some records in the database on a Linux based system. The reader should view this information because it explains some important DNS settings that are common to all DNS servers. An example /var/named/db.mycompany.com.hosts file is listed below.
mycompany.com.  IN SOA mymachine.mycompany.com. root.mymachine.mycompany.com. (
  1999112701           ; Serial number as date and two digit number YYMMDDXX
  10800                ; Refresh in seconds 28800=8H
  3600                 ; Retry in seconds 7200=2H
  604800               ; Expire 3600000=1 week
  86400 )              ; Minimum TTL 86400=24Hours
mycompany.com.                IN NS mymachine.mycompany.com.
mycompany.com.                IN MX  10  mailmachine.mycompany.com.
mymachine.mycompany.com.      IN A 10.1.0.100
mailmachine.mycompany.com.    IN A 10.1.0.4
george.mycompany.com.         IN A 10.1.3.16
A Line by line description is as follows:
  1. The entries on this line are:
    1. mycompany.com. - Indicates this server is for the domain mycompany.com.
    2. IN - Indicates Internet Name.
    3. SOA - Indicates this server is the authority for its domain, mycompany.com.
    4. mymachine.mycompany.com. - The primary nameserver for this domain.
    5. root.mymachine.mycompany.com. - The person to contact for more information.
    The lines in the parenthesis, listed below, are for the secondary nameserver(s) which run as slave(s) to this one (since it is the master).
  2. 1999112701 - Serial number - If less than master's SN, the slave will get a new copy of this file from the master.
  3. 10800 - Refresh - The time in seconds between when the slave compares this file's SN with the master.
  4. 3600 - Retry - The time the server should wait before asking again if the master fails to respond to a file update (SOA request).
  5. 604800 - Expire - Time in seconds the slave server can respond even though it cannot get an updated zone file.
  6. 86400 - TTL - The time to live (TTL) in seconds that a resolver will use data received from a nameserver before it will ask for the same data again.
  7. This line is the nameserver resource record. There may be several of these if there are slave name servers.
    mycompany.com.                IN NS mymachine.mycompany.com.
    
    Add any slave server entries below this like:
    mycompany.com.                IN NS ournamesv1.mycompany.com.
    mycompany.com.                IN NS ournamesv2.mycompany.com.
    mycompany.com.                IN NS ournamesv3.mycompany.com.
    
  8. This line indicates the mailserver record.
    mycompany.com.                IN MX  10  mailmachine.mycompany.com.
    
    There can be several mailservers. The numeric value on the line indicates the preference or precedence for the use of that mail server. A lower number indicates a higher preference. The range of values is from 0 to 65535. To enter more mailservers, enter a new line for each one similar to the nameserver entries above, but be sure to set the preferences value correctly, at different values for each mailserver.
  9. The rest of the lines are the name to IP mappings for the machines in the organization. Note that the nameserver and mailserver are listed here with IP addresses along with any other server machines required for your network.
    mymachine.mycompany.com.      IN A 10.1.0.100
    mailmachine.mycompany.com.    IN A 10.1.0.4
    george.mycompany.com.         IN A 10.1.3.16
    
Domain names written with a dot on the end are absolute names which specify a domain name exactly as it exists in the DNS hierarchy from the root. Names not ending with a dot may be a subdomain to some other domain.
Aliases are specified in lines like the following:
mymachine.mycompany.com  IN  CNAME  nameserver.mycompany.com.
george.mycompany.com  IN  CNAME  dataserver.mycompany.com.  
Linux1.mycompany.com  IN  CNAME  engserver.mycompany.com.  
Linux2.mycompany.com  IN  CNAME  mailserver.mycompany.com.  
When a client (resolver) sends a request, if the nameserver finds a CNAME record, it replaces the requested name with the CNAME, then finds the address of the CNAME value, and return this value to the client.
A host that has more than one network card which is set to address two different subnets can have more than one address for a name.
mymachine.mycompany.com  IN  A  10.1.0.100  
    IN  A  10.1.1.100  
When a client queries the nameserver for the address of a multi homed host, the nameserver will return the address that is closest to the client address. If the client is on a different network than both the subnet addresses of the multi homed host, the server will return both addresses.

For more information on practical application of DNS, read the DNS section of the Linux User's Guide.



Page 4

                                                                   < Previous                    Read More                           

0 comments:

¿Te animas a decir algo?

My Headlines

                                                                                                                                                                            Enter Donation Amount:

 Pleas Donate here if you like our  you can Donate by your Alert Pay if don't have already you can create one here

About Me

ajab khan
Hi there!
I'm Ajab Khan,29, Pakistani Citizen living at Lahore, Pakistan. Currently Working at University of the Punjab, Pakistan.
Started blogging since July 14, 2010 I have several blogs and first article was about how to use your mobile as a webcam you can access that article here, I love to collect interesting data if you like to share with me you can contact me by email  here is the id ajabbiz@yahoo.com