新进化论

道生一,一生二,二生三,三生万物。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Active Directory Replication

As mentioned in an earlier section, the Active Directory database is replicated between domain controllers. The data replicated between controllers called "data" are also called "naming context". Only the changes are replicated, once a domain controller has been established. Active Directory uses a multimaster model which means changes can be made on any controller and the changes are sent to all other controllers. The replication path in Active Directory forms a ring which adds reliability to the replication.

How Replication is Tracked

  • USN - Each object has an Update Sequence Number (USN), and if the object is modified, the USN is incremented. This number is different on each domain controller.
  • Stamps - Each object has a stamp with the version number, timestamp, and the GUID of the domain controller where the change was made

Domain controllers each contain a "replica" which is a copy of the domain directory. The "directory update type" indicates how the data is replicated. The two types are:

  • Origination update - A change made by an administrator at the local domain controller.
  • Replicated update - A change made to the replica because of a replication from a replication partner.

Replication Sequence

Terms:

  • Latency - The required time for all updates to be completed throughout all comain controllers on the network domain or forest.
  • Convergence - The state at which all domain controllers have the same replica contents of the Active directory database.
  • Loose consistency - The state at which all changes to the database are not yet replicated throughout all controllers in the database (not converged).
  1. A change is made to the Active Directory database on a domain controller. The attribute of the object and the new USN is written to the database. The entire object is NOT replicated. This is called an atomic operation becuase both changes are done, or neither change is done. This is an origination update. There are four types:
    • Add - An object is added to the database.
    • Delete - An object is deleted from the database.
    • Modify - An object in the database has its attributes modified.
    • Modify DN - An object is renamed or moved to another domain.
  2. The controller the change was made on (after five minutes of stablilty), notifies its replication partners that a change was made. It sends a change notification to these partners, but only notifies one partner every 30 seconds so it is not overwhelmed with update requests. Each controller, in turn, when it is updated, sends a change notice to its respective replication partners.
  3. The replication partners each send an update request with a USN to the domain controller that the change was made on. The USN identifies the current state of the domain controller making the change. Each change has a unique USN. This way the domain controller that has the change knows the state of the domain controller requesting the changes and only the changes are required to be sent. The time on each controller, therefore, does not need to be synchronized exactly although timestamps are used to break ties regarding changes.
  4. Changes are made through replication partners until all partners are replicated. At some point, replication partners will attempt to replicate partners that are already updated. This is where propagation dampening is used.

If no changes have been performed in six hours, replication procedures are performed to be sure no information has been missed.

Information sent during an update includes:

  • Updated object
  • The GUID and USN of the domain server with the originating update.
  • A local USN of the update on the updated object.

Replication Path

The replication path that domain controller Active Directory replicated data travels through an enterprise is called the replication topology. Connection objects are used to define the replication paths between domain controllers. Active Directory, by default, sets up a two way ring replication path. The data can travel in both directions around the ring which provides redundancy and reliability. Two types of replication occur in the path:

  • Direct replication - When replication is done from a primary source of data.
  • Transitive replication - When replication is done from a secondhand or replicated source of data.

The Knowledge Consistency Checker (KCC) (running on all domain controllers) generates the replication topology by specifying what domain controllers will replicate to which other domain controllers in the site. The KCC maintains a list of connections, called a replication topology, to other domain controllers in the site. The KCC ensures that changes to any object are replicated to all site domain controllers and updates go through no more than three connections. Also an administrator can configure connection objects.

The KCC uses information provided by the administrator about sites and subnets to automatically build the Active Directory replication topology.

Propagation Dampening

Terms:

  • Propagation dampening is used to prevent unnecessary replication by preventing updates from being sent to servers that are already updated. Each domain controller keeps a list of other known domain controllers and the last USN received from each controller. Two up-to-date vector numbers support this:
    • Replica GUID
    • Update Sequence Number (USN) - Mentioned earlier it is incremented anytime an origination or replicated update is received. The USN stored is from the originating server. It is stored as metadata with:
      • An attribute indicating "added" or "changed" for the object being updated.
      • The GUID (above).
      • A local USN for the object attribute changed.
      • The changed data.
      The up-to-date vector numbers are incremented when replication occurs with the originating server. Each domain controller has its own different USN (They may not start at the same number). The highest USN from each domain controller that is stored in other domain controllers is called the high watermark for that domain controller.
  • Propagation delay describes the amount of time required for a change to be replicated to domain controllers throughout the domain.
  • Ring Topology - The Active Directory replication process uses a ring topology where the replication partners form a ring. This adds reliability to the process and also helps decrease propagation delay.

The information sent in an update request includes the high water mark entry for the originating server for the last change received. If the highwater mark received from the server that sent the update request is the same as the highwatermark for the originating server on the server receiving the request, the receiving server will not send the replicated information.

The usnChanged parameter is the highest USN number for any object.

Replication Partitions

Types of Active Directory data storage categories which are called partitions:

  • Schema partition - Defines rules for object creation and modification for all objects in the forest. Replicated to all domain controllers in the forest. Replicated to all domain controllers in the forest, it is known as an enterprise partition.
  • Configuration partition - Information about the forest directory structure is defined including trees, domains, domain trust relationships, and sites (TCP/IP subnet group). Replicated to all domain controllers in the forest, it is known as an enterprise partition.
  • Domain partition - Has complete information about all domain objects (Objects that are part of the domain including OUs, groups, users and others). Replicated only to domain controllers in the same domain.
    • Partial domain directory partition - Has a list of all objects in the directory with a partial list of attributes for each object.

