Creating a DNS Server, Part 2
|Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
In a previous article, "Creating a DNS Server, Part 1," I explained the fundamental background knowledge necessary for installing and configuring a domain name server (DNS). In this article, I'll pick up where I left off and explain the technique used for installing the DNS service. If you haven't read Part 1, you should read it before continuing—this article assumes that you already understand the basic principles involved.
Installing the DNS Service
To install the DNS service, select a Microsoft® Windows NT® Server with a static IP address. When you've selected an appropriate server, open Control Panel, and double-click the Network icon. When you see the Network property sheet, click the Services tab, then click Add. When you do, you'll see the Select Network Services window. Next, select Microsoft DNS Server from the Network Service window, and click OK. At this point, Windows NT will ask for the location of your Windows NT CD-ROM. Provide the path to your setup files, and click Continue. When Windows NT finishes copying the necessary files, click Close to close the Network property sheet. Windows NT will update the necessary bindings and ask you to reboot.
After the DNS service has been installed, the easiest way to administer it is to use the Domain Name Service Manager program, which can be accessed through the Administrative Tools menu.
When DNS initially installs, it functions only as a service that caches name information obtained from the Internet. However, you can customize the DNS service to better meet your needs. To do so, open the DNS Manager. When you do, you'll see a blank screen. Next, select New Server from the DNS menu. Type your DNS server's name in the space provided. When you do, you'll see your server added to the Server List, accompanied by a list of Server Statistics, as shown in Figure A.
To begin customizing your DNS server, select Preferences from the Options menu. When you see the Preferences dialog box, shown in Figure B, select the Auto Refresh Statistics and the Show Automatically Created Zones check boxes. Click OK to continue.
At this point, you'll return to the main DNS Manager window. Double-click your computer's name under Server List and press the F5 key. When you do, the three default DNS zones will appear under your DNS server, as shown in Figure C.
The Default Zones
At first, the default zones may appear cryptic and intimidating, but a closer examination reveals that their configuration is fairly simple. To see the configuration behind each preexisting zone, double-click the zone. When you do, the name, type, and contents of each record within the zone will appear in the Zone Info pane, as shown in Figure D.
Notice that each preexisting zone ends in "in-addr.arpa." This means that they are reverse lookup zones. As you can see in Figure D, each zone contains an NS (Name Service) and an SOA (Start of Authority) record. The three zones begin with 0, 127, and 255. TCP/IP reserves 0 for certain communications specific to the local network and 255 for broadcast functionality.
If you expand the 127.in-addr.arpa record, you'll see that it contains a PTR record mapped to 127.0.0.1, as shown in Figure E. As you may recall, this address is reserved as a loop-back address. The DNS server will use this record any time a client attempts to look up the 127.0.0.1 address.
So far, you've created a DNS server that will work for caching only. However, if you want your DNS server to be authoritative, you'll need to add several zones and supply domain information. To do so, you must determine how this DNS server will fit into your organizational structure. Once you know how DNS should function, you can begin adding domain and zone information.
To set up your zones, select your DNS server within the DNS Manager. Next, select New Zone from the DNS menu. When you do, you'll see the Creating New Zone For Your DNS Server Name dialog box. Since this is your first DNS server, select the Primary radio button, and click Next.
At this point, a dialog box will prompt you for your zone name. Type your domain name in the Zone Name text box. As you can see in Figure F, the dialog box automatically creates a zone filename based on your zone name. Click Next to continue.
At this point, you'll receive confirmation that the zone information has been entered. Click Finish to create the zone. As you can see in Figure G, the DNS Manager now contains a zone with a name matching your domain, and containing default NS and SOA records.
Notifying Another DNS
I mentioned in "Creating a DNS Server, Part 1" that it's a good idea to set up a backup DNS server. If you want information from your zones to be sent to the backup DNS server, select the zone name in the DNS Manager. Now, select Properties from the DNS menu. On the Zone property sheet, click the Notify tab. You may now add the IP addresses of your secondary DNS to the Notify List.
One important aspect of setting up a DNS is creating reverse lookup capabilities. This allows someone to determine your host name based on your IP address. Reverse lookup is often used where it's necessary to determine a user's identity for security reasons.
The first step to configuring reverse lookup is to determine your reverse lookup zone name. The reverse lookup zone name is based on a portion of your IP address in reverse order. For this reason, you need to know what class of IP address you have. For example, if you own the class B address 147.100.C.D, you'd reverse the network portion of your IP address and append the .in-addr.arpa. In this example, the reverse lookup zone would be 100.147.in-addr.arpa.
Once you know the name of your reverse lookup zone, open DNS Manager and double-click your computer's name under Server List. Next, select New Zone from the DNS menu. When you see the Creating New Zone For Your DNS Server Name dialog box, select Primary and click Next. Type the name of your reverse lookup zone in the Zone Name text box, and tab down to the Zone File field. The DNS Manager will automatically fill in the Zone File field, as shown in Figure H. Click Next and then click Finish. The DNS Manager will add the new zone to your DNS organization.
Adding DNS Records
Once you've created your primary and reverse lookup zones, you'll need to add information about any machines that you want to be able to access via the Internet. To do so, select your primary zone, then select New Host from the DNS menu. When you do, you'll see the New Host dialog box. Type the Host Name, Host IP address, and select the Create Associated PTR Record check box to automatically create a PTR record, as shown in Figure I. When you're done, click Add Host to add the host name to the DNS database file.
At this point, you'll see the host appear under the primary zone. An A record for the host that you've added appears beneath the primary zone. DNS uses the A record type to indicate that the entry maps the IP address to a unique host name. Most of the records you enter in your DNS will probably be A types.
You can also go to your reverse lookup zone and find a PTR record for the host, as shown in Figure J. Notice that since I was working with a class B address, the DNS Manager created a field for the third octet and placed the PTR record beneath it.
After you've created all the necessary host names, you can create any resource records that you see fit. For example, if you want your DNS server to know that a particular server is capable of processing e-mail, you might add an MX record (Mail eXchanger: a host that will process or forward mail for the domain name). To do so, select the desired zone, and then choose New Record from the DNS menu. When you do, you'll see the New Resource Record dialog box. Input the necessary information, as shown in Figure K, and click OK to create the new resource record. When you're done, you'll see the resource record that you've created appended to the Zone Info list, as shown in Figure L.
Brien M. Posey is an MCSE and a freelance technical writer. He is the director of information systems for a large healthcare company. Brien has also worked as a network engineer for the Department of Defense. You can contact him at Brien_Posey@xpressions.com. (Because of the large volume of e-mail he receives, it's impossible for him to respond to every message. However, he does read them all.)
The above article is courtesy of TechRepublic http//www.techrepublic.com.
We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.