DC topology: Difference between revisions

From SambaWiki
(a simpler version of the original document about AD DC topology)
(No difference)

Revision as of 06:07, 10 February 2010

Introduction

This is a simpler version of the DC topology algorithm as described by Microsoft at http://msdn.microsoft.com/en-us/library/dd240043(PROT.13).aspx. The goal of this document is to give an overview of the original algorithm, which is rather large.

Main functions

CreateGraph

create an empty graph
sort the objectGUIDs in ascending order
for each id: objectGUIDs
    create a vertex with id and add it to the graph
end
return the new graph

CreateEdge

create an edge
set edge.ID to siteLink.objectGUID
for each site: siteLink.siteList
    append site.objectGUID to edge.VertexIDs
end
set edge.ReplInfo.Cost to siteLink.cost
set edge.ReplInfo.Options to siteLink.options
set edge.ReplInfo.Interval to siteLink.replInterval
if siteLink has schedule
    set edge.ReplInfo.schedule to siteLink.schedule
else
    set edge.ReplInfo.schedule to null
end
set edge.type to the corresponding interSiteTransport.objectGUID
mark edge as undirected
return the new edge

CreateAutoEdgeSet

create an edgeset
for each l: all siteLink objects
    find an edge in the graph such that its ID == l.objectGUID
    append l to the edgeset if edge.type = interSiteTransport.objectGUID
end
return the new edgeset

CreateEdgeSet

create an edgeset
set edgeset.ID to siteLinkBridge.objectGUID
for each l: objects with DN in siteLinkBridge.siteLinkList
    find an edge in the graph such that its ID == l.objectGUID
    append l to the edgeset if edge.type = interSiteTransport.objectGUID
end
return the new edgeset

SetupGraph

run CreateGraph based on the objectGUIDs of all the objects with objectClass=siteLink and children of the DN CN=Sites,CN=Configuration, and obtain a graph
for each t: objectClass=interSiteTransport, child of CN=Inter-Site Transports,CN=Sites,CN=Configuration
    store every objectClass=siteLink, child of t in L
    for each l: L
        run CreateEdge to create an edge based on l and add it to the graph
    end
    if t doesn't have NTDSTRANSPORT_OPT_BRIDGES_REQUIRED and the local site object doesn't have NTDSTRANSPORT_OPT_W2K3_BRIDGES_REQUIRED
        run CreateAutoEdgeSet to create an edgeset based on L and add it to the graph
    else
        for each b: objectClass=siteLinkBridge, child of t
            run CreateEdgeSet to create an edgeset based on b and add it to the graph
        end
    end
end
return the graph