Chapter 13. Establishing a Solid Infrastructure Foundation

When implementing or migrating to a new Windows Server 2003 environment, the architects of the network frequently focus on the Active Directory model. As found through experience in the field, the infrastructure of the network that includes DNS, DHCP, and domain controllers sets the proper foundation for a solid AD implementation. The functionality of core network services is critical in a networking environment, and a good deal of thought should be put into their design, administration, and functional requirements. This chapter drills down into the key aspects of the networking services and the best practice design and configuration information for optimizing the success of the network configuration.

Focusing on the Windows Server 2003 Infrastructure Components

Although an enterprise network has many functional layers, this chapter focuses on three key components that are critical to the functionality of a Windows Server 2003 environment. These three aspects—network addressing, name resolution, and directory integration—provide for the base-level functionality expected of any modern enterprise network and provide the backbone for the Windows Server 2003 infrastructure.

Network Addressing as the Infrastructure Foundation

The first critical component of a network is addressing, or allowing clients to assume a logical place in a network so that packets of information can be forwarded to and from the clients. This component was historically accomplished by proprietary network protocols, one for each network operating system (NOS). This gave NOS designers a great deal of flexibility in tailoring the communications components of their network to their specific design needs but made it difficult to exchange information between networks.

The Transmission Control Protocol/Internet Protocol (TCP/IP) was designed to interoperate between different varieties of networks, allowing them to speak a common “language,” of sorts. The rise of this protocol coincided with the widespread adoption of the Internet itself, and it was this popularity and ubiquitous use of this protocol that led Microsoft to choose it as the standard protocol for Windows 2000. Windows Server 2003 continues to use TCP/IP as the default network protocol, expanding its place within the Microsoft NOS world.

TCP/IP requires that each node on a network be addressed by a unique IP address, such as 10.23.151.20. Each IP address must be assigned to every node on a network, either manually or by automatic methods. The automatic addressing component is the place where the DHCP service comes in with Windows Server 2003.

DHCP provides the automation of the critical TCP/IP addressing in Windows Server 2003 and makes administration of a network more palatable. You can find more details on DHCP in the section on “The Dynamic Host Configuration Protocol (DHCP) In Depth” later in this chapter.

Simplifying Address Look-up with Name Resolution

The second critical aspect in networks is name resolution. Because humans understand the concept of names better than they do IP addresses, the need arises to translate those sets of numbers into common names.

Windows Server 2003 supports two types of name resolution. The first type, the domain name system (DNS), translates IP addresses into fully qualified domain name (FQDN) addresses, which allows them to be addressed in an Active Directory or Internet DNS structure.

The second type of name resolution, mapping legacy Microsoft NetBIOS names into IP addresses, is provided by WINS. Although it is technically possible (and ideal) to create a Windows Server environment free of NetBIOS name resolution, the truth is that divorcing a network from WINS dependency is very difficult, so it will remain an active part of network services in most organizations, at least for a few more years. You can find more information on WINS in the “Continuing Usage of Windows Internet Naming Service (WINS)” section later in this chapter.

Centralizing Address Information with Directory Integration

The final important service that is supplied by a functional enterprise network is directory placement and lookup capability. Having a centralized directory that controls access to resources and provides for centralized administration is a vital function in modern networks.

Active Directory is the directory service that is provided with Windows Server 2003 and is built into many of the operating system components. The servers that handle the login requests and password changes and contain directory information are the domain controllers and global catalog domain controllers, which will be explained in more detail in the “The Active Directory Global Catalog” section later in this chapter.

Subsequently, domain controller and global catalog placement is a critical piece of a Windows Server 2003 environment. Special considerations must be made regarding this concept because access to directory lookup and registration is key for client functionality on a network.

Network Services Changes in Windows Server 2003

Windows Server 2003’s implementation of Active Directory expands upon the advanced feature set that Windows 2000 DNS introduced. Several key functional improvements were added, but the overall design and functionality changes have not been significant enough to change any Windows 2000 design decisions that were previously made regarding DNS. The following sections describe the functionality introduced in Windows 2000 DNS that has been carried over to Windows Server 2003 DNS and helps to distinguish it from other DNS implementations.

Active Directory–Integrated Zones

The most dramatic change in Windows 2000’s DNS implementation was the concept of directory-integrated DNS zones, known as AD-integrated zones. These zones were stored in Active Directory, as opposed to in a text file as in standard DNS. When the Active Directory was replicated, the DNS zone was replicated as well. This also allowed for secure updates, using Kerberos authentication, as well as the concept of multimaster DNS, in which no one server is the master server and all DNS servers contain a writeable copy of the zone.

Windows Server 2003 uses AD-integrated zones, but with one major change to the design. Instead of storing the zone information in Active Directory, it is instead stored in the application partition to reduce replication overhead. You can find more information on this concept in the following sections.

Dynamic Updates

As previously mentioned, dynamic updates, using Dynamic DNS (DDNS), allow clients to automatically register and unregister their own host records as they are connected to the network. This concept was a new feature with Windows 2000 DNS and is carried over to Windows Server 2003.

Unicode Character Support

Introduced in Windows 2000 and supported in Windows Server 2003, Unicode support of extended character sets enables DNS to store records written in Unicode, or essentially multiple character sets from many different languages. This functionality essentially allows DNS servers to use and perform lookups on records that are written with nonstandard characters, such as underscores, foreign letters, and so on.

DNS Changes in Windows Server 2003

In addition to the changes in Windows 2000 DNS, the Windows Server 2003 improvements help to further establish DNS as a reliable, robust name-resolution strategy for Microsoft and non-Microsoft environments. An overall knowledge of the increased functionality and the structural changes will help you to further understand the capabilities of DNS in Windows Server 2003. Some of the major changes in DNS in Windows Server 2003 that also solve several problem in Windows 2000 DNS are summarized in the following points:

  • DNS Stored in Application Partition. Perhaps the most significant change in Windows Server 2003’s DNS, Active Directory–integrated zones are now stored in the application partition of the AD. For every domain in a forest, a separate application partition is created and is used to store all records that exist in each AD-integrated zone. Because the application partition is not included as part of the global catalog, DNS entries are no longer included as part of global catalog replication.

    Previously, in Windows 2000, all AD-integrated zones were stored as global catalog objects and replicated to all global catalog servers in an entire forest. Many times, this information was not applicable across the entire forest, and unnecessary replication traffic was created. Subsequently, the application partition concept was enacted, and replication loads are now reduced, while important zone information is delegated to areas of the network where they are needed.

  • Automatic Creation of DNS Zones. The Configure a DNS Server Wizard, as demonstrated in “Installing DNS Using the Configure Your Server Wizard” section later in this chapter, allows for the automatic creation of a DNS zone through a step-by-step wizard. This feature greatly eases the process of creating a zone, especially for Active Directory. You can invoke the wizard by right-clicking on the server name in the DNS MMC and choosing Configure a DNS Server.

  • No “Island” Problem. Windows 2000 previously had a well-documented issue that was known as the “island” problem, which was manifested by a DNS server that pointed to itself as a DNS server. If the IP address of that server changed, the DNS server updated its own entry in DNS, but then other DNS servers within the domain were unable to successfully retrieve updates from the original server because they were requesting from the old IP address. This effectively left the original DNS server in an “island” by itself, hence the term.

    Windows Server 2003 DNS first changes its host records on a sufficient number of other authoritative servers within DNS so that the IP changes made will be successfully replicated, thus eliminating this “island” problem. As a result, it is no longer necessary to point a root DNS server to another DNS server for updates, as was previously recommended as a method of resolving this issue.

  • Forest Root Zone for _msdcs Moved to Separate Zone. In Active Directory, all client logons and lookups are directed to local domain controllers and global catalog servers through references to the SRV records in DNS. These SRV records were stored in a subdomain to an Active Directory domain that was known as the _msdcs subdomain.

    In Windows Server 2003, _msdcs has been relocated to become a separate zone in DNS, as shown in Figure 13.1. This zone, stored in the application partition, is replicated to every domain controller that is a DNS server. This listing of SRV records was moved mainly to satisfy the requirements of remote sites. In Windows 2000, these remote sites had to replicate the entire DNS database locally to access the _msdcs records, which led to increased replication time and reduced responsiveness. If you delegate the SRV records to their own zone, only this specific zone can be designated for replication to remote site DNS servers, saving replication throughput and increasing the response time for clients.

    The _msdcs zone in Windows 2003 DNS.

    Figure 13.1. The _msdcs zone in Windows 2003 DNS.

DNS in an Active Directory Environment

DNS is inseparable from Active Directory. In fact, the two are often confused for one another because of the similarities in their logical structures.

Active Directory uses a hierarchical LDAP-compliant structure that was designed to map into the DNS hierarchy, hence the similarities. In addition, Active Directory uses DNS for all internal lookups, from client logins to global catalog lookups. Subsequently, strong consideration into how DNS integrates with Active Directory is required for those considering deploying or upgrading AD.

Impact of DNS on Active Directory

As any Windows 2000 administrator can attest, problems with DNS can spell disaster for an Active Directory environment. Because all servers and clients are constantly performing lookups on one another, a break in name-resolution service can severely affect Active Directory activity.

For this and other reasons, installing a redundant DNS infrastructure in any Active Directory implementation is strongly recommended. Even smaller environments should consider duplication of the primary DNS zone, and nearly as much emphasis as is put into protecting the global catalog AD index should be put into protecting DNS.

Security considerations for the DNS database should not be taken for granted. Secure updates to AD-integrated zones are highly recommended, and keeping DHCP servers off a domain controller can also help to secure DNS. In addition, limiting administrative access to DNS will help to mitigate problems with unauthorized “monkeying around” with DNS.

Active Directory in Non-Microsoft DNS Implementations

Active Directory was specifically written to be able to co-exist and, in fact, use a non-Microsoft DNS implementation as long as that implementation supports active updates and SRV records. For example, AD will function in all versions of Unix BIND 8.1.2 or later. With this point in mind, however, it is still recommended that an organization with a significant investment in Microsoft technologies consider hosting Active Directory DNS on Windows Server 2003 systems because functionality enhancements provide for the best fit in these situations.

For environments that use older versions of DNS or are not able (or willing) to host Active Directory clients directly in their databases, Active Directory DNS can simply be delegated to a separate zone in which it can be authoritative. The Windows Server 2003 systems can simply set up forwarders to the foreign DNS implementations to provide for resolution of resources in the original zone.

Using Secondary Zones in an AD Environment

