Post on 05-Jan-2016
1
Tech Topic:Tech Topic:Link StateLink State
Paul BowdenPaul Bowden
Program ManagerProgram Manager
Exchange Server Product UnitExchange Server Product Unit
2
What do we have today?What do we have today? GWARTGWART
Consolidated map of the OrganizationConsolidated map of the Organization Costs associated with connectorsCosts associated with connectors Updated on a scheduleUpdated on a schedule
What’s missing from the GWART?What’s missing from the GWART? Downstream link intelligenceDownstream link intelligence Intelligent routingIntelligent routing Loop free routingLoop free routing Dynamic updatesDynamic updates
3
Link StateLink State BackgroundBackground
Algorithm developed by “Dijkstra” in 1959Algorithm developed by “Dijkstra” in 1959 Used in OSPF at the network layerUsed in OSPF at the network layer In use on the Internet todayIn use on the Internet today
Exchange 2000’s implementationExchange 2000’s implementation In memory database held on all 2000 serversIn memory database held on all 2000 servers Immediate propagation of new link dataImmediate propagation of new link data Master for each Routing GroupMaster for each Routing Group
4
RG MasterRG Master The RID for the Routing GroupThe RID for the Routing Group Only one master per Routing GroupOnly one master per Routing Group Can be manually set through Sys. Man.Can be manually set through Sys. Man. ResponsibilitiesResponsibilities
Incrementing the major routing versionIncrementing the major routing version Propagating new data to member serversPropagating new data to member servers
5
RG MembersRG Members Responsibilities for bridgeheadsResponsibilities for bridgeheads
Telling the master about link failuresTelling the master about link failures Acting upon new information from other Acting upon new information from other
Routing GroupsRouting Groups Telling other members about new external Telling other members about new external
information when the master is downinformation when the master is down
6
Protocol CommunicationProtocol Communication Inside the Routing GroupInside the Routing Group
All servers listen on port 3044 (691 for RC1+)All servers listen on port 3044 (691 for RC1+) Plain text information updatePlain text information update
Between Routing GroupsBetween Routing Groups RGC = X-LINK2STATE SMTP command verbRGC = X-LINK2STATE SMTP command verb X.400 = Dummy message with link state payloadX.400 = Dummy message with link state payload
New link information is published immediately to New link information is published immediately to the entire Organizationthe entire Organization
For scheduled connections, the broadcast is For scheduled connections, the broadcast is droppeddropped
Link state messages do not appear in queuesLink state messages do not appear in queues
7
Looking at Link StateLooking at Link State NETMONNETMON
Good for understanding at a low-levelGood for understanding at a low-level Plain textPlain text
Tools -> MonitorsTools -> Monitors View basic status informationView basic status information
Web ManagementWeb Management Like Tools -> Monitors (PT-SHOWCASE)Like Tools -> Monitors (PT-SHOWCASE)
WinRouteWinRoute Admin tool for troubleshooting (PT-SHOWCASE)Admin tool for troubleshooting (PT-SHOWCASE)
8
What causes a state change?What causes a state change? Member OR Master initiatedMember OR Master initiated
Link UP or link DOWNLink UP or link DOWN Master initiatedMaster initiated
Changing the cost on a connectorChanging the cost on a connector Changing Address SpacesChanging Address Spaces Adding/removing connectorsAdding/removing connectors
Master gets a notification from the AD Master gets a notification from the AD when changes are made in Routing Group when changes are made in Routing Group configurationconfiguration System Manager only updates ADSystem Manager only updates AD
9
In-memory databaseIn-memory database Not persisted to diskNot persisted to disk
Reboot and learnReboot and learn Contains RG GUIDs, Connector GUIDs, Costs Contains RG GUIDs, Connector GUIDs, Costs
Address Spaces, Bridgehead GUIDs, and link state Address Spaces, Bridgehead GUIDs, and link state (UP/DOWN)(UP/DOWN)
Connector definition and configuration is held in the Connector definition and configuration is held in the Active Directory (Configuration NC)Active Directory (Configuration NC)
Size of databaseSize of database 32 bytes for every server, connector and Routing Group in 32 bytes for every server, connector and Routing Group in
the Organizationthe Organization Example:Example:
250 Routing Groups = 8Kb250 Routing Groups = 8Kb 150 Exchange Servers = 4.8Kb150 Exchange Servers = 4.8Kb 800 Connectors = 25.6Kb800 Connectors = 25.6Kb 38.4Kb total
10
Simple ScenarioSimple Scenario
RGC
MemberMember
RG MasterRG Master
Routing Group ConnectorRouting Group Connector
RG1 RG2
RG1 = 5RG2 = A
RG1 = 5RG2 = A
Cost: 10
Cost: 10
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
RG1 = 5RG2 = A
RG1 = 5RG2 = A
RG1 = 5RG2 = A RG1 = 5
RG2 = A
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
RG1 = 5RG2 = B RG1 = 5
RG2 = B
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
Link State Update:RG2 to RG3Link DOWN
RG3
X
11
What does it look like?What does it look like? Port 3044/691 Netmon tracePort 3044/691 Netmon trace
Bytes remainingBytes remaining GUID of connector affectedGUID of connector affected GUID of bridgehead that noticed changeGUID of bridgehead that noticed change Status of connectionStatus of connection
00000030 7B 30 30 30 30 30 30 35 31 7D {00000051}00000040 20 56 53 5F 43 4F 4E 4E 20 37 66 65 31 32 65 66 .VS_CONN.7fe12ef00000050 65 65 38 66 31 36 35 34 64 62 63 32 37 31 37 35 ee8f1654dbc2717500000060 38 35 35 64 37 66 37 64 31 20 63 33 38 30 61 62 855d7f7d1.c380ab00000070 30 66 37 62 37 62 66 66 34 33 38 65 66 62 38 37 0f7b7bff438efb8700000080 30 37 35 36 38 63 66 38 62 39 20 44 4F 57 4E 20 07568cf8b9.DOWN.00000090 20
12
What does it look like?What does it look like? Link State query (check knowledge) Port 25Link State query (check knowledge) Port 25
00000000 00 08 C7 33 D7 56 00 08 C7 33 3B 65 08 00 45 00 ...3.V...3;e..E.
00000010 01 14 1F 37 40 00 80 06 5D 0D 9D 3A 21 79 9D 3A ...7@...]..:!y.:
00000020 21 B2 86 A4 00 19 43 24 96 B7 F8 F0 97 63 50 18 !.....C$.....cP.
00000030 42 DB E9 AE 00 00 58 2D 4C 49 4E 4B 32 53 54 41 B.....X-LINK2STA
00000040 54 45 20 4C 41 53 54 20 43 48 55 4E 4B 3D 7B 30 TE.LAST.CHUNK={0
00000050 30 30 30 30 30 63 38 7D 20 4D 55 4C 54 49 20 28 00000c8}.MULTI.(
00000060 31 20 32 29 20 28 7B 30 30 30 30 30 30 35 31 7D 1.2).({00000051}
00000070 20 44 49 47 45 53 54 5F 51 55 45 52 59 20 33 61 .DIGEST_QUERY.3a
00000080 66 32 37 36 31 35 39 38 61 38 32 61 34 62 61 35 f2761598a82a4ba5
00000090 65 63 37 66 63 61 35 65 66 65 32 35 63 65 20 66 ec7fca5efe25ce.f
000000A0 37 66 65 31 62 32 37 37 31 63 30 36 35 33 31 37 7fe1b2771c065317
000000B0 62 39 64 32 38 37 37 65 34 33 63 61 31 32 63 20 b9d2877e43ca12c.
000000C0 20 20 7B 30 30 30 30 30 30 35 31 7D 20 44 49 47 ..{00000051}.DIG
000000D0 45 53 54 5F 51 55 45 52 59 20 33 61 66 32 37 36 EST_QUERY.3af276
000000E0 31 35 39 38 61 38 32 61 34 62 61 35 65 63 37 66 1598a82a4ba5ec7f
000000F0 63 61 35 65 66 65 32 35 63 65 20 66 37 66 65 31 ca5efe25ce.f7fe1
00000100 62 32 37 37 31 63 30 36 35 33 31 37 62 39 64 32 b2771c065317b9d2
00000110 38 37 37 65 34 33 63 61 31 32 63 20 20 29 20 20 877e43ca12c..)..
00000120 0D 0A ..
13
Master Down Scenario #1Master Down Scenario #1
RGC
MemberMember
RG MasterRG Master
Routing Group ConnectorRouting Group Connector
RG1 RG2
RG1 = 5RG2 = A
RG1 = 5RG2 = A
Cost: 10
Cost: 10
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = A
RG1 = 5RG2 = A
RG1 = 5RG2 = A RG1 = 5
RG2 = A
X
RG3
X
14
Master Down – Local changeMaster Down – Local change RG Master is the only one that can RG Master is the only one that can
increment the version number of the local increment the version number of the local Routing GroupRouting Group
Re-broadcast of this new information is not Re-broadcast of this new information is not possiblepossible
Changed member drops the broadcastChanged member drops the broadcast
15
Master Down Scenario #2Master Down Scenario #2
RGC
MemberMember
RG MasterRG Master
Routing Group ConnectorRouting Group Connector
RG1 RG2
RG1 = 5RG2 = A
RG1 = 5RG2 = A
Cost: 10
Cost: 10
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
RG1 = 5RG2 = A
RG1 = 5RG2 = A
RG1 = 5RG2 = A RG1 = 5
RG2 = A
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
RG1 = 5RG2 = B RG1 = 5
RG2 = B
Link State Update:RG2 to RG3Link DOWN
RG1 = 5RG2 = B
Link State Update:RG2 to RG3Link DOWN
Link State Update:RG2 to RG3Link DOWN
X
RG3
X
16
Master Down – Remote changeMaster Down – Remote change Members can act upon information Members can act upon information
received from other Routing Groupsreceived from other Routing Groups Members can update each other with new Members can update each other with new
remote information as they perform a link remote information as they perform a link state swap for every SMTP sessionstate swap for every SMTP session
17
Complex Routing WalkthroughComplex Routing Walkthrough
RG1RG1RG1RG1 RG2RG2
RG5RG5
RG3RG3
RG4RG4MemberMember
RG MasterRG Master
XLink DownLink Down
10
10
10
20
20
Routing Group ConnectorRouting Group Connector
Link DownLink Down
XInfinite Cost?Wait in queue
GlitchRetry
Open Poll
Open Poll
Link DownLink Down
Link DownLink Down
GlitchRetry
New messages wait here
18
Multiple Bridgehead ScenarioMultiple Bridgehead Scenario
RGC
RG1 RG2
XBH1
BH2
RG2 to RG1BH1: CONN_AVAILBH2: CONN_AVAILState: STATE UP
GetNextHop = BH1
RG2 to RG1BH1: CONN_NOT_AVAILBH2: CONN_AVAILState: STATE UP
X
GetNextHop = BH2
GetNextHop = BH2
RG2 to RG1BH1: CONN_NOT_AVAILBH2: CONN_NOT_AVAILState: STATE UP
RG2 to RG1BH1: CONN_NOT_AVAILBH2: CONN_NOT_AVAILState: STATE DOWNState: STATE DOWN
State Down
State Down
19
CaveatsCaveats New information is broadcast everywhere New information is broadcast everywhere
and immediatelyand immediately EDK-based connectors are always UPEDK-based connectors are always UP
20