Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-08-21

This topic describes the routing process for internal message delivery. Internal message delivery involves the relay of e-mail in the following ways:

Receiving E-mail for Routing

A message can arrive at a Hub Transport server in any of the following ways:

  • E-mail is received from an Internet-facing Simple Mail Transfer Protocol (SMTP) server for delivery to a recipient in the Exchange organization or to a recipient in an internal relay accepted domain.

  • E-mail is received from another Hub Transport server in the Exchange organization for delivery to a recipient mailbox that is located on a Mailbox server in that Active Directory site.

  • E-mail is received from an Exchange 2003 or Exchange 2000 server for delivery to a recipient mailbox that is located on an Exchange 2007 Mailbox server.

  • E-mail is retrieved from an Exchange 2007 Mailbox server by the Hub Transport server.

Processing of all e-mail that is received by a Hub Transport server for categorization begins in the Submission queue.

Retrieving Messages from a Mailbox Server

In this scenario, the Microsoft Exchange Mail Submission Service that runs on Mailbox servers notifies a Hub Transport server that is located in the same Active Directory site that messages are ready for retrieval from a sender's outbox. Each Mailbox server maintains a list of Hub Transport servers that are located in the same Active Directory site. This list of Hub Transport servers is known as the submission server list. The server discovery process repeats every ten minutes to keep the list up to date.

If more than one Hub Transport server is located in the same Active Directory site as the Mailbox server that is submitting a notification that mail is ready for retrieval, the following selection processes:

  • If the local Mailbox server is also running the Hub Transport server role, the local server is notified. If the local Microsoft Exchange Transport service is not running or the local Hub Transport server cannot process new mail submissions because of back pressure, another available Hub Transport server is notified. For more information about back pressure, see Understanding Back Pressure.

  • If the local Mailbox server is not running the Hub Transport server role, notifications are load-balanced among Hub Transport servers by using round robin.

  • If the selected Hub Transport server cannot be contacted, the Microsoft Exchange Mail Submission Service fails over to a different Hub Transport server in the same Active Directory site. The failing server is marked as inactive, and the next Hub Transport server in the submission server list is selected. If no Hub Transport servers in the local Active Directory site are available, the submission server list is empty. In this case, an event is logged and mail submission notifications are temporarily stopped. Hub Transport servers that are marked as inactive are retried after five minutes.

By default, the Microsoft Exchange Mail Submission Service load balances notification events across the Hub Transport servers in a site so that each Hub Transport server receives an equal distribution of notification events to process. In some circumstances, providing an equal distribution may not be an optimal solution. Not all Hub Transport servers have the same capacity, and some messages require additional processing. For example, a message that has a large attachment or many recipients takes longer for a Hub Transport server to process than a small message that is addressed to only one recipient. If you want to create a static list of Hub Transport servers that a Mailbox server should notify, you can use the Set-MailboxServer cmdlet in the Exchange Management Shell. Use the SubmissionServerOverrideList parameter to specify a list of Hub Transport servers that the local Mailbox server will notify when it has mail for retrieval. For more information about how to configure this setting, see Set-MailboxServer

After a Hub Transport server receives a mail submission notification from a Mailbox server, it uses the store driver to retrieve the message from the mailbox database and put it in the Submission queue on the Hub Transport server. The transfer of the message from the Mailbox server to the Hub Transport server happens by using Exchange remote procedure call (RPC).

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.


Least cost route selection for Exchange routing

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:

Copy Code
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.

Routing Messages for Delivery to Exchange Server 2003 or Exchange 2000 Server

A message that is relayed from a Hub Transport server to an Exchange 2003 or Exchange 2000 server for delivery to a recipient mailbox that is located on Exchange 2003 or Exchange 2000 server must be relayed across a routing group connector. All Exchange 2007 servers are associated with a single routing group named Exchange Routing Group (DWBGZMFD01QNBJR) for the purposes of routing to earlier versions of Exchange Server when Exchange 2007 coexists in the same organization with Exchange 2003 or Exchange 2000. Placement of Exchange 2007 and earlier versions of Exchange Server in the same routing group is not supported. Therefore, at least one routing group connector will always separate Exchange 2007 servers from Exchange 2003 or Exchange 2000 servers.

Caution:
Do not move Exchange 2007 servers out of Exchange Routing Group (DWBGZMFD01QNBJR) and do not rename Exchange Routing Group (DWBGZMFD01QNBJR) by using a low-level directory editor. Exchange 2007 must use this routing group to communicate with earlier versions of Exchange Server. We do not support moving Exchange 2007 servers out of Exchange Routing Group (DWBGZMFD01QNBJR) or renaming of Exchange Routing Group (DWBGZMFD01QNBJR).
Note:
You must use the New-RoutingGroupConnector cmdlet in the Exchange Management Shell to create a routing group connector that includes an Exchange 2007 Hub Transport server as a source or destination server. Use the Set-RoutingGroupConnector cmdlet to modify the configuration of a routing group connector that connects the Exchange 2007 routing group with earlier versions of Exchange Server. For more information, see How to Create Routing Group Connectors from Exchange 2007 to Exchange Server 2003.

