Tuesday, January 26, 2016

How Exchange uses Active Directory for message routing

 If you like then share Please !!!!!


 Because the Active Directory site is one of the primary items Exchange uses when deciding
how messages will be routed, a thorough understanding of the routing process depends on
knowing how Active Directory sites factor in.
The most important thing you should know about message routing in Exchange 2013 is
that an Exchange 2013 server always tries to connect to the target delivery group directly
unless you have established a hub site for concentrating message flow. Establishing a hub
site causes all mail to flow through servers on that Active Directory site if it’s on the least
cost path. If the source server cannot, or is not allowed to, establish a direct connection
to the target delivery group, it will attempt to route the message using least-cost routing.
Finding the least-cost route seems like a simple enough task, but a number of nuances in
the process make it more complex, especially if the Active Directory administrators haven’t
paid much attention to site link costs. After all, if replication works, who cares what value
the site link costs are?
The algorithm by Exchange used is:
1. Determine the lowest-cost route to the destination by adding up the IP site link costs
along each possible path. If the ExchangeCost value is set for an IP site link object,
that cost is used; otherwise, the normal IP site link cost value is used.
2. Rank the possible paths based on their cost.
3. The lowest overall path cost is the preferred route.
4. If there are multiple paths with the same cost, the one with the fewest number of
hops is the preferred route.

5. If there are multiple paths with the same cost and the same number of hops, the path
is chosen according to which site comes first in alphabetical order.
6. Determine whether a hub site exists. If so, mark it as the next hop for the message. If
not, set the next hop to be the target delivery group.
7. If there are multiple recipients on the message, repeat steps 1 through 3 for each
additional recipient. Compare the set of possible paths to see whether there is a site
in common; if so, mark that site as the next hop.
8. Attempt to deliver the message directly to the next hop.
If a direct connection to the next hop fails, and the message is not being delivered to a
DAG, Exchange performs an operation known as queuing at the point of failure. It reverses
the least-cost routing path to discover the server that is closest to the destination. If no
servers outside the home site can be contacted (normally due to a network outage), the
message is queued on the server that currently has it and will be retried every minute until
it is delivered or it expires from the queue after two days. You can configure these settings
with the Set-TransportServer cmdlet. For instance, this command sets the retry interval to
five minutes and the timeout interval to three days:
Set-TransportServer –Identity ExServer1 –MessageRetryInterval 00:05:00
–MessageExpirationTimeOut 3.00:00:00



 For example, to assign an Exchange cost of 10 to the Delhi-Mubai site link, you’d use a command like this:
Set-ADSiteLink –Identity 'Delhi-Mumbai' –ExchangeCost 10


The Get-ADSite cmdlet reveals all the sites currently defined in Active Directory, and the
Get-ADSiteLink cmdlet returns a list of current site links. The Transport service begins to
use the new cost in its least-cost routing calculations immediately when you configure an
Exchange-specific cost for a link. Adding an Exchange-specific cost for a site link does not
affect or influence Active Directory replication in any way. Exchange uses the cost only to
calculate the optimum routing path for messages.


The Set-ADSite cmdlet is used to mark an Active Directory site as a hub site . For
example:
Set-ADSite –Identity 'Central Hub Site' –HubSiteEnabled $True
You can use the Get-ADSite cmdlet to reveal whether any of the current sites are configured as hub sites.
When a Mailbox server calculates the least-cost path for an outbound message, it sees
whether any of the sites in the path are marked as hub sites . If none of the sites is considered a hub, the server attempts to connect to a server in the target site to deliver
the message. If a hub site is found, the mailbox server attempts to connect to a Mailbox server (or a legacy hub transport server) in that site to deliver the message to it for
subsequent onward routing to its destination .
 


Credit Goes to Tony Redmond ..http://windowsitpro.com/blog/tony-redmonds-exchange-unwashed-blog.....Microsoft Exchange Server 2013 Inside Out. 

No comments:

Post a Comment