Certain situations in Active Directory require the use of secondary zones to handle specific name resolution. For example, in peer-root domain models, where two separate trees form different namespaces within the same forest, secondaries of each DNS root are required to maintain proper forestwide synchronization.

Because each tree in a peer-root model is composed of independent domains that might not have security privileges in the other domains, a mechanism will need to be in place to allow lookups to occur between the two trees. The creation of secondary zones in each DNS environment will provide a solution to this scenario, as illustrated in Figure 13.2.

Peer-root domain DNS secondary zones.

Figure 13.2. Peer-root domain DNS secondary zones.

Specifying SRV Records and Site Resolution in DNS

All Active Directory clients use DNS for any type of domain-based lookups. Logins, for example, require lookups into the Active Directory for specific SRV records that indicate the location of domain controllers and global catalog servers. Windows Server 2003, as previously mentioned, divides the location of the SRV records into a separate zone, which is replicated to all domain controllers that have DNS installed on them.

Subdomains for each site are created in this zone; they indicate which resource is available in those specific sites. In a nutshell, if an SRV record in the specific site subdomain is incorrect, or another server from a different site is listed, all clients in that site are forced to authenticate in other sites. This concept is important because a common problem is that when Active Directory sites are created before they are populated with servers, an SRV record from the hub location is added to that site subdomain in DNS. When a new server is added to those sites, their SRV records join the other SRV records that were placed there when the site was created. These records are not automatically deleted, and they consequently direct clients to servers across slow WAN links, often making login times very slow.

In addition to the site containers, the root of these containers contains a list of all domain controllers in a specific domain, as shown in Figure 13.3. These lists are used for name resolution when a particular site server does not respond. If a site domain controller is down, clients randomly choose a domain controller in this site. It is therefore important to make sure that the only entries in this location are servers in fast-connected hub sites. Proper grooming of these SRV records and placement of servers into their proper site subdomains will do wonders for client login times.

Site-level SRV records.

Figure 13.3. Site-level SRV records.

The Domain Name System (DNS) In Depth

Name resolution is a key component in any network operating system (NOS) implementation. The capability of any one resource to locate other resources is the centerpiece of a functional network. Consequently, the name-resolution strategy chosen for a particular NOS must be robust and reliable, and it must conform to industry standards.

Windows Server 2003 uses the domain name system (DNS) as its primary method of name resolution, and DNS is a vital component of any Active Directory implementations of Windows Server 2003. Windows Server 2003’s DNS implementation was designed to be compliant with the key Request for Comments (RFCs) that define the nature of a DNS. This makes it particularly beneficial for network infrastructures because it allows Windows Server 2003 to interoperate with external name-resolution environments.

This chapter details the key components of DNS in general and provides an overview of Windows Server 2003’s specific implementation of DNS. A particular emphasis is placed on the role of DNS in Active Directory and the way it fits in standard and nonstandard configurations. Step-by-step instructions outline how to install and configure specific DNS components on Windows Server 2003. In addition, troubleshooting DNS issues and specific Active Directory design scenarios helps to give a hands-on approach to your understanding of DNS.

The Need for DNS

As network infrastructure experts have found, a solid DNS design and implementation is critical to the successful lookup, views, and replication of DNS information across the Active Directory environment.

Although Microsoft developed its own implementation of DNS in Windows NT 4.0, it was based on the RFC standards on which DNS was founded. With the introduction of Windows 2000, Microsoft adopted DNS as the name-resolution strategy for Microsoft products. Older, legacy name resolution systems such as WINS are slowly being phased out. Since that time, the DNS implementation used by Microsoft has evolved to include a number of key benefits that distinguish it from standard DNS implementations, such as those in other DNS implementations—for example, Unix BIND. To understand these improvements, however, you first need a basic understanding of DNS functionality.

Microsoft very clearly heard from the marketplace how the DNS used for Active Directory needed to have better compatibility with the DNS used throughout the industry. Besides providing various options for AD integration into existing DNS environments, with Windows Server 2003 Microsoft now supports the InetOrgPerson attribute that further extends Microsoft’s DNS compatibility for more common LDAP lookup and DNS integration compatibility.

Framework for DNS

DNS structure is closely linked to the development of the Internet and often is confused with the Internet itself. The structure of DNS is highly useful, and the fact that it has thrived for so long is a tribute to its functionality. A closer examination of what constitutes DNS and how it is logically structured is important in understanding the bigger picture of how DNS fits in Windows Server 2003.

Understanding the DNS Namespace

The bounded area that is defined by the DNS name is known as the DNS namespace. microsoft.com is a namespace, as is marketing.companyabc.com. Namespaces can be either public or private. Public namespaces are published on the Internet and are defined by a set of standards. All the .com, .net, .org, and like namespaces are external, or public. An internal namespace is not published to the Internet but is also not restricted by extension name. In other words, an internal, unpublished namespace can occupy any conceivable namespace, such as dnsname.internal or companyabc.root. Internal namespaces are most often used with Active Directory because they give increased security to a namespace. Because such namespaces are not published, they cannot be directly accessed from the Internet.

Microsoft DNS

Despite common misperception, Microsoft DNS does not have to be at the root of all organizational DNS structures. In fact, in most network environments that already have an extensive Unix-based DNS, Windows Active Directory frequently subordinates to Unix-based DNS servers. This minimizes the initial requirement of replacing all Unix DNS servers with Windows DNS servers, or more likely, to minimize the political infighting that might occur between Unix-DNS proponents and Windows-DNS proponents. If the existing DNS is Unix-based, the existing environment remains intact and the Active Directory DNS seamlessly ties in as a secondary.

Installing DNS Using the Configure Your Server Wizard

Although there are various ways to install and configure DNS, the most straightforward and complete process involves invoking the Configure Your Server Wizard and subsequent Configure a DNS Server Wizard. The process detailed in this section illustrates the installation of a standard zone. Multiple variations of the installation are possible, but this particular scenario is illustrated to show the basics of DNS installation.

If DNS Is Installed...

If DNS is already installed on a server but not configured, start the procedure from step 7.

Running the Configure Your Server Wizard

When you’re running the Configure Your Server Wizard, as noted in step 3, and you select the typical configuration, the networking components for DNS and Active Directory Domain Controller will be installed automatically at this point. If you select the custom configuration in the Configure Your Server Wizard, you need to follow steps 4 through 21.

Installation of DNS on Windows Server 2003 is straightforward, and no reboot is necessary. To install and configure the DNS service on a Windows Server 2003 computer, follow these steps:

  1. Choose Start, All Programs, Administrative Tools, Configure Your Server Wizard.

  2. Click Next on the Welcome screen.

  3. Make sure that the listed prerequisites have been satisfied and click Next to continue. The Configure Your Server Wizard will then perform a network test.

  4. Select the DNS Server Component and click Next. (If you are installing Active Directory with DNS, you need to select Domain Controller as well, although this procedure is not outlined here.)

  5. Verify that the options to Install DNS Server and Run the Configure a DNS Server Wizard to Configure DNS are selected and click Next.

  6. After DNS is installed, you might be prompted for your Windows Server 2003 CD. If so, insert it and click OK when prompted.

  7. The Configure a DNS Server Wizard is then started automatically, as illustrated in Figure 13.4. (Or, if DNS is already installed, install it manually by choosing Start, Run and typing dnswiz.exe.)

    The Configure a DNS Server Wizard.

    Figure 13.4. The Configure a DNS Server Wizard.

  8. On the Welcome screen for the Configure a DNS Server Wizard, click Next to continue.

  9. Select Create Forward and Reverse Lookup Zones (Recommended for Large Networks) and click Next.

  10. Select Yes, Create a Forward Lookup Zone Now (Recommended) and click Next.

  11. Select the type of zone to be created—in this case, choose Primary Zone—and click Next. If the server is a domain controller, the Store the Zone in Active Directory check box is available.

  12. Type the name of the zone in the Zone Name box and click Next.

  13. At this point, you can create a new zone text file or import one from an existing zone file. In this case, choose Create a New File with This File Name and accept the default. Click Next to continue.

  14. The subsequent screen allows a zone to either accept or decline dynamic updates. In this case, enable dynamic updates by selecting the Allow Both Nonsecure and Secure Dynamic Updates radio button and clicking Next.

  15. The next screen allows for the creation of a reverse lookup zone. Here, select Yes, Create a Reverse Lookup Zone and click Next.

  16. Select Primary Zone and click Next.

  17. Type in the network ID of the reverse lookup zone and click Next. (The network ID is typically the first set of octets from an IP address in the zone. If a class C IP range of 10.1.1.0/24 is in use on a network, you would enter the values 10.1.1, as illustrated in Figure 13.5.)

    Reverse lookup zone creation.

    Figure 13.5. Reverse lookup zone creation.

  18. Again, you are offered the option to create a new zone file or to use an existing file. In this case, choose Create a New File with This File Name and click Next to continue.

  19. Again, you are presented the option for dynamic updates. In this case, select Allow Both Nonsecure and Secure Dynamic Updates and click Next to continue.

  20. The next screen deals with the setup of forwarders, which will be described in more detail in the “DNS Zones” section later in this chapter. In this example, choose No, It Should Not Forward Queries and click Next to continue.

  21. The final window, shown in Figure 13.6, displays a summary of the changes that will be made and the zones that will be added to the DNS database. Click Finish twice to finalize the changes and create the zones.

    The final steps of the Configure a DNS Server Wizard.

    Figure 13.6. The final steps of the Configure a DNS Server Wizard.

You Might See a Pop-up Dialog Box

Depending on your network connectivity, you might see a pop-up dialog box between the two clicks to finish your DNS changes in step 21. If you are not connected to a LAN, you will see an error dialog box regarding searching for root hints. Although the dialog box notes the root hint error, if you click OK, DNS will still be configured successfully, so this is just an information note.

Configuring DNS to Point to Itself

DNS is installed immediately upon the closing of the Configure a DNS Server Wizard. One subtask that you should accomplish after the installation is configuring the DNS server in the TCP/IP settings to point to itself for DNS resolution, unless you have a specific reason not to do so. To accomplish this task, perform the following steps:

  1. Choose Start, Control Panel, Network Connections.

  2. While in Network Connections, right-click <Local Area Connection> (where Local Area Connection is the particular network adapter that is to be used on the network where DNS is implemented) and select Properties.

  3. Double-click Internet Protocol (TCP/IP).

  4. In the DNS Server boxes, make sure that Use the Following DNS Server Addresses is selected and then type the IP address of the DNS server into the Preferred DNS Server box.

  5. If you have a hub DNS server, you can enter it into the Alternate DNS Server box.

  6. Click OK and then OK again to complete the changes.