When it determines the least cost routing path to an earlier version of Exchange Server, the routing component of the Microsoft Exchange Transport service first evaluates the possible routing paths to reach the destination Exchange 2003 server considering only the cumulative cost of all routing group connectors that must be crossed to reach that destination. Next, the cost to reach the first routing group connector in the selected routing path is determined by using the algorithm described in the "Selecting the Least Cost Routing Path" section earlier in this topic. The lowest cost routing path across routing group connectors is always used. Also, the cost to reach the first routing group connector is only considered when two routing paths across routing group connectors result in the same cost.

The following algorithm is used to select the least cost routing path to a computer that is running an earlier version of Exchange Server:

  1. Examine all possible routing paths across routing group connectors and select the routing path that has the least total cost.

  2. If more than one routing path has the same cost, examine all possible routing paths across IP site links to reach the first routing group connector and select the routing path that has the lowest total IP site link cost.

  3. If more than one routing path has the same routing group cost and has the same IP site link cost, select the routing path that includes the least number of hops.

  4. If more than one routing path has the same routing group cost, the same IP site link cost, and the same number of hops, select the routing path where the name of the last Active Directory site before the destination site has the lowest alphanumeric value.

The following figure shows an example of a routing topology where Exchange 2007 and Exchange 2003 coexist.


Route selection - Exchange 2007 to Exchange 2003

In this example, a message is being routed from a Hub Transport server in Site A to an Exchange 2003 server that is located in Routing Group 2. Two possible routing paths exist to reach Routing Group 2:

  • Option 1: From routing group connector A3 at a cost of 10, to routing group connector 2-3 at a cost of 20. This routing path has a total cost of 30.

  • Option 2: From routing group connector C1 at a cost of 10, to routing group connector 1-2 at a cost of 10. This routing path has a total cost of 20.

In this example, Option 2 has a lower total routing group connector cost, and the message is routed from the Hub Transport server in Site A, to a Hub Transport server in Site C where it is queued for delivery by using routing group connector C1.

In the following figure, the cost of routing group connector 2-3 is changed to 10.

E Routing topology where Exchange 2007 and Exchange 2003 coexist with a revised routing group connector cost

Route Exchange 2007 to Exchange 2003 revised cost

Again, two possible routing paths are available to reach Routing Group 2:

  • Option 1: From routing group connector A3 at a cost of 10, to routing group connector 2-3 at a cost of 10. This routing path has a total cost of 20.

  • Option 2: From routing group connector C1 at a cost of 10, to routing group connector 1-2 at a cost of 10. This routing path has a total cost of 20.

In this example, both options have the same total routing group connector cost. Routing next evaluates the cost of the IP site links that must be crossed to reach the first routing group connector. From Site A, the IP site link cost to reach routing group connector A3 is zero, and the cost to reach routing group connector C1 is 20. Therefore, the routing path described in Option 1 is selected.

Important:
The release to manufacturing (RTM) version of Exchange 2007 does not support setting a maximum message size limit on Active Directory site links or routing group connectors that include Exchange 2007 Hub Transport servers as a source or destination server. Exchange 2007 RTM also does not recognize any message size limits that are set on routing group connectors that are created by earlier versions of Exchange Server. Therefore, when a message that is relayed from Exchange 2007 is received by Exchange 2003 or Exchange 2000, the Exchange 2003 or Exchange 2000 server may reevaluate the routing path to accommodate message size limits. This can result in a message being routed back to Exchange 2007, which causes a routing loop. To avoid this situation, we recommend that you remove all message size restrictions on routing group connectors when you introduce Exchange 2007 to the organization.

New in Exchange 2007 SP1

Exchange 2007 SP1 provides supports for configuration of a maximum message size limit on a routing group connector. By default, Exchange 2007 does not impose a maximum message size limit on messages that are relayed between Hub Transport servers and Exchange 2003 or Exchange 2000. If you use the Set-RoutingGroupConnector cmdlet to configure a maximum message size on a routing group connector, routing generates an NDR for any message that is larger than the maximum message size limit that is configured on any routing group connector 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 routing groups that must communicate over low-bandwidth connections. If you configure a maximum message size restriction on a routing group connector, you should also configure a larger cost for that routing group connector 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.

Exchange 2007 RTM also does not recognize a non-SMTP connector that is configured on an earlier version of Exchange Server to connect routing groups. When calculating the least cost routing path to an Exchange 2003 or Exchange 2000 routing group, non-SMTP connectors were not considered. Exchange 2007 SP1 includes support that lets the routing component of the Microsoft Exchange Transport service recognize non-SMTP connectors when calculating the least cost routing path.

For More Information



Routing topology where Exchange 2007 and Exchange 2003 coexist
An Exchange 2007 routing topology