Learn › Windows Server

Active Directory Replication Explained: Sites, KCC, USNs and repadmin

How AD replication works inside and between sites – partitions, USNs, KCC, bridgeheads and site links – and how to check and fix it with repadmin.

Advanced 14 min read
By Gopinath Karthikeyan

Active Directory is multi-master: you can change a user on any domain controller, and the change reaches all the others. Replication is what makes that work – and when it breaks, you get users who exist on one DC but not another, passwords that work “sometimes”, and Group Policy that behaves differently per site.

What gets replicated

AD data is split into partitions (naming contexts), each replicated to a different set of DCs:

Partition Contains Replicates to
Schema Object and attribute definitions Every DC in the forest
Configuration Sites, subnets, services Every DC in the forest
Domain Users, groups, computers, OUs Every DC in that domain (a partial copy goes to global catalogs)
Application e.g. DomainDnsZones, ForestDnsZones The DCs you choose (DNS servers)

SYSVOL (GPO files and scripts) is replicated separately, by DFS Replication – so a GPO can be fine in AD but broken in SYSVOL.

How DCs know what’s new

  • Every change on a DC gets an increasing Update Sequence Number (USN).
  • Each DC remembers, per partner, the highest USN it has already received (the high-watermark), so it only asks for newer changes.
  • An up-to-dateness vector stops the same change arriving twice through different paths.
  • If two DCs change the same attribute at the same time, the conflict is decided by version number, then timestamp, then DC GUID. Last writer wins, per attribute.

Inside a site vs between sites

Active Directory replication within a site and between sites through bridgehead servers Site: Chennai Site: Chennai DC1 Bridgehead DC1 Bridgehead DC2 DC2 DC3 DC3 Inside a site: change notification, ~15 seconds Site-க்குள்: change notification, ~15 விநாடி Site link: cost 100, every 180 min Site link: cost 100, 180நிமிடத்துக்கு ஒருமுறை Compressed, on a schedule Compressed, schedule படி Site: Bengaluru Site: Bengaluru DC4 Bridgehead DC4 Bridgehead DC5 DC5 Check health: repadmin /replsummary Health check: repadmin /replsummary
Within a site, DCs notify each other of changes within seconds. Between sites, bridgehead DCs replicate over site links on a schedule.Site-க்குள் DC-கள் சில விநாடிகளில் மாற்றங்களை பகிர்கின்றன. Sites இடையே bridgehead DC-கள் site link schedule படி replicate செய்கின்றன.

Within a site the Knowledge Consistency Checker (KCC) builds a ring of connections (with extra links so no DC is more than three hops away). When a DC changes something, it notifies its partners after about 15 seconds – near real time, uncompressed.

Between sites:

  • One DC per site acts as the Inter-Site Topology Generator (ISTG) and picks bridgehead servers.
  • Bridgeheads replicate over site links, which have a cost (lower is preferred) and a schedule (by default every 180 minutes; the minimum is 15). Traffic is compressed.
  • Some changes are urgent – for example account lockouts – and are sent immediately. Password changes are sent to the PDC emulator straight away, which is why a new password works even before it has replicated everywhere.

Check replication health

repadmin /replsummary                 # one line per DC: failures and largest delta
repadmin /showrepl DC01               # inbound partners and last result per partition
repadmin /queue                       # waiting replication requests
repadmin /syncall DC01 /AdeP          # push and pull all partitions now (all sites)

# PowerShell (ActiveDirectory module)
Get-ADReplicationFailure -Target contoso.local -Scope Domain
Get-ADReplicationPartnerMetadata -Target DC01 -Partition * |
  Select-Object Server, Partner, LastReplicationSuccess, LastReplicationResult

dcdiag /test:replications and the Directory Service event log (e.g. event 1311 for topology problems, 2042 when a DC hasn’t replicated for longer than the tombstone lifetime) add detail.

Common errors

Error Usually means
1722 RPC server unavailable Network/firewall between DCs, DC down, or wrong DNS record
8524 DNS lookup failure The partner’s _msdcs CNAME/A record is missing or wrong
8453 Replication access denied Permissions or a broken secure channel/computer account
1256 / 1908 Remote system unavailable / can’t find a DC – check connectivity first
8606 / lingering objects A DC was offline longer than the tombstone lifetime (180 days by default)

Two serious problems to avoid

  • Lingering objects – a DC that was offline too long reintroduces deleted objects. Keep strict replication consistency on, and never bring back a DC that has been offline for months; rebuild it instead.
  • USN rollback – restoring a DC from an old snapshot or disk image confuses its partners. Modern hypervisors that support VM-GenerationID (Windows Server 2012 and later) protect against this, but still use proper AD-aware backups for restores.

Good habits

  • Run repadmin /replsummary daily (or let monitoring do it) and alert on failures.
  • Keep DNS healthy – most replication failures are really DNS failures.
  • Define sites, subnets and site links to match the real network.
  • Decommission DCs cleanly (demote them) rather than switching them off.

What’s next

You’ve finished the Windows Server deep dives. Continue with the PowerShell track, or test yourself with the practice questions.

Practise this topic

Test yourself with free questions on this topic – instant answers and explanations.

Start practice questions

Windows ServerActive DirectoryReplicationDeep DiveAdvanced

Gopinath Karthikeyan

Gopinath Karthikeyan – Windows Site Reliability Engineer with about 12 years in enterprise Windows Server infrastructure, and founder of WinOps Academy. YouTube · LinkedIn

More in Windows Server