If you have installed DNS on a domain controller, all the Active Directory–integrated zones that exist in your domain DNS will subsequently be automatically transmitted to your new DNS installation. If, however, the zones in a domain are standard, or the new server is a new DNS structure, further configuration of zones will be required.

Configure a DNS Server to Point to Itself

Previous recommendations for Windows 2000 stipulated that a root DNS server point to another DNS server as the primary name server. This recommendation was made in response to what is known as the “island” problem in Windows DNS. Administrators will take heart in the fact that Windows Server 2003 no longer is subject to this problem, and it is now recommended that you configure a DNS server to point to itself in most cases as mentioned in an earlier section on “Configuring DNS to Point to Itself.”

Using Resource Records in a Windows 2003 Environment

In the DNS hierarchy, objects are identified through the use of resource records (RRs). These records are used for basic lookups of users and resources within the specified domain and are unique for the domain in which they are located. Because DNS is not a flat namespace, however, multiple, identical RRs can exist at different levels in a DNS hierarchy. The distributed nature of the DNS hierarchy allows such levels.

Several key resource records exist in most DNS implementations, especially in those associated with Windows Server 2003 Active Directory. A general familiarity with these specific types of RRs is required to gain a better understanding of DNS.

Start of Authority (SOA) Records in DNS

The Start of Authority (SOA) record in a DNS database indicates which server is authoritative for that particular zone. The server referenced by the SOA records is subsequently the server that is assumed to be the best source of information about a particular zone and is in charge of processing zone updates. The SOA record contains information such as the Time to Live (TTL) interval, the contact person responsible for DNS, and other critical information, as illustrated in Figure 13.7.

A sample SOA record.

Figure 13.7. A sample SOA record.

An SOA record is automatically created when DNS is installed for Active Directory in Windows Server 2003 and is populated with the default TTL, primary server, and other pertinent information for the zone. After installation, however, these values can be modified to fit the specific needs of an organization.

DNS Host (A) Records

The most common type of RR in DNS is the host record, also known as an A record. This type of RR simply contains the name of the host and its corresponding IP address, as illustrated in Figure 13.8.

Sample host records.

Figure 13.8. Sample host records.

The vast majority of RRs in DNS are A records because they are used to identify the IP addresses of most resources within a domain.

Name Server (NS) Records

Name Server (NS) records identify which computers in a DNS database are the name servers, essentially the DNS servers for a particular zone. Although there can be only one SOA record for a zone, there can be multiple NS records for the zone, which indicate to clients which machines are available to run DNS queries against.

Name Server Records

Name Server records, or NS records, do not actually contain the IP information of a particular resource. In fact, in most cases only A records contain this information. NS records and other similar records simply point to a server’s A record. For example, an NS record will simply point to server1.companyabc.com, which will then direct the query to the server1 A record in the companyabc.com zone.

Service (SRV) Records for Added DNS Information

Service (SRV) records are RRs that indicate which resources perform a particular service. Domain controllers in Active Directory are referenced by SRV records that define specific services, such as the global catalog, LDAP, and Kerberos. SRV records are a relatively new addition to DNS, and did not exist in the original implementation of the standard. Each SRV record contains information about a particular functionality that a resource provides. For example, an LDAP server can add an SRV record indicating that it can handle LDAP requests for a particular zone. SRV records can be very useful for Active Directory because domain controllers can advertise that they handle global catalog requests, as illustrated in Figure 13.9.

Sample SRV record for an Active Directory global catalog entry.

Figure 13.9. Sample SRV record for an Active Directory global catalog entry.

Unix BIND Servers, Version 8.1.2 or Later Is Recommended for Unix BIND Servers

Because SRV records are a relatively new addition to DNS, they are not supported by several down-level DNS implementations, such as Unix BIND 4.1.x and NT 4.0 DNS. It is therefore critical that the DNS environment that is used for Windows Server 2003 Active Directory have the capability to create SRV records. For Unix BIND servers, version 8.1.2 or later is recommended.

Mail Exchanger (MX) Records Defining E-mail Routing

A Mail Exchanger (MX) record indicates which resources are available for SMTP mail reception. MX records can be set on a domain basis so that mail sent to a particular domain will be forwarded to the server or servers indicated by the MX record. For example, if an MX record is set for the domain companyabc.com, all mail sent to [email protected] will be automatically directed to the server indicated by the MX record.

Pointer (PTR) Records for Reverse DNS Queries

Reverse queries to DNS are accomplished through the use of Pointer (PTR) records. In other words, if a user wants to look up the name of a resource that is associated with a specific IP address, he would do a reverse lookup using that IP address. A DNS server would reply using a PTR record that would indicate the name associated with that IP address. PTR records are most commonly found in reverse lookup zones.

Canonical Name (CNAME) Records for Alias Information

A Canonical Name (CNAME) record represents a server alias, or essentially allows any one of a number of servers to be referred to by multiple names in DNS. The record essentially redirects queries made to it to the A record for that particular host. CNAME records are useful when migrating servers and for situations in which friendly names, such as mail.companyabc.com, are required to point to more complex, server-naming conventions such as sfoexch01.companyabc.com.

Other DNS Records that Store Information

Other, less common forms of records that might exist in DNS have specific purposes, and there might be cause to create them. The following is a sample list but is by no means exhaustive:

  • AAAA—Maps a standard IP address into a 128-bit IPv6 address, as indicated in Figure 13.10. This type of record will become more prevalent as IPv6 is adopted.

    AAAA resource record.

    Figure 13.10. AAAA resource record.

  • ISDN—Maps a specific DNS name to an ISDN telephone number.

  • KEY—Stores a public key used for encryption for a particular domain.

  • RP—Specifies the Responsible Person for a domain.

  • WKS—Designates a particular Well Known Service.

  • MB—Indicates which host contains a specific mailbox.

Establishing and Implementing DNS Zones

A zone in DNS is a portion of a DNS namespace that is controlled by a particular DNS server or group of servers. The zone is the primary delegation mechanism in DNS and is used to establish boundaries over which a particular server can resolve requests. Any server that hosts a particular zone is said to be “authoritative” for that zone, with the exception of stub zones, which are defined later in the chapter in the section on “stub zones.” Figure 13.11 illustrates how different portions of the DNS namespace can be divided into zones, each of which can be hosted on a DNS server or group of servers.

DNS zones.

Figure 13.11. DNS zones.

Caching-only Server

A server that is installed with DNS but does not have any zones configured is known as a caching-only server. Establishing a caching-only server can be useful in some branch office situations because it can help to alleviate large amounts of client query traffic across the network and eliminate the need to replicate entire DNS zones to remote locations.

It is important to understand that any section or subsection of DNS can exist within a single zone. For example, an organization might decide to place an entire namespace of a domain, subdomains, and sub-subdomains into a single zone. Or specific sections of that namespace can be divided up into separate zones. In fact, the entire Internet namespace can be envisioned as a single namespace with . as the root, which is divided into a multitude of different zones.

Forward Lookup Zones

A forward lookup zone is created to do, as the name suggests, forward lookups to the DNS database. In other words, this type of zone resolves names to IP addresses and resource information. For example, if a user wants to reach Server1 and queries for its IP address through a forward lookup zone, DNS returns 10.0.0.11, the IP address for that resource.

Reverse Lookup Zones

A reverse lookup zone performs the exact opposite operation as a forward lookup zone. IP addresses are matched up with a common name in a reverse lookup zone. This is similar to knowing someone’s phone number but not knowing the name associated with it. Reverse lookup zones must be manually created, and do not always exist in every implementation. Reverse lookup zones are primarily populated with PTR records, which serve to point the reverse lookup query to the appropriate name.

CNAME Records

There is nothing to stop the assignment of multiple RRs to a single resource. In fact, this practice is common and useful in many situations. It might be practical to have a server respond to more than one name in specific circumstances. This type of functionality is normally accomplished through the creation of CNAME records, which create aliases for a particular resource.

Primary Zones

In traditional (non-Active Directory–integrated) DNS, a single server serves as the master DNS server for a zone, and all changes made to that particular zone are done on that particular server. A single DNS server can host multiple zones, and can be primary for one and secondary for another. If a zone is primary, however, all requested changes for that particular zone must be done on the server that holds the master copy of the zone.

Creating a new primary zone manually is a fairly straightforward process. The following procedure outlines the creation of a standard zone for the companyabc.com DNS namespace:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones.

  3. Right-click Forward Lookup Zones and choose New Zone.

  4. Click Next on the Welcome screen.

  5. Select Primary Zone from the list of zone types available and click Next to continue.

  6. Type in the name of the primary zone to be created and click Next.

  7. Because you’re creating a new zone file, as opposed to importing an existing zone file, select Create a New File with This File Name and click Next.

  8. Determine whether dynamic updates will be allowed in this zone. If not, select Do Not Allow Dynamic Updates and click Next to continue.

  9. Click Finish on the Summary page to create the zone.

Secondary Zones

A secondary zone is established to provide redundancy and load balancing for the primary zone. Each copy of the DNS database is read-only, however, because all recordkeeping is done on the primary zone copy. A single DNS server can contain several zones that are primary and several that are secondary. The zone creation process is similar to the one outlined in the preceding section on primary zones, but with the difference being that the zone is transferred from an existing primary server.

Stub Zones

The concept of stub zones is new in Microsoft DNS. A stub zone is essentially a zone that contains no information about the members in a domain but simply serves to forward queries to a list of designated name servers for different domains. A stub zone subsequently contains only NS, SOA, and glue records. Glue records are essentially A records that work in conjunction with a particular NS record to resolve the IP address of a particular name server. A server that hosts a stub zone for a namespace is not authoritative for that zone.

As illustrated in Figure 13.12, the stub zone effectively serves as a placeholder for a zone that is authoritative on another server. It allows a server to forward queries that are made to a specific zone to the list of name servers in that zone.

Stub zones in Windows 2003.

Figure 13.12. Stub zones in Windows 2003.

You can easily create a stub zone in Windows Server 2003 after it is determined that a stub zone is required. The following procedure details the steps involved with the creation of a stub zone:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones.

  3. Right-click Forward Lookup Zones and choose New Zone.

  4. Click Next on the Welcome screen.

  5. Select Stub Zone from the list of zone types and click Next to continue.

  6. Type in the name of the zone that will be created and click Next to continue.

  7. Select Create a New File with This File Name and accept the defaults, unless you are migrating from an existing zone file. Then click Next to continue.

  8. Type in the IP address of the server or servers from which the zone records will be copied. Click Add for each server entered, as shown in Figure 13.13, and then click Next to continue.

    A newly created stub zone.

    Figure 13.13. A newly created stub zone.

  9. Click Finish on the Summary page to create the zone.

