
Routing Messages for Delivery to Exchange 2007 Servers
After a message is received by the Hub Transport server, the message is delivered to the Submission queue. Messages move from the Submission queue through the categorizer. When the message is categorized, a recipient's e-mail address is resolved to an object in Active Directory. This query determines the mailbox that is associated with that e-mail address and which Mailbox server is hosting that mailbox.
After information about the recipient is resolved, the next step is resolving the Mailbox server to an Active Directory site. This Active Directory site information is stamped on the message as the NextHopSolutionKey attribute. The Enhanced DNS component of the Microsoft Exchange Transport service accesses the topology information to determine which Hub Transport servers are located in the same site as the destination Mailbox server. A list of Hub Transport servers in the Active Directory site is then referenced to determine where to route the message. If the destination Mailbox server is located in the same site as the querying Hub Transport server, that Hub Transport server queues the message for local delivery. If the destination Mailbox server is located in a different site, the local Hub Transport server queues the message for remote delivery to an Active Directory site.
A message that is queued for local delivery is submitted to the destination mailbox store by the store driver. The transfer of the message from the Hub Transport server to the Mailbox server happens by using Exchange RPC.
A message that is queued for delivery to a remote Active Directory site is transferred by using SMTP. Before the message is relayed, the routing component of the categorizer must select the least cost routing path.
Selecting the Least Cost Routing Path
The least cost routing path to the remote Active Directory site is determined by the calculation of all the costs assigned to the Active Directory IP site links that exist between the two sites. The links are bridged, and a direct connection occurs. Exchange 2007 Hub Transport servers always select a single, deterministic least cost routing path. Availability of the underlying connection or destination server is never a consideration in routing path selection, and no alternative routing path is considered.
The least cost routing path calculation is used to determine a backoff path when message delivery to the next hop fails. In Exchange 2007, backoff is a mechanism used to deliver messages at an interim hop along the least cost routing path when direct relay fails for any reason, such as network issues or servers going offline. The routing component tries to deliver messages as close to the destination as possible by backing off, hop by hop, along the least cost routing path until a connection is made. First, a connection try is made to each Hub Transport server in the destination Active Directory site. If no Hub Transport servers in the Active Directory site respond, the least cost routing path is checked to determine how to start backing off from the delivery site. The goal is to deliver the message as close as possible to the destination and queue it at a Hub Transport server in that Active Directory site.
The following logic is used to select the least cost routing path:
-
First, calculate the least cost routing path by adding the cost of the IP site links that must be traversed to reach the destination. If multiple routing paths are possible, only the routing path with the lowest aggregate cost is used.
-
If more than one routing path has the same aggregate cost, the number of hops in each routing path is evaluated, and the routing path with the least number of hops is used.
-
If more than one routing path is still available, the name assigned to the Active Directory sites or routing group connectors before the destination are considered. The routing path where the Active Directory site nearest to the destination is lowest in alphanumeric order is used. If the site nearest to the destination is the same for all routing paths being evaluated, an earlier site name is considered.
The following figure shows the routing topology for an Exchange organization. This topology is used in the examples that follow to demonstrate the logic that is used by the routing algorithm to select the least cost routing path.
An Exchange 2007 routing topology.gif)
Example 1 A message that is being relayed from Site A to Site D can follow two possible routing paths: Site A-Site B-Site D and Site A-Site C-Site D. The costs that are assigned to the IP site links in each routing path are added to determine the total cost to route the message. In this example, the routing path Site A-Site B-Site D has an aggregate cost of 20. The routing path Site A-Site C-Site D has an aggregate cost of 10. Routing selects the routing path Site A-Site C-Site D.
Example 2 A message is being relayed from Site B to Site D. There are three possible routing paths: Site B-Site D with a cost of 15, Site B-Site E-Site C-Site D with a cost of 15, and Site B-Site A-Site C-Site D with a cost of 15. Because more than one routing path has the same cost, routing selects the routing path Site B-Site D. This routing path has the least number of hops.
Example 3 A message is being relayed from Site A to Site E. There are two possible routing paths: Site A-Site B-Site E with a cost of 10, and Site A-Site C-Site E with a cost of ten. Both routing paths have the same cost and same number of hops. The alphanumeric order of the Active Directory sites immediately before Site E is compared. Site B has a lower alphanumeric value than Site C. Therefore, routing selects the routing path Site A-Site B-Site E.
After the least cost routing path has been determined, the Exchange 2007 routing component does not consider alternative routing paths.
An Active Directory site that does not have any Hub Transport servers deployed is not recognized by routing and does not participate in Exchange topology. However, if such a site exists along the least cost routing path between sites where Hub Transport servers are deployed, the IP site link costs of the links that connect that site to other sites are considered in the least cost routing path calculation.
After the least cost routing path is chosen, routing determines whether there is a hub site along that routing path. Hub sites override a direct connection and force messages to be processed by the Hub Transport servers in the hub site. You use the Set-AdSite command in the Exchange Management Shell to configure an Active Directory site as a hub site.
This configuration is useful when connectivity may prevent direct SMTP relay between sites. Whenever a hub site exists along the least cost routing path for message delivery, the messages queue and are processed by the Hub Transport servers in the hub site before they are relayed to their ultimate destination. If there is more than one hub site along the least cost routing path, messages stop at each hub site along the routing path. For more information about how to configure a hub site, see How to Configure a Hub Site.
Controlling IP Site Link Costs
If you decide that the Active Directory IP site link costs and traffic flow patterns are not optimal for Exchange 2007, you can make adjustments to the costs evaluated by Microsoft Exchange. As an Exchange administrator, you cannot and should not modify the cost assigned to the IP site link by using Active Directory tools. Instead, use the Set-ADSiteLink cmdlet in the Exchange Management Shell to assign an Exchange-specific cost to the IP site link. For example, to set a different cost on the IP site link SITELINKAB for message routing purposes, run the following command in the Exchange Management Shell:
Set-AdSiteLink -Identity SITELINKAB -ExchangeCost 25
When an Exchange cost is assigned to an IP site link, the Exchange cost overrides the Active Directory cost for message routing purposes, and routing only considers the Exchange cost when it evaluates the least cost routing path. Otherwise, the Active Directory replication cost is used. For more information, see How to Set an Exchange Cost on an Active Directory IP Site Link.
New in Exchange 2007 Service Pack 1
Exchange 2007 Service Pack 1 (SP1) provides supports for configuration of a maximum message size limit on an Active Directory IP site link. By default, Exchange 2007 does not impose a maximum message size limit on messages that are relayed between Hub Transport servers in different Active Directory sites. If you use the Set-AdSiteLink cmdlet to configure a maximum message size on an Active Directory IP site link, routing generates a non-delivery report (NDR) for any message that has a size larger than the maximum message size limit that is configured on any Active Directory site link in the least cost routing path. No alternative routing path is considered. This configuration is useful for restricting the size of messages that are sent to remote Active Directory sites that must communicate over low-bandwidth connections. If you configure a maximum message size restriction on an Active Directory site link, you should also configure a larger Exchange cost for that site link to prevent routing from preferring a size-restricted routing path over a routing path that has no size restrictions. For more information, see How to Configure Message Size Limits for Internal Routing.