These partitions are all replicated between domain controllers by Active directory. Different partitions may be replicated between different replication partners.

Replication Conflict

Replication conflict occurs when changes are made to the same object and attribute before the changes can be replicated throughout all domain controller's copies of the database. Additional data (metadata) stored for each object attribute includes (not related to USN):

  • Time stamp of the last change.
  • Attribute version number - For each object's attributes, this value is the same on all domain controllers.

When an Active Directory database update is received on a domain controller, one of the following happens:

  • If the update attribute version number is higher than the current version number on the controller, the new value of the attribute is stored and the version number is updated.
  • If the update attribute version number and stored attribute version number are the same, timestamps are used to resolve the conflict.
  • If the both version numbers and both timestamps are the same, the update from the controller with the highest GUID is used.

File Replication Service

In Windows 2000, the SYSVOL share is used to to authenticate users. The SYSVOL share includes group policy information which is replicated to all local domain controllers. File replication service (FRS) is used to replicate the SYSVOL share. The "Active Directory Users and Computers" tool is used to change the file replication service schedule.

Intrasite Replication

Replication that happens between controllers inside one site. All of the subnets inside the site should be connected by high speed network wires. Replication between two sites may need to be sent over a slower WAN link or leased line. Intrasite replication data is sent uncompressed.

Site replication is done using Remote Procedure Call (RPC). If a change is made, replication occurs within five minutes, and replication is done every six hours if no changes were made. Domain controllers that receive updates replicate that information to other domain controllers on their route list. All changes are therefore completed within a site within 15 minutes since there can only be three hops.

 

The topology used here is the ring topology talked about earlier and this replication is automatically set up by Active Directory, but may be modified by an administrator.

DNS Replication

The DNS IP address and computer name is stored in Active Directory for Active Directory integrated DNS zones and replicated to all local domain controllers. DNS information is not replicated to domain controllers outside the domain.

Intersite Replication

Intrasite replication is replication between sites and must be set up by an administrator.

Replication Management

The administrative tool, "Active Directory Sites and Services", is used to manage Active Directory replication. Replication data is compressed before being sent to minimze bandwidth use. There are two protocols used to replicate AD:

  • Normally Remote Procedure Call (RPC) is used to replicate data and is always used for intrasite replication since it is required to support the FRS. RPC depends on IP (internet protocol) for transport.
  • Simple Mail Transfer Protocol (SMTP) may be used for replication between sites.

SMTP can't replicate the domain partition, however. Therefore the remote site would need to be in another domain to be able to effectively use SMTP for carrying replication data.

Bridgehead server - A domain controller that is used to send replication information to one or more other sites.

Flexible Single Master Operations (FSMO) (discussed in an earlier section) can be transferred manually to various domain controllers. Roles and tools used to transfer are:

  • Schema Master - Use "Active Directory Domains and Trusts". Makes changes to the database schema. Applications may remotely connect to the schema master.
  • Domain Naming Master - Use the MMC "Active Directory Schema Snap-in". Adds or removes domains to or from the forest.
  • Primary Domain Controller (PDC) Emulator - Use the "Active Directory Users and Computers" administrative tool. When Active Directory is in mixed mode, the computer Active Directory is on acts as a Windows NT PDC. Mixed mode occurs when Active Directory interfaces with NT 4.0 BDCs or ones without Windows 2000 Directory Service client software. In mixed mode, computers without Windows 2000 client software must contact the PDC emulator to change user account information.
  • Relative ID Master (RID Master) - Use the "Active Directory Users and Computers" administrative tool. All objects have a Security Identifier (SID) and a domain SID. The RID assigns relative IDs to each domain controller.
  • Infrastructure Master - Use the "Active Directory Users and Computers" administrative tool. Updates group membership information when users from other domains are moved or renamed.

Any master role can be transferred by using the command line program, ntdsutil.exe. When a server performing a master role fails and goes offline, you can perform "seizing master operations" to have another server perform that role. Only the ntdsutil.exe program can perform this function. Commands include:

  • connections - A connections prompt appears:
    • connect to server "FQDN of server to connect to"
    • quit
  • sieze "name of role to transfer". Role names are:
    • PDC
    • RID master
    • schema master
    • domain naming master
    • infastructure master
    Example: "sieze RID master"

Replication Associated Performance Monitor Counters

  • DRA Inbound Bytes Not Compressed - Replicated uncompressed bytes that are probably from a Directory Services Agent (another controller sending data) in the same site.
  • DRA Inbound Bytes Compressed (Before Compression) - Replicated bytes received (as though in uncompressed form).
  • DRA Inbound Bytes Not Compressed (After Compression) - Replicated bytes received (as in compressed form).
  • DRA Inbound Bytes Total The sum of the DRA Inbound Bytes Not Compressed plus the DRA Inbound Bytes Not Compressed (After Compression).
  • DRA Outbound Bytes Not Compressed - Replicated uncompressed bytes that are being sent to another domain controller in the same site.

Schema Cache

A schema cache which is a copy of the schema in memory can be used to speed up schema queries but should be used sparingly due to the high memory requirements. If the schemaUpdateNow attribute is added to the RootDSE a schema cache update is done immediately. Normally the schema cache is stored in memory when the system boots and updated every five minutes.

posted on 2010-01-21 14:58  岌岌可危  阅读(290)  评论(0编辑  收藏  举报