The newly created stub zone will hold only the SOA, NS, and glue records for the domain at which it is pointed.

AD Zone Replication Scope Steps

In the AD Zone Replication Scope steps, you will have three options: 1) to all DNS servers in the forest, 2) to all DNS servers in the AD domain, and 3) to all DCs in the AD domain. If you have a single domain and a single forest, your best choice is to select option 1 and replicate throughout your forest. If you are in charge of only a single domain in your organization, you should choose option 2 to replicate across DNS servers in your own domain. If DNS is not integrated to Active Directory, choosing option 3 will replicate just to the domain controllers in your domain.

Creating Zone Transfers in DNS

Copying the DNS database from one server to another is accomplished through a process known as a zone transfer. Zone transfers are required for any zone that has more than one name server responsible for the contents of that zone. The mechanism for zone transfers varies, however, depending on the version of DNS and whether the zone is Active Directory–integrated.

DNS servers can be configured to notify other DNS servers of changes to a zone and begin a zone transfer on a scheduled basis. To set up a server to send zone transfers to another server from a forward lookup zone, follow these steps:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones.

  3. Right-click the name of the zone and choose Properties.

  4. Choose the Zone Transfers tab.

  5. Check Allow Zone Transfers and select Only to the Following Servers.

  6. Type in the IP address of the server that will receive the update, as shown in Figure 13.14.

    Setting up zone transfers.

    Figure 13.14. Setting up zone transfers.

  7. Click OK to save the changes.

Only to Servers Listed

In addition to specifically defining recipients of zone transfers by IP address, you can select the Only to Servers Listed on the Name Servers Tab radio button as well, assuming that the recipient server or servers are listed under the Name Servers tab.

Full Zone Transfer

The standard method for zone transfers, which transfers the entire contents of a DNS zone to other servers, is known as asynchronous zone transfer (AXFR) or full zone transfer. This type of zone transfer copies every item in the DNS database to a separate server, regardless of whether the server already has some of the items in the database. Older implementations of DNS used AXFR exclusively, and it is still used for specific purposes today.

Incremental Zone Transfer (IXFR)

An incremental zone transfer (IXFR) is a process by which all incremental changes to a DNS database are replicated to another DNS server. This saves bandwidth over AXFR replication changes because only the delta, or changes made to the database since the last zone transfer, are replicated.

IXFR zone transfers are accomplished by referencing an index number that is referenced on the SOA of the DNS server that holds the primary zone. This number is incremented upon each change to a zone. If the server requesting the zone transfer has an index number of 45, for example, and the primary zone server has an index number of 55, only those changes made during the period of time between 45 and 55 will be incrementally sent to the requesting server via an IXFR transfer. However, if the difference in index numbers is too great, the information on the requesting server is assumed to be stale, and a full AXFR transfer will be initiated. For example, if a requesting server has an index of 25, and the primary zone server’s index is 55, an AXFR zone transfer will be initiated, as illustrated in Figure 13.15.

IXFR zone transfers.

Figure 13.15. IXFR zone transfers.

Understanding the Importance of DNS Queries

The primary function of DNS is to provide name resolution for requesting clients, so the query mechanism is subsequently one of the most important elements in the system. Two types of queries are commonly made to a DNS database: recursive and iterative.

Recursive Queries

Recursive queries are most often performed by resolvers, or clients that need to have a specific name resolved by a DNS server. Recursive queries are also accomplished by a DNS server if forwarders are configured to be used on a particular name server. A recursive query essentially asks whether a particular record can be resolved by a particular name server. The response to a recursive query is either negative or positive. A common recursive query scenario is illustrated in Figure 13.16.

Recursive and iterative queries.

Figure 13.16. Recursive and iterative queries.

Iterative Queries

Iterative queries ask a DNS server to either resolve the query or make a “best guess” referral to a DNS server that might contain more accurate information about where the query can be resolved. Another iterative query is then performed to the referred server and so on until a result, positive or negative, is obtained.

In the example shown in Figure 13.16, Client1 in CompanyABC opens a Web browser and attempts to browse to the Web site for www.microsoft.com. A recursive query is initiated to the default name server; in this case, Server1 is contacted. Because Server1 is authoritative only for the companyabc.com namespace, and no entries exist for microsoft.com, the query is sent to an “upstream” DNS server that is listed in the root hints of the DNS server. That server, Server2, is not authoritative for microsoft.com but sends a referral back to Server1 for Server3, which is a name server for the .com namespace. Server3 knows that Server4 handles name-resolution requests for microsoft.com and sends that information back to Server1. A final iterative query is then sent from Server1 to Server4, and Server4 successfully resolves www to the proper IP address. Server1, with this information in hand, returns Client1’s original recursive query with the proper IP address and Client1’s browser successfully resolves www.microsoft.com.

This type of functionality lies at the heart of the distributed nature of DNS and allows DNS lookups to function as efficiently as they do.

Other DNS Components

Several other key components lie at the heart of DNS and are necessary for it to function properly. In addition, you need to fully understand the functionality of several key components of DNS that are used heavily by Microsoft DNS.

Dynamic DNS (DDNS)

Older versions of DNS relied on administrators manually updating all the records within a DNS database. Every time a resource was added or information about a resource was changed, the DNS database was updated, normally via a simple text editor, to reflect the changes. Dynamic DNS was developed as a direct response to the increasing administrative overhead that was required to keep DNS databases functional and up to date. With Dynamic DNS, clients can automatically update their own records in DNS, depending on the security settings of the zone.

It is important to note that only Windows 2000/XP and later clients support dynamic updates and that down-level (NT/9x) clients must have DHCP configured properly in order for them to be updated in DNS.

Time to Live (TTL)

The Time to Live (TTL) value for a server is the amount of time (in seconds) that a resolver or name server will keep a cached DNS request before requesting it again from the original name server. This value helps to keep the information in the DNS database relevant. Setting TTL levels is essentially a balancing act between the need for updated information and the need to reduce DNS query traffic across the network.

In the example from the “Iterative Queries” section, if Client1 already requested the IP of www.microsoft.com, and the information was returned to the DNS server that showed the IP address, it would make sense that that IP address would not change often and could therefore be cached for future queries. The next time another client requests the same information, the local DNS server will give that client the IP address it received from the original Client1 query as long as the TTL has not expired. This helps to reduce network traffic and improve DNS query response time.

The TTL for a response is set by the name server that successfully resolves a query. In other words, you might have different TTLs set for items in a cache, based on where they were resolved and the TTL for the particular zone they originated from.

The TTL setting for a zone is modified via the SOA record. The procedure for doing this in Windows Server 2003 is as follows:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones<Zonename>.

  3. Find the SOA record for the zone and double-click it.

  4. Modify the Minimum (Default) TTL entry to match the TTL you want, as shown in Figure 13.17.

    Changing the TTL.

    Figure 13.17. Changing the TTL.

  5. Click OK to accept the changes.

Secure Updates

One of the main problems with a Dynamic DNS implementation lies with the security of the update mechanism. If no security is enforced, nothing will prevent malicious users from updating a record for a server, for example, to redirect it to their own IP address. For this reason, dynamic updates are, by default, turned off on new standard zones that are created in Windows Server 2003. However, with AD-integrated DNS zones, a mechanism exists that will allow clients to perform secure dynamic updates. Secure updates use Kerberos to authenticate users and ensure that only those clients that created a record can subsequently update the same record.

If you’re using DHCP to provide secure updates, one important caveat is that DHCP servers should not be located on the domain controller because of specific issues in regards to secure updates. The reason for this recommendation is that all DHCP servers are placed in a group known as DNSUpdateProxy. Members of this group do not take ownership of items that are published in DNS. This group was created because DHCP servers often dynamically publish updates for clients automatically, and the clients would need to modify their entries themselves. Subsequently, the first client to access a newly created entry would take ownership of that entry. Because domain controllers create sensitive SRV records and the like, it is not wise to use a domain controller as a member of this group, and it is subsequently not wise to have DHCP on domain controllers for this reason.

DNS Maintenance, Updates, and Scavenging

DNS RRs often become stale, or no longer relevant, as computers are disconnected from the network or IP addresses are changed without first notifying the DNS server. The process of scavenging those records removes them from a database after their original owners do not update them. Scavenging is not turned on, by default, but you can enable this feature in Windows Server 2003 by following these steps:

  1. Open the DNS MMC snap-in by Start, Administrative Tools, DNS.

  2. Right-click the server name and choose Properties.

  3. Select the Advanced tab.

  4. Check the Enable Automatic Scavenging of Stale Records box.

  5. Select a scavenging period, as shown in Figure 13.18, and click OK to save your changes.

    Turning on scavenging.

    Figure 13.18. Turning on scavenging.

Scavenging makes a DNS database cleaner, but aggressive scavenging can also remove valid entries. It is therefore wise, if you’re using scavenging, to strike a balance between a clean database and a valid one.

Root Hints

By default, a DNS installation includes a listing of Internet-level name servers that can be used for name resolution of the .com, .net, .uk, and like domain names on the Internet. When a DNS server cannot resolve a query locally in its cache or in local zones, it consults the Root Hints list, which indicates which servers to begin iterative queries with.

The Hints file should be updated on a regular basis to ensure that the servers listed are still relevant. This file is located in \%systemroot%system32DNScache.dns and can be updated on the Internet at the following address:

ftp://ftp.rs.internic.net/domain/named.cache

Forwarders

Forwarders are name servers that handle all iterative queries for a name server. In other words, if a server cannot answer a query from a client resolver, servers that have forwarders simply forward the request to an upstream forwarder that will do the iterative queries to the Internet root name servers. Forwarders are used often in situations in which an organization uses the DNS servers of an ISP to handle all name-resolution traffic. Another common situation occurs when Active Directory’s DNS servers handle all internal AD DNS resolution but forward outbound DNS requests to another DNS environment within an organization, such as a legacy Unix BIND server.

In conditional forwarding, queries that are made to a specific domain or set of domains are sent to a specifically defined forwarder DNS server. This type of scenario is normally used to define routes that internal domain resolution traffic will follow. For example, if an organization controls the companyabc.com domain namespace and the companyxyz.com namespace, it might want queries between domains to be resolved on local DNS servers, as opposed to being sent out to the Internet just to be sent back again so that they are resolved internally.

Forward-only servers are never meant to do iterative queries, but rather to forward all requests that cannot be answered locally to a forwarder or set of forwarders. If those forwarders do not respond, a failure message is generated.

