Exchange 2007 Hub Transport servers do not relay to each Active Directory site along the least cost routing path. After the routing path is determined, the message is relayed directly from the source server to the next hop. The next hop selection tries to deliver the messages as close as possible to the ultimate destination. Additional intrasite relay may be required to arrive at the ultimate destination. When routing to legacy routing groups, direct relay to the Active Directory site where the source server for the first hop routing group connector resides occurs. After the message is relayed to the legacy environment, standard legacy routing happens.
Figure 5 shows a simple Exchange topology and illustrates many of the Exchange routing components.
Figure 5 Exchange topology and routing components
Using Figure 5 as a reference, a message that is sent from Mailbox1 in Site A, to the external recipient joe@contoso.com is processed as follows:
-
The Microsoft Exchange Mailbox Submission service that is running on Mailbox1 notifies a Hub Transport server that is located in the same Active Directory site of the new mail item for transport.
-
Using RPC, the store driver component on a Hub Transport server in the same Active Directory site retrieves the message and puts it in the Submission queue on the local server.
-
From the Submission queue, the message moves through categorization. The categorizer first performs recipient resolution and determines that joe@contoso.com is an external recipient.
-
The routing component selects the best connector through which to route the message and calculates the least cost routing path to that connector. In this example, a Send connector has the address space *.contoso.com and is the connector selected by the routing component. All the source servers for this Send connector are located in Site B.
-
The routing component determines the next hop required to reach a source server for the Send connector. The Hub Transport server in Site A queues the message for SMTP delivery to Site B.
-
If the receiving server in Site B is a source server for the Send connector, it queues the message for delivery to that Send connector. If the receiving server is not a source server for the *.contoso.com Send connector, the message is relayed by using SMTP to a Hub Transport server in Site B that is the source server for the connector.
Table 2 provides additional examples of the next hop selection for several recipients based on the topology shown in Figure 5.
Table 2 Examples of next hop selection in Figure 5
|
Receiving server
|
Ultimate destination
|
Next hop
|
Queue delivery type
|
|---|
|
Hub1
|
Mailbox1
|
Mailbox1
|
MAPI delivery
|
|
Hub1
|
Mailbox2
|
Site B
|
SMTP relay to a remote Active Directory site
|
|
Hub1
|
Mailbox3
|
Routing group connector 1
|
SMTP relay to a legacy routing group
|
|
Hub1
|
Recipient@fourthcoffee.com
|
Hub3
|
SMTP relay in an Active Directory site
|
|
Hub1
|
Recipient@contoso.com
|
Site B
|
SMTP relay to a remote Active Directory site
|
|
Hub2
|
Mailbox1
|
Site A
|
SMTP relay to a remote Active Directory site
|
|
Hub2
|
Mailbox2
|
Mailbox2
|
MAPI Delivery
|
|
Hub2
|
Mailbox3
|
Site A
|
SMTP relay to a remote Active Directory site
|
|
Hub2
|
Recipient@contoso.com
|
Send connector 2
|
DNS connector delivery
|
|
Hub2
|
Recipient@fourthcoffee.com
|
Site A
|
SMTP relay to a remote Active Directory site
|
|
Hub3
|
Mailbox1
|
Mailbox1
|
MAPI delivery
|
|
Hub3
|
Recipient@fourthcoffee.com
|
Send connector 1
|
Smart host connector delivery
|
After the least cost routing path has been calculated and the next hop destination has been chosen, Exchange 2007 routing tries to relay the message directly to the destination. However, in some configuration scenarios, direct relay does not occur. For example, an Exchange administrator can configure an Active Directory hub site to force message delivery to relay through a particular Active Directory site in situations where direct communication between Active Directory sites is not possible because of network security or connectivity restrictions. For more information, see "Implementing Hub Sites" later in this topic.
A message that is being delivered to more than one recipient may also be relayed through an interim site. Exchange 2007 is designed to minimize network bandwidth usage. One feature of this design is the ability to delay generation of multiple copies of a message for delivery to recipients in different destinations until a fork in the delivery path is reached. This feature is known as delayed fan-out. For more information, see "Delayed Fan-Out" later in this topic.
Queue at Point of Failure
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 attempt 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. This behavior is known as queue at point of failure. When the message is queued at the point in the delivery path where communication failed, this will help you determine why the message delivery failed.
In Figure 6, if a message is being delivered between Site A and Site D, the least cost routing path may be Site A-Site B-Site C-Site D. Delivery will first be tried directly from Site A to Site D. If no Hub Transport server in Site D responds, delivery will be tried to the Hub Transport servers in Site C. This process continues until a Hub Transport server accepts the message. If all intermediate sites are unavailable, the message will be queued at the source site. If the message is queued in Site C, you can start investigating the failure at the Hub Transport servers in Site D or the network connectivity between Site C and Site D. When the message is queued at the point of failure, the queue is put in a retry state and delivery attempts continue based on the message retry intervals until delivery succeeds or the message expires. The queue is automatically resubmitted for recategorization after a default interval of 12 hours. Queues that have a connector as the next hop destination are not automatically resubmitted unless a configuration change that causes resubmission occurs. For more information, see Message Rerouting and the Unreachable Queue.
You can use the Exchange Mail Flow Troubleshooter to help diagnose problems with mail flow. This tool is a component of the Microsoft Exchange Troubleshooting Assistant and can be run from the Toolbox of the Exchange Management Console.
In Figure 6, a message is being sent from Site A for delivery to Site D. The Hub Transport servers in Site D are offline. Therefore, the message queues at Site C.
Figure 6 Queue at point of failure
.gif)
In more complex topologies, the least cost routing path between two Active Directory sites can contain many intermediate Active Directory sites. If a network issue occurs somewhere early along the routing path, it may be too inefficient to back off site by site from the end and try to deliver to every one of the intermediate sites. If the routing path is longer than four hops, binary backoff is implemented until four or fewer sites are remaining. Binary backoff means that the next connection attempt is made at the halfway point in the routing path. For example, if the least cost routing path from Active Directory Site A to Site Q is A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P- Q and the network failure occurs at the link between Site B and Site C, the first connection attempt is made to all Hub Transport servers in Site Q. When the connection attempt fails, the next attempt is made to all Hub Transport servers in Site I. This is halfway to Site Q. When that connection attempt fails, the next connection attempt is made to all Hub Transport servers in Site E. This is halfway between Site A and Site I. When that connection attempt fails, connection attempts are made to Site D, Site C, and Site B because they are closer than four links to the source site. The message will eventually be queued on a Hub Transport server in Site B until the B-C link connectivity is restored.
Implementing Hub Sites
In your Exchange organization, you may have to force all message delivery to be relayed through a particular Active Directory site. In this scenario, connectivity may prevent direct SMTP relay between sites. Therefore, messages must be relayed through an interim site before they are sent to their destination. Because of an Exchange organization's internal policies, an administrator may also want to relay all messages through a particular site. You can use Exchange Management Shell tasks to designate an Active Directory site as a hub site. By designating an Active Directory site as a hub site, you cause additional overall overhead because more servers are involved in message delivery. For example, consider a message that is sent from Site A to Site E. If the least cost routing path is Site A-Site B-Site C-Site D-Site E, and you designate Site C as a hub site, the message is relayed from Site A to Site C and then relayed from Site C to Site E.
You use the Set-ADSite cmdlet to specify an Active Directory site as a hub site. 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. To set Site C as a hub site, run the following command in the Exchange Management Shell:
Set-AdSite -Identity "Site C" -HubSiteEnabled $true
After the least cost routing path is chosen, routing determines whether there is a hub site along that routing path. If a hub site is configured, messages stop at a Hub Transport server in the hub site before they are relayed to the target 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.
You must understand that this variation to direct relay routing only is in effect when the hub site is located along the least cost routing path. Figure 7 shows the correct use of a hub site. In this diagram, Site B is configured as a hub site. Messages that are relayed from Site A to Site D are relayed to Site B before they are delivered to Site D.
Figure 7 Message delivery with a hub site
Figure 8 shows how IP site link costs affect routing to a hub site. In this scenario, Site B has been designated as a hub site. However, because it does not exist along the least cost routing path between any other sites, queuing at Site B before delivery to the destination does not occur. An Active Directory site is never used as a hub site if it is not on the least cost routing path between two other sites.
Figure 8 Misconfigured hub site
You can configure any Active Directory site as a hub site. However, for this configuration to work correctly, you must have deployed at least one Hub Transport server in the hub site.
Controlling IP Site Link Costs
As an Exchange administrator, you should work closely with the Active Directory administrator of your organization when you evaluate how the Active Directory site topology affects Exchange routing. Because Active Directory IP site links costs are based on relative network speed compared to all network connections in the wide area network, and are designed to produce a reliable and efficient replication topology, the existing IP site link costs should work well for Exchange 2007 message routing. However, if, after documenting the existing Active Directory site and IP site link topology, you verify 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.
Adjusting IP site link costs can be useful when the message routing topology has to diverge from the Active Directory replication topology. Exchange costs can be used to force all message routes to use a hub site. Exchange costs can also be used to control where messages are queued when communication to an Active Directory site fails. Figure 9 shows an Active Directory topology with four sites.
Figure 9 Topology with Exchange costs configured on IP site links
In Figure 9, the network connection between Site C and Site D is a low bandwidth connection that is only used for Active Directory replication and should not be used for message routing. However, the Active Directory IP site link costs cause that link to be included in the least cost routing path from any other Active Directory site to Site D. Therefore, messages are delivered to the Site D queue in Site C. The Exchange administrator prefers that the least cost routing path include Site B instead so that if Site D is unavailable, the messages will queue at Site B. Configuring a high Exchange cost on the IP site link between Site C and Site D prevents that IP site link from being included in the least cost routing path to Site D.
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. 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. For more information, see How to Configure Message Size Limits for Internal Routing.
Delayed Fan-Out
A single e-mail message can be addressed to more than one recipient. These recipients may have internal mailboxes, or they may be external recipients. To route a single message to more than one recipient, the following steps occur:
-
Recipient resolution Each recipient of the message is resolved to a delivery destination.
-
Routing The least cost routing path for each recipient is determined. This includes whether a hub site is configured.
-
Message splitting To route the message to recipients that have different delivery locations, the message must be split into multiple copies.
After each recipient has been resolved and a routing path to each delivery destination is determined, Exchange 2007 compares the routing path for each recipient. To preserve bandwidth, the bifurcation, or splitting of the message into multiple copies, does not occur until a fork in the routing path is encountered.
For example, if multiple recipients of a single message share part of or all of the least cost routing path, a single copy of the message is sent until the message reaches the point in the routing path where a fork occurs. When the divergence in routing paths occurs, the message splits to create a separate copy for each recipient.
In Figure 10, a single message is sent from Site A to recipients in Site C, Site D, and Site E. The least cost routing path is shared until the message reaches Site B. In this scenario, a single copy of the message that contains all recipients is relayed to Site B. This represents the first fork in the routing path. From Site B, a single message copy is routed to the recipient in Site D, and a single copy is relayed to Site C. In Site C, the message splits again. A copy of the message is delivered to the recipient in Site C. And a copy of the message is relayed to Site E for delivery to the recipient in that site.
Figure 10 Delayed message fan-out