70-240 in 15 minutes a week: Windows 2000 Server Networking Services Page 4
Introduction to Windows 2000 DNS
The Domain Name System is the Internet-standard name service used by Windows 2000 to help clients resolve host names to IP addresses and find services on the network. Before getting into the details of what is new in Windows 2000 DNS, I think we should first review how DNS itself works.
DNS is a distributed system of name servers. In this system, groups of name servers are responsible for records relating to hosts in domains and or subdomains. These groups are called zones. Zones are authoritative, or responsible for, the records relating to a given domain or group of domains. For example, Microsoft might have a few servers responsible for the microsoft.com domain, and all associated subdomains might be part of the same zone. The DNS servers that carry the host records relating to Microsoft.com are said to have authority for that domain. As such, if these servers could not provide an answer for the IP address associated with bluescreen.microsoft.com, it is assumed not to exist.
Name servers hold what are referred to as resource records. A resource record maps a hostname to an IP address, or a particular service to a hostname. For example, a DNS server might contain a host record (called an A record) for a server called server2 that resolves to IP address 18.104.22.168. If a client or another DNS server were to ask for the associated IP address, it would be found and returned. By the same token, a mail server might query DNS looking for the mail server associated with the win2000trainer.com domain. In this case, it is querying DNS for the mail exchanger record (an MX record), which would provide the fully qualified name of the mail server, which could then be resolved to an IP address and contacted.
Let's try the longest example possible first. Let's say that I am sitting at my client computer, running Internet Explorer, and I want to view www.win2000trainer.com. My client cannot contact this server until the name is resolved to an IP address. As much, my client queries my local DNS server (whichever DNS server is specified in the TCP/IP properties) and asks for the IP address associated with www.win2000trainer.com. Since my local DNS server is not responsible (authoritative) for the win2000trainer.com domain, it passes the query to a root server. The root server gets the query, but only processes it partially. It sends my local DNS server back an answer on where to find a name server that know all about things that end in .com. My local name server caches this information, and then queries the .com name server, asking for the IP address associated with www.win2000trainer.com. Again, the .com name server gives only a partial answer, sending back the information on where to find the name server that knows all about things that end in win2000trainer.com. My local name server then caches this information, and queries the win2000trainer.com name server, looking for the IP address associated with a host called www. The name server looks up this record (since it is authoritative for things that end in win2000trainer.com) and returns the IP address 22.214.171.124 to my local DNS server. This information is cached, and then passed to the client (who also caches it), and the client can now communicate with www.win2000trainer.com directly. How long are those records that were cached stored for? I don't know. However long the name server who gave me the answer says they can be stored for. Who knows better than the name server that is resposible for win2000trainer.com how often the name to IP address mappings change? Usually the records are cached for around a day, but sometimes less, especially if changes happen frequently. As such, if someone else were to query my local name server 3 hours later looking for www.win2000trainer.com, the answer would be provided immediately from cache. By the same token, if my mail server were looking for the mail.win2000trainer.com server, it would simply query my local DNS server, who would query the win2000trainer.com DNS server (since it has recently cached where this is located), who could provide the information relating to a host called mail. Note that another type of DNS server exists that is not responsible for any zone. These are called caching-only servers - they simply forward queries to other name servers and cache answers as outlined above, but are not authoritative for any zone. DNS is actually quite simple and straighforward. Don't let the fact that you may never have used it before bother you. If you understand what I've outlined above, you understand how it works. We'll worry about configuring it later.
DNS is implemented as a service in Windows 2000 Server, and as such can be started or stopped like any other service. It can also be added or removed using the Add/Remove Programs Windows Components Wizard. DNS is not installed automatically when you install Windows 2000, so it needs to be added manually. The number of DNS servers present on your network will depend a number of factors including your needs for fault tolerance, performance, and so forth. DNS is required in order to install Active Directory, since Active Directory domains follow DNS naming conventions. Note that the previous example was talking about DNS resolution out on the Internet. In the same manner, DNS can be used strictly for internal hosts, or a combination of both, so keep this is mind.
In a tradition DNS configuration, you have a set of at least 2 DNS servers who are responsible, or authoritative, for a zone. A zone is an administrative unit of DNS, and is represented by a set of DNS servers who are responsible for maintaining information relating to one or more domains or subdomains. One server in the setup acts as a primary name server, and this is the only server which carries a writable copy of the zone file. Periodically, the primary name server replicates its zone file to another server (or servers) designated as secondary name servers. These also carry a copy of the zone file, but the copy is read-only. The replication process is referred to as a zone transfer. The primary reason for having 2 or more DNS servers be responsible for a zone is to ensure that should one fail, another will be available to answer queries relating to the domains stored in the zone file.