If you plan to use forwarders in a Windows Server 2003 DNS environment, you can establish them by following these steps:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Right-click the server name and choose Properties.

  3. Select the Forwarders tab.

  4. In the DNS Domain box, determine whether conditional forwarders will be established. If so, add them by clicking the New button.

  5. Add the IP address of the forwarders into the Selected Domain’s Forwarder IP Address List box, as shown in Figure 13.19.

    Setting up forwarders.

    Figure 13.19. Setting up forwarders.

  6. If this server will be configured only to forward, and to otherwise fail if forwarding does not work, check the Do Not Use Recursion for This Domain box.

  7. Click OK to save the changes.

Using WINS for Lookups

In environments with a significant investment in WINS lookups, the WINS database can be used in conjunction with DNS to provide DNS name resolution. If a DNS query has exhausted all DNS methods of resolving a name, a WINS server can be queried to provide for resolution. This method creates several WINS RRs in DNS that are established to support this approach.

To enable WINS to assist with DNS lookups, follow these steps:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones.

  3. Right-click the zone in question and choose Properties.

  4. Choose the WINS tab.

  5. Check the Use WINS Forward Lookup box.

  6. Enter the IP address of the WINS Server(s), click Add, and then click OK to save the changes.

Troubleshooting DNS

Much has been written about the complexity of DNS, and even more misconceptions have been written about it. In truth, however, DNS structure is logical, so you can easily troubleshoot it, if you use the proper tools and techniques. A good grasp of these tools and their functionality is a must for proper name-resolution troubleshooting with DNS.

Using the DNS Event Viewer to Diagnose Problems

As any good administrator knows, the Event Viewer is the first place to look for any type of troubleshooting. Windows Server 2003 makes it even more straightforward to use because DNS Events compiled from the Event Viewer are immediately accessible from the DNS MMC console. Parsing this set of logs can help you to troubleshoot DNS replication issues and query problems.

For more advanced Event Log diagnosis, you can turn on Debug Logging on a per-server basis. It is recommended that you turn on this functionality only as required, however, because log files can fill up fast with debugging turned on. To enable Debug Logging, follow these steps:

  1. Open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Right-click on the server name and choose Properties.

  3. Select the Debug Logging tab.

  4. Check the Log Packets for Debugging box.

  5. Configure any additional settings as required and click OK.

It is recommended that you turn off these settings after the troubleshooting is complete.

Using Performance Monitor to Monitor DNS

Performance Monitor is a built-in, often-overlooked utility that allows for a great deal of insight into issues in a network. In regards to DNS, many critical DNS counters can be monitored relating to queries, zone transfers, memory use, and other important factors.

Client-Side Cache and HOST Resolution Problems

Windows 2000 and later clients have a built-in client cache for name resolution that caches all information retrieved from name servers. When requesting lookups, the client resolver parses this cache first, before contacting the name server. Items remain in this cache until the TTL expires, the machine is rebooted, or the cache is flushed. In cases where erroneous information has been entered into the client cache, you can flush it by typing ipconfig /flushdns at the command prompt.

By default, all clients have a file named HOSTS that provides for a simple line-by line resolution of names to IP addresses. This file is normally located in \%systemroot%system32driversetc. Problems can occur when these manual entries conflict with DNS, and it is therefore wise to ensure that there are not conflicts with this HOSTS file and the DNS database when troubleshooting.

Using the NSLOOKUP Command-Line Utility

The NSLOOKUP command-line utility is perhaps the most useful tool for DNS client troubleshooting. Its functionality is basic, but the information that you obtain can do wonders for helping you to understand DNS problems. NSLOOKUP, in its most basic operation, contacts the default DNS server of a client and attempts to resolve a name that is input. For example, to test a lookup on www.companyabc.com, type nslookup www.companyabc.com at the command prompt. Different query types can be also input into NSLOOKUP. For example, you can create simple queries to view the MX and SOA records associated with a specific domain by following these steps, which are illustrated in Figure 13.20:

NSLOOKUP on an MX record.

Figure 13.20. NSLOOKUP on an MX record.

  1. Open a command prompt instance by choosing Start, All Programs, Accessories, Command Prompt.

  2. Type nslookup and press Enter.

  3. Type set query=mx and press Enter.

  4. Type <domainname> and press Enter.

  5. Type set query=soa and press Enter.

  6. Type <domainname> and press Enter.

NSLOOKUP’s functionality is not limited to these simple lookups. Performing an nslookup /? lists the many functions it is capable of. NSLOOKUP is a tool of choice for many name-resolution problems and is a must in any troubleshooter’s arsenal.

Using the IPCONFIG Command-Line Utility

Another important tool for DNS resolution problems is the IPCONFIG utility, the same utility used for common TCP/IP issues. There are several key functions that IPCONFIG offers in regards to DNS. These functions can be invoked from the command prompt with the right flag, detailed as follows:

  • ipconfig /flushdns—. If you experience problems with the client-side cache, the cache itself can be “flushed” through the invocation of the flushdns flag. This removes all previously cached queries that a client might be storing and is particularly useful if a server name has just changed IP addresses and particular clients have trouble connecting to it.

  • ipconfig /registerdns—. The registerdns flag forces the client to dynamically re-register itself in DNS, if the particular zone supports dynamic updates.

  • ipconfig /displaydns—. An interesting but not well-known flag is displaydns. This flag displays the contents of the client-side cache and is useful for troubleshooting specific issues with individual records.

These Three Flags

These three flags, as well as a few others, are available only in Windows 2000 or later clients. Previous clients such as NT 4.0 were limited to more basic functionality with IPCONFIG, and other clients such as Win9x clients used a different utility known as WINIPCFG. As with any utility, you can unearth more advanced functionality by invoking the utility with a ? flag (ipconfig /?).

Using the TRACERT Command-Line Utility

The TRACERT utility is a valuable resource that gives you an idea of the path that a DNS query takes when being sent over a network. By directing TRACERT at www.microsoft.com, for example, you can get an idea of how many routers and DNS servers the packet is crossing. The way that TRACERT works is simple but actually quite interesting. A DNS query that has a TTL of 1 is sent out. Because all routers are supposed to drop the TTL by 1 on each packet that they process, this means that the first router will refuse to forward the packet and send that refusal back to the originator. The originating machine then increments the TTL by 1 and resends the packet. This time the packet will make it past the first router and get refused by the second. This process continues until the destination is met, as illustrated in Figure 13.21. Needless to say, using this command-line utility is a simple yet effective way of viewing the path that a DNS query takes as it crosses the Internet.

Sample TRACERT results.

Figure 13.21. Sample TRACERT results.

Using the DNSCMD Command-Line Utility

The DNSCMD utility is essentially a command-line version of the MMC DNS console. Installed as part of the Windows Server 2003 Support tools, this utility enables you to create zones, modify records, and perform other vital administrative functions. To install the support tools, run the support tools setup from the Windows Server 2003 CD (located in the support ools directory). You can view the full functionality of this utility by typing DNSCMD /? at the command line, as illustrated in Figure 13.22.

DNSCMD command-line options.

Figure 13.22. DNSCMD command-line options.

The Dynamic Host Configuration Protocol (DHCP) In Depth

The day-to-day operations of TCP/IP can be complex because clients must be able to receive and update their network information on a regular basis to keep in step with changes to a network. Each object in a TCP/IP environment requires a unique address that defines its location and provides for a means of routing network packets from place to place. This address, the IP address, must be assigned to each client in a network, to allow the clients to communicate using TCP/IP. In the past, most IP addresses were manually distributed as new clients were added to a network. This required a large amount of administrative overhead to maintain, and often resulted in problems in configuration caused by simple typographical errors and basic human error.

An automatic method for distributing IP addresses to clients was subsequently sought because the administrative advantages of such a system were obvious. The search for such a system led to the predecessors of DHCP: RARP and BOOTP.

The DHCP Client Service

The server portion of DHCP is only half of the equation in a DHCP transaction. The request for an IP address comes from a specific interface known as the DHCP client. The client is installed with TCP/IP in Windows 2000 and higher clients and can be installed as an additional component in down-level clients.

The DHCP client, as previously mentioned, handles the communications with the DHCP Server service, in terms of handling IP requests and updates. Each iteration of the Windows client includes a different DHCP client, and there are slight variations in the functionality of each client; however, the overall function—to apply for and receive an IP address from a DHCP server—remains the same in each Windows client.

Automatic Private IP Addressing (APIPA)

The Client/Server service has been updated in Windows 2000 clients and later, enabling it to automatically assign itself an IP address if no server is available; it does so through a process called Automatic Private IP Addressing (APIPA). APIPA clients automatically assign themselves an IP address in the 169.254.0.0/16 range in this situation, which allows them to have basic TCP/IP connectivity in small networks.

APIPA might be problematic in larger networks because it forces clients to assign themselves addresses in a range that is normally not part of a local company subnet. If a DHCP server is down, clients that are attempting to renew a lease with the server will fail and automatically assign themselves an APIPA address. When the server comes back online, they will not immediately re-register themselves and will effectively be cut off from the network. Subsequently, Microsoft supplies a Registry key that will disable APIPA in this situation. The key to be created is

HKLMSYSTEMCurrentControlSetServicesTcpipParametersInterfaces<AdapterName>
Automatic Private IP Addressing (APIPA)IPAutoconfigurationEnabled:REG_DWORD=0

You can create this key by following these steps on the client:

  1. Open Registry Editor (choose Start, Run and then enter regedit).

  2. Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpip ParametersInterfaces<AdapterName> (where AdapterName is the name of the network adapter in question).

  3. Right-click on the <AdapterName> key and choose New, DWORD Value.

  4. Enter IPAutoconfigurationEnabled to rename the DWORD Value.

  5. Double-click the new value and ensure that 0 is entered as the value data.

  6. Click OK and close the Registry Editor.

APIPA

APIPA can also be effectively disabled in Windows XP clients through an alternative IP configuration, which allows for the designation of a static IP address if a DHCP is unavailable.

DHCP Relay Agents

Because DHCP clients use network broadcasts to seek out DHCP servers, it is important that this traffic is routed properly on a network with multiple subnets. Effectively, this means that there must be some type of agent to detect DHCP broadcast packets and forward them to the appropriate DHCP server, if it is located on another network. For Cisco routers, for example, this takes the form of an ip-helper entry in the router configuration that designates the destination IP address for broadcast packets to be forwarded to. If this entry is not used, a Windows server running the Routing and Remote Access service must be configured as a DHCP relay agent, as illustrated in Figure 13.23.

DHCP broadcast packet routing.

Figure 13.23. DHCP broadcast packet routing.

Include the Network Architecture Team in Any Discussions on DHCP Design

In most real-world implementations of DHCP, the routers between network segments are configured to forward client DHCP broadcast packets directly to the DHCP server. In large organizations, it is therefore important to include the network architecture team in any discussions on DHCP design.

DHCP and Dynamic DNS

Using the DNS Service in Windows Server 2003, clients can automatically register themselves in the DNS database through a mechanism called Dynamic DNS (DDNS).

DHCP in Windows Server 2003 integrates directly with DDNS to provide for automatic registration of clients into DNS. By default, all Windows 2000 or later clients will perform this function by themselves, but DHCP can be configured to allow for the Server service to update the Dynamic DNS record for the client. This option can be turned on and off at the server level, through the DHCP Manager MMC.

DHCP Changes in Windows Server 2003

As previously discussed, two improvements have been made to the functionality of DHCP in Windows Server 2003. These improvements allow for an increased level of functionality beyond the major improvements made in Windows 2000, but do not significantly change any design decisions that might have been made in Windows 2000 DHCP.

DHCP Database Backup and Restore Automation

The process of backing up all DHCP settings and restoring them onto the same (or a different) server has been streamlined in Windows Server 2003. No longer do you need to export Registry keys and manually move databases between servers to migrate DHCP because the Backup and Restore process can be accomplished directly from the MMC. The process for backing up and restoring a DHCP database is as follows:

  1. Open the DHCP Manager by choosing Start, All Programs, Administrative Tools, DHCP.

  2. Right-click the server name and choose Backup, as illustrated in Figure 13.24.

    Backing up a DHCP database.

    Figure 13.24. Backing up a DHCP database.

  3. Specify a location for the backup file and click OK. The backup files will then be saved into the location you chose.

  4. If you plan to use a new server as the destination for the restore, move the backup files and subdirectories created to the new server and run the restore procedure as outlined here.

  5. Open the DHCP Manager again by choosing Start, All Programs, Administrative Tools, DHCP.

  6. Right-click the server name and choose Restore.

  7. When you see a dialog box asking whether the service can be stopped and restarted, click Yes to continue. The service will be restarted, and the entire database and Registry will be restored.

DHCP Backup and Restore

The DHCP Backup and Restore process is extremely useful in migrating existing DHCP server configurations, scopes, and up-to-date lease information to new DHCP servers. However, because down-level (pre–Windows Server 2003) DHCP servers do not support automatic Backup and Restore, you will need to migrate from these servers by exporting and re-importing the DHCP Registry and manually moving the database files.

DHCP in the Windows XP Client

The DHCP client that is included in the Windows Server 2003 client equivalent, Windows XP, can have a static IP address assigned to clients when a DHCP server is unavailable. This static IP address takes the place of the APIPA address that would normally be configured in these cases.

This type of functionality would normally be used on mobile laptop computers that connect to different networks. When a user is at work, for example, his laptop would receive a DHCP address. When the user is at home, however, his laptop would use the backup static IP address defined in the network settings. To configure this functionality on a Windows XP client, perform the following steps:

  1. Choose Start, Control Panel.

  2. Double-click Network Connections.

  3. Right-click the adapter in question and choose Properties.

  4. Select TCP/IP and choose Properties.

  5. Select the Alternate Configuration tab.

  6. Enter the appropriate Static IP Information and click OK.

  7. Click the Close button to shut down the property page.

Installing DHCP and Creating New Scopes

DHCP installation has always been a straightforward process. In Windows Server 2003, installation has been even more streamlined through the use of the Configure Your Server Wizard. This wizard installs the DHCP Server service and automatically invokes the New Scope Wizard, which can be used to establish and configure DHCP scopes. To establish a Windows Server 2003 system as a DHCP server, follow these steps:

  1. Choose Start, All Programs, Administrative Tools, Configure Your Server Wizard.

  2. Click Next at the Welcome screen.

  3. Verify the preliminary steps and click Next to continue. A network test will be completed at this point.

  4. Select DHCP Server and click Next.

  5. Verify the options on the next screen, as illustrated in Figure 13.25, and click Next.

    Verifying options for DHCP install.

    Figure 13.25. Verifying options for DHCP install.

  6. At this point, the New Scope Wizard will be invoked and the process of configuring a scope will begin. Click Next to continue.

  7. Type a name for the scope and enter a description. The names should be descriptive, such as 10.1.1.0/24 Scope. Click Next to continue.

  8. Enter the range in which the scope will distribute IP addresses. In addition, type in a subnet mask for the subnet in question, as illustrated in Figure 13.26. Click Next to continue.

    Defining the address in the New Scope Wizard.

    Figure 13.26. Defining the address in the New Scope Wizard.

  9. Enter any exclusion ranges, if necessary. This range will identify any addresses that fall in the scope range that will not be used for the client leases. Click Next when finished.

  10. Enter a duration time for the lease. This information will indicate how often clients must renew their DHCP leases. Click Next to continue.

  11. At the next screen, you can add DHCP options to the scope. In this example, configure a gateway, a WINS server, and a DNS server as options for the scope, so choose Yes, I Want to Configure These Options Now and click Next.

  12. Enter the IP address of the default gateway to be used on this subnet and click Next.

  13. Enter the necessary information into the DNS server information fields and click Next when finished.

  14. Enter the WINS server information on the next screen and click Next when finished.

  15. Select whether the scope will be activated immediately or later. In this case, because the server has not been authorized, choose to activate later. After the change, click Next to continue.

  16. Click Finish to close the wizard.

  17. The Configure Your Server Wizard then indicates that the server has successfully become a DHCP server, as indicated in Figure 13.27. Click Finish to close the wizard.

    Completion of the Configure Your Server Wizard for DHCP.

    Figure 13.27. Completion of the Configure Your Server Wizard for DHCP.

DHCP Can Potentially “Steal” Valid Clients

Because DHCP can potentially “steal” valid clients from a production network, it is recommended that all tests using DHCP be conducted in a lab environment. In addition, testing in production will be difficult because the Authorization component of DHCP will also make it impossible to enable scopes on a Windows Server 2003 DHCP server, as described in the “DHCP Authorization” section later in this chapter.

Creating DHCP Redundancy

The importance of DHCP cannot be understated. Downtime for DHCP translates into hordes of angry users who can no longer access the network. Consequently, it is extremely important to build redundancy into the DHCP environment and provide for disaster recovery procedures in the event of total DHCP failure.

Unfortunately, the DHCP service has no method of dynamically working in tandem with another DHCP server to synchronize client leases and scope information. However, using a few tricks, you can configure a failover DHCP environment that will provide for redundancy in the case of server failure or outage. Three specific options will provide for redundancy, and the pros and cons of each should be matched to the requirements of your organization.

The 50/50 Failover Approach for DHCP Fault Tolerance

The 50/50 failover approach effectively uses two DHCP servers that each handle an equal amount of client traffic on a subnet. Each DHCP server is configured with similar scopes, but each must have a different IP range to avoid IP addressing conflicts.

Figure 13.28 illustrates the 50/50 failover approach. As indicated in the diagram, the network has 200 clients defined by 192.168.1.0/24. Each DHCP server contains a scope to cover the entire specific client subnet. Server1’s scope is configured with exclusions for all IPs except for the range of 192.168.1.1–192.168.1.125. Server2’s scope is configured with exclusions for the first half and a client lease range of 192.168.1.126–192.168.1.254.

The 50/50 failover approach.

Figure 13.28. The 50/50 failover approach.

Upon requesting a client IP address, the first server to respond to a request will be accepted, thus roughly balancing the load between the two servers.

The advantage to this approach is that a degree of redundancy is built into the DHCP environment without the need for extra IP address ranges reserved for clients. However, several caveats must be considered before implementing this approach.

First and foremost, it is theoretically possible that one server is located closer to the majority of the clients, and therefore more clients would be directed to that particular server. This could theoretically cause the DHCP server to run out of client leases, making it ineffectual for redundancy. For this reason, it is preferable to consider other methods of failover for DHCP, if available.

Another important consideration whenever configuring DHCP servers in this method is that an exclusion range must be established for the range that exists on the other server so that when a client from the other server attempts to renew the lease, it is not refused a new lease. This situation could potentially occur if the exclusion is not established because the client and server would have trouble negotiating if the client was using an IP address out of the range that exists in the scope. Consequently, if the range exists, but an exclusion is established, the server will simply assign a new address in the backup range.

The 80/20 Failover Approach to DHCP Fault Tolerance

The 80/20 failover approach is similar to the 50/50 approach, except that the effective scope range on the server designated as the backup DHCP server contains only 20% of the available client IP range. In most cases, this server that holds 20% would be located across the network on a remote subnet, so it would not primarily be responsible for client leases. The server with 80% of the range would be physically located closer to the actual server, thus accepting the majority of the clients by responding to their requests faster, as illustrated in Figure 13.29.

The 80/20 failover approach.

Figure 13.29. The 80/20 failover approach.

In the event of Server1’s failure, Server2 would respond to client requests until Server1 could be re-established in the network.

The downside to this approach is that if Server1 is down for too long of a period of time, it would eventually run out of potential leases for clients, and client renewal would fail. It is therefore important to establish a disaster recovery plan for the server with 80% of the scopes so that downtime is minimized.

Just as with the 50/50 approach, it is important to establish exclusion ranges for the other DHCP server’s range, as described in the previous sections.

The 100/100 Failover Approach to DHCP Fault Tolerance

The 100/100 failover approach in Windows Server 2003 DHCP is the most effective means of achieving high availability out of a DHCP environment. However, several big “gotchas” must be worked out before this type of redundancy can be implemented.

The 100/100 failover approach in its simplest form consists of two servers running DHCP, with each servicing the same subnets in an organization. The scopes on each server, however, contain different, equivalent size ranges for clients that are each large enough to handle all clients in a specific subnet.

In Figure 13.30, the 10.2.0.0/16 subnet has a total of 750 clients. This subnet is serviced by two DHCP servers, each of which has a scope for the subnet. Each server has a scope with addresses from 10.2.1.1 through 10.2.8.254. The scope on Server1 excludes all IP addresses except those in the range of 10.2.1.1 through 10.2.4.254. The scope on Server2 excludes all IP addresses except those in the range from 10.2.5.1 through 10.2.8.254. Each effective range is subsequently large enough to handle 1,000 clients, more than enough for every machine on the network.

The 100/100 failover approach.

Figure 13.30. The 100/100 failover approach.

If one of the DHCP servers experiences an interruption in service, and it no longer responds, the second server will take over, responding to clients and allowing them to change their IP addresses to the IPs available in the separate range.

The advantages to this design are obvious. In the event of a single server failure, the second server will immediately issue new IP addresses for clients that previously used the failed server. Because both servers run constantly, the failover is instantaneous. In addition, the failed DHCP server could theoretically remain out of service for the entire lease duration because the second server will be able to pick up all the slack from the failed server.

The main caveat to this approach is that a large number of IP addresses must be available for clients, more than twice the number that would normally be available. This might prove difficult, if not impossible, in many networks that have a limited IP range to work with. However, in organizations with a larger IP range, such as those offered by private network configurations (10.x.x.x and so on), this type of configuration is ideal.

You must ensure that both ranges include the scopes from the other servers, to prevent the types of problems described in the preceding examples.

Standby Scopes Approach

A Standby DHCP server is simply a server with DHCP installed, configured with scopes, but not turned on. The scopes must be configured in different ranges, as in the previous examples, but they normally lie dormant until they are needed. The advantage to this approach lies in the fact that the DHCP service can be installed on a server that will not normally be using additional resources for DHCP. If there is a problem, you simply need to activate the dormant scopes. An automated tool or script can be used to perform this function, if desired.

Clustering DHCP Servers

The final redundancy option with DHCP is to deploy a clustered server set to run DHCP. In this option, if a single server goes down, the second server in a cluster will take over DHCP operations. This option requires a greater investment in hardware and should be considered only in specific cases in which it is necessary.

Advanced DHCP Concepts

DHCP has been an unassuming network service as of late. The simplicity of the protocol is another reason for its success because it is not cursed by a high degree of administrative complexity. However, greater control over a DHCP environment can be achieved through the understanding of some advanced concepts regarding its use. Some of these concepts are new to Windows Server 2003, and some were introduced in Windows 2000. These improvements can help you to gain control over a DHCP environment, and provide for more security and ease of use.

DHCP Superscopes

A DHCP Superscope is used for environments in which multiple network subnets encompass a single scope environment. In these cases, a Superscope can be created to contain multiple scopes. The individual scopes are subsequently dependent on the master Superscope. If it is turned off, they will also be deactivated. Figure 13.31 illustrates a sample DHCP Superscope.

A DHCP Superscope.

Figure 13.31. A DHCP Superscope.

DHCP Multicast Scopes

A Multicast scope is created to allow clients to be assigned multicast IP addresses. A multicast IP address is one in which destination hosts can each have the same IP address, which is useful in one-to-many forms of communications such as Webcasts and videoconferencing sessions.

DHCP Administrative Delegation

It is never wise to hand over full administrative privileges to individuals who need to perform only a specific network function. If a small group of administrators needs control over the DHCP environment, Windows Server 2003 makes it easy to delegate administrative capabilities to them through the inclusion of a group called DHCP Administrators. Adding users or, preferably, groups to this Security Group will enable those users to administer the DHCP servers in an environment.

Netsh Command-Line Utility

Windows Server 2003 has made great strides in allowing virtually all administrative functions to be performed through the command line. This not only helps those users who are used to command-line administration, such as that in Unix operating systems, but also allows for the execution of scripts and batch files, which can automate administrative processes.

The Netsh command-line utility is one such utility that effectively enables you to accomplish virtually all DHCP tasks that can be run through the MMC GUI interface. For a full listing of potential functions with Netsh, run netsh /? from the command line, as illustrated in Figure 13.32.

Netsh command-line options.

Figure 13.32. Netsh command-line options.

Optimizing DHCP Through Proper Maintenance

The DHCP database is stored in the dhcp.mdb file, located in \%systemroot%system32dhcp. This database is structured using Microsoft JET database technology, the same technology used for Exchange Server, Active Directory, and many other databases in the Microsoft world.

As any administrator who has worked with JET databases will attest, frequent maintenance of the DHCP database is required to keep it functioning properly and to groom it for defragmentation and recovery of whitespace. By default, DHCP is configured to perform online maintenance to the database, but only during intervals in which it is not being used for client requests. For busy, large DHCP servers, there might never be downtime, so it is therefore important to run offline maintenance against the dhcp.mdb file on a quarterly to semi-annual basis.

You can run maintenance against the dhcp.mdb DHCP database file by using the jetpack utility in Windows Server 2003. From the command line, enter the following commands, illustrated in Figure 13.33, to stop the DHCP Server service, compact the database, and restart the service:

DHCP database maintenance.

Figure 13.33. DHCP database maintenance.

  • cd %systemroot%system32dhcp

  • net stop dhcpserver

  • jetpack dhcp.mdb tmp.mdb

  • net start dhcpserver

Securing a DHCP Implementation

The DHCP protocol is effectively insecure. There is no way to determine whether a request from a client is legitimate or is malicious. Users who have evil intentions can conduct denial-of-service attacks against the DHCP server by simply requesting all available IP addresses in a range, effectively disallowing legitimate users from being granted IP addresses. For this and other reasons, it is important to keep wire security as a high priority. Although this point might seem obvious, keeping potential intruders physically off a network is a must, not only for DHCP but also for other network services prone to denial-of-service attacks. This includes auditing the security of wireless networks, such as 802.11b, which can (and often do) provide unrestricted access to malicious users.

In addition to physical and wire security, you should examine several security considerations and mechanisms, to provide for a better understanding of the vulnerabilities and capabilities of DHCP.

DHCP Authorization

DHCP in and of itself is an unauthenticated service, which means that anyone can establish a DHCP server on a network and start to accept clients and assign them erroneous addresses or redirect them for malicious purposes. Consequently, since Windows 2000, it has become necessary to authorize a DHCP server that is running in an Active Directory domain. After the DHCP server is authorized by the proper domain administrative authority, that server can then accept client leases.

The downside to this approach is that a Windows NT 4.0 server could still be added, unauthenticated, to a network. In this situation, it would become necessary to pull out a network analyzer to determine the location of rogue DHCP servers.

Authorization of a Windows Server 2003 DHCP server is straightforward and can be accomplished by following these steps:

  1. Open the DHCP Manager by choosing Start, All Programs, Administrative Tools, DHCP.

  2. Right-click the server name and choose Authorize, as illustrated in Figure 13.34.

    Authorizing a DHCP server.

    Figure 13.34. Authorizing a DHCP server.

  3. In a few minutes, the DHCP should be authorized, and the scopes can be activated.

DHCP and Domain Controller Security

If at all possible, the DHCP service should not be run on an Active Directory domain controller because the security of the SRV records generated is diminished. The reasons for this are as follows.

DNS entries in an Active Directory–integrated DNS zone are secure, which means that only the client that originally created the record can subsequently update that same record. This can cause problems with the DHCP server automatically updating client records, however, because the client no longer performs this function and cannot have security applied to a record.

DHCP in Windows Server 2003 overcomes this limitation by placing all DHCP servers in a special group in Active Directory, called DNSUpdateProxy. Members of this group do not have any security applied to objects that they create in the DNS database. The theory is that the first client to “touch” the record will then take over security for that record.

The problem with this concept is that the records created by DHCP servers possess no immediate security and are consequently subject to takeover by hostile clients. Because domain controllers are responsible for publishing SRV DNS records, which indicate the location of domain controllers, Kerberos servers, and the like, this leaves a gaping security hole that users could exploit. Consequently, it is preferable to keep DHCP off domain controllers. If this cannot be avoided, it is recommended that you not place the DHCP server into the DNSUpdateProxy group to avoid the security problems associated with it.

Continuing Usage of Windows Internet Naming Service (WINS)

The Windows Internet Naming Service (WINS) has a long history in Microsoft networks. Because early Microsoft networks were primarily broadcast-based using protocols such as NetBEUI to identify local computers, and there is a need to maintain backwards compatibility for earlier operating systems, Microsoft continues to support WINS.

Legacy Microsoft NetBIOS Resolution

WINS is effectively a simple database of NetBIOS names and their corresponding IP addresses. Some additional information, such as domain name, server type, and so on, can be determined as well, from the 16th byte in a NetBIOS name stored in WINS.

WINS is considered legacy in the Microsoft world because NetBIOS resolution is being phased out in favor of the domain name system (DNS) form of name resolution. However, it is difficult to divorce WINS from modern networks because of the reliance on WINS by down-level (pre-Windows 2000) clients, legacy applications, and even some Microsoft services such as DFS that use WINS by default. Consequently, you might need to keep using WINS in Windows networks, unless you can definitively prove that it is no longer necessary.

Integrating WINS and DNS

DNS can use the WINS database to provide for quasi-DNS resolution of WINS clients. This means that if a request is sent to a DNS server to resolve client1.companyabc.com, for example, it is possible for that DNS server to use the WINS database to resolve requests for any zones where the WINS forward lookup is configured. If Client1 does not exist in the DNS database but exists in the WINS database instead, the DNS server will return the IP address that it obtained from WINS and attach the companyabc.com suffix to the record, as illustrated in Figure 13.35.

WINS integration with DNS.

Figure 13.35. WINS integration with DNS.

This functionality must be enabled on the DNS server because it is not configured by default. To enable WINS resolution on a DNS server, follow these steps:

  1. On a server running DNS, open the DNS MMC snap-in by choosing Start, Administrative Tools, DNS.

  2. Navigate to DNS<Servername>Forward Lookup Zones.

  3. Right-click the zone in question and choose Properties.

  4. Choose the WINS tab.

  5. Check the Use WINS Forward Lookup box.

  6. Enter the IP address of the WINS server(s) and click OK to save the changes, as illustrated in Figure 13.36.

    Configuring WINS resolution in DNS.

    Figure 13.36. Configuring WINS resolution in DNS.

Changes in Windows Server 2003 WINS

Although =the overall function of WINS has not changed significantly in Windows Server 2003, some additions to the management tools allow for increased functionality and capabilities:

  • Advanced search capabilities for WINS databases. Previous implementations of WINS had simplistic search capabilities that were limited to simple keyword searches of NetBIOS records in the database. The search engine for WINS has been updated in Windows Server 2003 to support more advanced search parameters, thus giving administrators more flexibility in searching for specific records.

  • WINS pull record filtering and replication partner acceptance. Instead of entire transfers of all records on other servers, replication can be limited to only those records owned by a specific server, thus excluding extraneous records from littering a WINS database.

In addition to these advances in Windows Server 2003, Windows 2000 introduced enhancements to WINS, such as an updated database engine, persistent connections, manual tombstoning, and other improvements.

Installing and Configuring WINS

As with many services in Windows Server 2003, the installation and configuration process of a WINS server is streamlined through the Configure Your Server Wizard. This wizard automatically installs all necessary services and databases and configures other settings pertinent to a particular service. Although other methods of installation still exist, this method is the preferred approach in Windows Server 2003.

WINS Installation

To install WINS on a server using the Configure Your Server Wizard, follow these steps:

  1. Choose Start, All Programs, Administrative Tools, Configure Your Server Wizard.

  2. Click Next at the Welcome screen.

  3. Verify the preliminary steps and click Next to continue. A network test will then be performed.

  4. Select WINS Server from the list of Server Roles and click Next to continue.

  5. On the Summary page, click Next to continue.

  6. If you are prompted for the Windows Server 2003 Media, insert it and click Next to continue.

  7. Click Finish on the final wizard page to finish setup, as illustrated in Figure 13.37.

    WINS server installation.

    Figure 13.37. WINS server installation.

Configuring Push/Pull Partners

If a WINS server in an environment is the sole WINS server for that network, no additional configuration is required other than ensuring that clients will be pointing to the WINS server in their IP configuration. However, if additional WINS servers are established in an environment, exchanging database information between the multiple servers will become necessary. You establish this type of replication topology through the designation of push/pull partners.

A push partner for a particular WINS server is another WINS server that serves as the destination for WINS changes to be “pushed” to. A pull partner is a WINS server from which changes are “pulled.” In a nutshell, if Server1 has Server2 configured as a push partner, Server2 must have Server1 configured as a pull partner, and vice versa.

A WINS push/pull topology should roughly map to an organization’s network topology. For example, if an organization is composed of two main offices that serve as network hubs, and several branch offices, each with its own WINS servers, the WINS push/pull topology could look something like Figure 13.38.

Sample WINS push/pull topology.

Figure 13.38. Sample WINS push/pull topology.

WINS Replication

WINS replicates database changes on a set schedule, which can be modified on a per connection basis. Just as with any network communications, the replication schedule should be modified to fit the particular needs of an organization. If a WAN link is saturated with traffic, it might be wise to throttle back the WINS replication schedule. However, if a link between push/pull partners is robust, a shorter schedule can be established. To change the default schedule of 30 minutes, follow these steps:

  1. Open the WINS Manager by choosing Start, All Programs, Administrative Tools, WINS.

  2. Choose the Replication Partners folder.

  3. Right-click Push/Pull Partner and choose Properties.

  4. Change the Replication interval time to the desired length, as indicated in Figure 13.39, and click OK to save the settings.

    WINS replication settings.

    Figure 13.39. WINS replication settings.

The page shown in Figure 13.39 can also be used to change other push/pull partner settings, such as replication partner types, persistent connections, and other pertinent replication information.

NetBIOS Client Resolution and the LMHOSTS File

A Windows client does not immediately resort to a WINS server to determine the IP address of a NetBIOS name. This knowledge is essential in the troubleshooting of name resolution on a Windows client. Instead, a client first contacts a local NetBIOS cache for resolution. If an IP address changes, this cache might report the old address, impeding troubleshooting. To flush this cache, run nbtstat -R (with uppercase R) at the command line.

In addition to the local cache, clients always parse an LMHOSTS file, if one exists, before contacting a WINS server. If the LMHOSTS file contains erroneous information, it will impede proper name resolution. Always check to see whether this file is populated (it is usually located in \%systemroot%winntsystem32driversetc on clients) before beginning to troubleshoot the WINS server.

WINS Planning, Migrating, and Maintenance

As previously mentioned, WINS is necessary in most production environments because the overriding dependencies on NetBIOS that were built into Windows have not entirely been shaken out. In fresh installations of Windows Server 2003, you do not need to install WINS, but for older, upgraded environments, you should still plan on WINS being around for a few years.

Now that you have this knowledge, you can properly design an upgraded Windows Server 2003 environment.

Designing a WINS Environment

There are two key factors to consider when designing a WINS environment. The first factor is accessibility. Having a local, fast connection to a WINS server will aid in the processing of client requests. Because WINS has low overhead for servers, it is consequently a good idea to include at least one WINS server in all locations with more than 5–10 users. In smaller environments, WINS can be installed as part of a local file server whereas in larger environments, dedicated multiple utility servers running WINS are recommended.

The replication topology you establish should normally follow the lines of a network infrastructure, as previously mentioned. If a network uses a hub and spoke design, WINS should follow the same basic topology.

Upgrading a WINS Environment

The WINS service itself is one of the more straightforward services to migrate to a separate set of servers as part of an upgrade to Windows Server 2003. A simple upgrade of the existing WINS server will do the trick for many environments; however, migrating to a separate server or set of servers might be beneficial if you’re changing topology or hardware.

Migration of an existing WINS environment is most easily accomplished through the procedure described in this section. This procedure allows for the migration of an entire WINS database to a new set of servers, but without affecting any clients or changing WINS server settings. Figure 13.40 illustrates a WINS migration using this procedure.

WINS migration procedure, step 1.

Figure 13.40. WINS migration procedure, step 1.

In Figure 13.40, the existing servers, OldServer1 and OldServer2, handle WINS traffic for the entire network of fictional CompanyABC. They are configured with IP addresses 10.1.1.11 and 10.1.1.12, which are configured in all clients’ IP settings as Primary and Secondary WINS, respectively. OldServer1 and OldServer2 are configured as push/pull partners.

The new servers, NewServer1 and NewServer2, are added to the network with the WINS service installed and configured as push/pull partners for each other. Their initial IP addresses are 10.1.1.21 and 10.1.1.22. OldServer1 and NewServer1 are then connected as push/pull partners for the network. Because the servers are connected this way, all database information from the old WINS database is replicated to the new servers, as illustrated in step 1 shown in Figure 13.40.

After the entire WINS database is replicated to the new servers, the old servers are shut down (on a weekend or evening to minimize impact), and NewServer1 and NewServer2 are immediately reconfigured to take the IP addresses of the old servers, as illustrated in step 2 shown in Figure 13.41.

WINS migration procedure, step 2.

Figure 13.41. WINS migration procedure, step 2.

The push/pull partner relationship between NewServer1 and NewServer2 is then re-established because the IP addresses of the servers changed. The entire downtime of the WINS environment can be measured in mere minutes, and the old database is migrated intact. In addition, because the new servers assume the old IP addresses, no client settings need to be reconfigured.

There are a few caveats with this approach, however. If the IP addresses cannot be changed, WINS servers must be changed on the client side. If you’re using DHCP, you can do this by leaving all old and new servers up in an environment until the WINS change can be automatically updated through DHCP. Effectively, however, WINS migrations can be made very straightforward through this technique, and they can be modified to fit any WINS topology.

WINS Database Maintenance

Just like the DHCP database, the WINS database is based on the Microsoft JET database technology and is consequently subject to the need for regular maintenance. Scheduling maintenance for each WINS database is recommended on a quarterly or semi-annual basis. The WINS database file, wins.mdb, is stored in the \%systemroot%system32wins directory. You can run maintenance against the database by entering the following commands at the command line:

  • cd %systemroot%system32wins

  • net stop wins

  • jetpack wins.mdb tmp.mdb

  • net start wins

Global Catalog Domain Controllers (GC/DCs) Placement

The placement of domain controllers in Windows Server 2003 is the critical factor to improve the communication response time from an Active Directory query. Without prompt response from a domain controller, a user might have to wait several seconds to several minutes to merely log on to the network, or it could take a similar length of time to even view the list of e-mail recipients the user wants to send a message to.

This section deals with specific server placement issues for Active Directory domain controllers and global catalog servers.

The Active Directory Global Catalog

The global catalog in Active Directory is an index of all objects in an Active Directory forest. All domain controllers in Windows Server 2003’s Active Directory are not by default global catalog servers, so they must be established as such through the following procedure:

  1. Open Active Directory Sites and Services.

  2. Navigate to Sites<SiteName>Servers<ServerName>.

  3. Right-click NTDS Settings and select Properties.

  4. Check the Global Catalog box, as indicated in Figure 13.42.

    Making a domain controller into a global catalog server.

    Figure 13.42. Making a domain controller into a global catalog server.

The Need to Strategically Place GCs and DCs

It is important to understand that global catalog objects must be physically located close to all objects in a network that require prompt login times and fast connectivity. Because a global catalog entry is parsed for universal group membership every time a user logs in, this effectively means that this information must be close at hand. This can be accomplished by placing GC/DCs on the same WAN site or by using a process new to Windows Server 2003 called universal group caching.

Universal Group Caching

Universal group caching is a process by which an Active Directory site caches all universal group membership locally so that the next time clients log in, information is more quickly provided to the clients and they are able to log in faster.

Universal group caching is more effective than placing a GC/DC server locally because only those universal groups that are relevant to a local site’s members are replicated and are cached on the local domain controller. The downside to this approach, however, is that the first login for clients will still be longer than if a local GC/DC were provided, and the cache eventually expires, requiring another sync with a GC/DC.

You can set up universal group caching on a site level as follows:

  1. Open Active Directory Sites and Services.

  2. Navigate to Sites<Site Name>.

  3. In the right-hand pane, right-click NTDS Site Settings and choose Properties.

  4. Check the Enable Universal Group Membership Caching box, as illustrated in Figure 13.43.

    Enabling universal group caching.

    Figure 13.43. Enabling universal group caching.

Global Catalog/Domain Controller Placement

As you learned in the preceding sections, you must make decisions regarding the most efficient placement of DCs and GC/DCs in an environment. Decisions on placement of GC/DCs and universal group caching sites must be made with an eye toward determining how important fast logins are for users in a site compared to higher replication throughput. However, for many Windows Server 2003 environments, the following rules apply:

  • Sites with fewer than 50 users—Use a single DC configured with universal group caching

  • Sites with 50–100 users—Use two DCs configured for universal group caching

  • Sites with 100–200 users—Use a single GC server and single DC server

  • Sites with 200+ users—Alternate adding additional DCs and GC/DCs for every 100 users

The recommendations listed here are generalized and should not be construed as relevant to every environment. However, these general guidelines should help you to size an Active Directory environment for domain controller placement.

Summary

Although often overlooked, the services of DNS, DHCP, and WINS are some of the most critical components of a functional Windows Server 2003 environment. In addition, global catalog domain controller placement and related issues are integral to the functionality of an Active Directory environment. Consequently, it is important to properly plan, implement, and support the infrastructure environment to ensure high availability, reliability, and resilience that is expected of the foundation for the network infrastructure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset