1. Routing Messages
Hub Transport and Edge Transport servers route messages received from internal
and external senders to their ultimate destinations. The message is first
categorized and is next processed by the store driver, delivery agents, or the
foreign gateway connection handler. The component that is used depends on the
ultimate destination. This section describes the stages of message
categorization and the various messaging components that implement message
routing.
1.1. Categorizing Messages
The categorizer is a message routing component of the Exchange Server 2010
transport service that processes incoming messages and determines what to do
with these messages based on information about the intended recipients.
After a message is received by an Exchange Server 2010 Hub Transport or Edge
Transport server, it undergoes preliminary processing and is delivered to
the submission queue. Messages then move from the
submission queue through the categorizer. This process can be divided into
several phases as follows:
Initial agent
processing
Agents such as the Microsoft Forefront Protection for Exchange
Server antivirus agent and the journaling agent process messages
on Hub Transport servers.
Recipient
resolution
The recipient email address is resolved. This determines
whether the recipient has an internal mailbox or an external
email address.
Routing
The categorizer’s routing component determines the
message’s ultimate destination and the route to that
destination. It then selects the next segment (or hop) for
message relay and resolves the next hop information to a list of
physical servers and IP addresses.
Content conversion
This transforms email messages into a format that is readable
by the recipient and that is specific to the recipient’s
email client. Conversion occurs before a message is relayed to
its next hop.
Routed message agent
processing
After the routing decisions for a message are made, the
transport rules agent and the journaling agent are applied on a
Hub Transport server. Note that the journaling agent is applied
both at the initial agent processing stage and when the message
has been routed. This enables any changes that are made to the
message by the transport rules agent to be processed by the
journaling agent.
Message assembly and DSN
generation
The categorized message is assembled and moved to a delivery
queue. A DSN message may also be generated during this
phase.
1.2. Messaging Components
When they have been categorized, messages are processed by the store
driver, delivery agents, or the foreign gateway connection handler. The
processing component that is used depends on the ultimate message
destination. A delivery queue is dynamically generated for each hop, and
messages are queued in delivery queues after a routing decision is made. If
a route to a recipient cannot be found, the messages are queued to the
unreachable queue.
Exchange Server 2010 accesses configuration information stored in Active
Directory to make routing decisions on a Hub Transport server. On an Edge
Transport server, configuration information is stored in and accessed from
AD LDS on the local server. Windows Server 2008 (or 2008 R2) and Exchange
Server 2010 services create mappings of the configuration data and cache
these mappings in routing tables that Exchange Server 2010 references when
making routing decisions. The mappings cache is updated whenever the routing
topology changes. Note that Edge Transport servers cannot cache information
about Active Directory topology.
The following configuration and
service components are used in message routing:
Active Directory
sites
These represent routing boundaries for Hub Transport servers.
A Hub Transport server delivers email messages directly to
Mailbox servers, distribution group expansion servers, and
source servers for connectors in its local Active Directory
site. It can also route messages to Edge Transport servers that
are subscribed to that site. However, when routing email
messages to remote Active Directory sites, a Hub Transport
server must relay these messages to a Hub Transport server in
the remote site.
Active Directory IP site
links
IP site links define logical paths between Active Directory
sites. Exchange Server 2010 uses IP site links to determine the
least-cost routing path to remote Active Directory sites.
Send connectors
These are used to send messages to other SMTP hosts. If your
Exchange organization routes messages to more than one email
domain, you may decide to create Send connectors that are
dedicated to each address space.
Delivery agents
These are used to route messages to foreign systems that do
not use the SMTP protocol.
Foreign connectors
These use drop directories to send messages to foreign systems
that do not use SMTP protocol for message transfer. Exchange
uses the configuration of Foreign connectors when making routing
decisions.
Routing groups
All computers running Exchange Server 2010 deployed in an
organization belong to a single, global routing group. This is
to implement compatibility with Exchange Server 2003.
Routing group
connectors
These define logical paths between Exchange routing groups.
They are used when Exchange Server 2010 is deployed in an
existing Exchange 2003 organization.
Microsoft Exchange Transport
service
This service is the SMTP
provider for Exchange Server 2010. A series of SMTP Receive
agents are triggered by various SMTP events, and the Microsoft
Exchange Transport service enables these agents to process
messages as they pass through SMTP transport and to perform
anti-spam, antivirus, and other tasks before messages are
submitted to the categorizer.
Microsoft Exchange Active Directory
Topology service
This service locates the domain controllers and global catalog
servers that Exchange Server 2010 uses to retrieve configuration
and recipient data from Active Directory.
Routing tables
These hold the information that the routing component uses to
make routing decisions. The routing table is composed of a map
of topology components and their relationship to one
another.
SMTP
The SMTP protocol is used for communication when messages are
relayed between SMTP servers. An SMTP server can be a Hub
Transport server, Edge Transport server, or smart host. A Hub
Transport server uses remote procedure call to deliver messages
directly to Mailbox servers that have the same Active Directory
site membership as the Hub Transport server.
DNS
Exchange Server 2010 uses the enhanced DNS client component of
the Microsoft Exchange Transport service to resolve the next hop
selection to a list of target server names. The standard DNS
client is used to resolve that list of server names to IP
addresses. Enhanced DNS also provides round-robin load-balancing
functionality for Exchange 2010 Transport servers.
2. Using Active Directory Sites and Site Costs for Routing
An Active Directory site is based on the physical aspects of the network and
defines which subnets in the network are connected. The aim of site design is to
optimize Active Directory replication traffic. The Active Directory site
represents a routing boundary for Exchange Server 2010, and Hub Transport
servers make routing decisions based on Active Directory site topology.
2.1. Site Membership
By default, an Active Directory forest contains a single Active Directory
site named Default-First-Site-Name. If no other Active Directory sites are
created, all domain member computers in the forest are members of
Default-First-Site-Name, and you do not need to configure a subnet-to-site
association. If you create additional Active Directory sites, you must
specify the subnets that are assigned to each site. Table 1 shows a typical
site-to-subnet association.
Table 1. Active Directory Site-to-Subnet Association
Site
Name
|
Associated IP Subnets
|
---|
Site 01
|
10.10.10.0/24
10.10.11.0/24
|
Site02
|
10.10.20.0/24
10.10.21.0/24
|
Site03
|
10.10.30.0/24
10.10.31.0/24
|
A Domain or Enterprise administrator assigns Active Directory site
membership to domain controllers and global catalog servers. Other member
computers in the domain, such as Exchange servers, are assigned Active
Directory site membership automatically when they are configured to use an
IP address in an IP subnet that is associated with an Active Directory site.
Computers within the same Active Directory site are presumed to have good
network connectivity. A member server is always in only one Active Directory
site.
A site-aware application, such as Exchange Server 2010, can determine the
Active Directory site membership of the computer on which it is installed
and of other computers in the forest and then use that information to
control communication flow. When a site-aware application needs to access
another server, such as a domain controller or global catalog server, it
first attempts to access servers that have the same Active Directory site
membership as the computer on which it runs. An Exchange Server 2010 server
uses Active Directory topology for message routing and to communicate with
the services that are running on computers with other Exchange Server 2010
server roles installed. The Active Directory site acts as both a routing
boundary and a service discovery boundary.
The process of determining the site membership of a computer in a domain
uses a series of DNS queries to compare the local IP address to defined
subnets and thus determine the appropriate site membership association. To
reduce the overhead associated with DNS queries, Exchange Server 2010 adds
the msExchServerSite attribute to the Active Directory
schema. This attribute is a property of each Exchange server object, and the
value of this attribute is the distinguished name of the Active Directory
site of the Exchange server. Because site membership affinity is stored as
an attribute of the server object, the current topology can be read directly
from the Active Directory. This also enables a site membership association
for a non-domain computer, such as a subscribed Edge Transport
server.
2.2. IP Site Links and Site-Link Costs
Site links are logical paths between Active Directory sites. A site-link
object represents a set of sites that can communicate at a uniform cost
through a specified intersite transport. Site links do not correspond to the
actual paths that network packets follow on the physical network, but the
cost that an administrator assigns to a site link typically relates to the
reliability, speed, and available bandwidth of the underlying network. For
example, an administrator would assign a lower cost to a network connection
with a speed of 100 megabits per second (Mbps) than to a network connection
with a speed of 10 Mbps.
By default, all site links are transitive. This means that if Site 01
links to Site 02 and Site 02 links to Site 03, then Site 01 links to Site
03. The transitive link between Site 01 and Site 03 is known as a
site-link bridge.
You can configure a site link to use either IP or SMTP as the
communication transport protocol. An SMTP site link is designed to provide a
store and forward mechanism for replication of a limited number of data
types between Active Directory sites that do not have a reliable network
link. All types of data can be replicated across an IP site link, and
Exchange Server 2010 uses IP site links to determine its routing topology.
The routing component of Exchange Server 2010 takes into account the cost
assigned to an IP site link when calculating a routing table. IP site-link
costs are used to calculate the least-cost routing path to the ultimate
destination for a message.
Every Active Directory site must be associated with at least one IP site
link and a single IP site link named DEFAULTIPSITELINK is implemented by
default. When you create an Active Directory site, you associate that site
to an IP site link and you can either create additional IP site links to
implement the desired topology or associate every Active Directory site with
the DEFAULTIPSITELINK site link. Each Active Directory site that is part of
an IP site link can communicate directly with every other site in that link
at a uniform cost.
Figure 1 shows a full
mesh topology that uses only the single default IP site link
DEFAULTIPSITELINK. Each site communicates directly with every other site by
using the same cost metric. Although more than one communication path is
configured, only a single IP site link is defined.
A hub-and-spoke topolgy requires additional site links. For example, in
Figure 2, four sites are connected
in this topology. The central site, Site A, can communicate directly with
each of the spoke sites, and the spoke sites can communicate with each other
through the central site.
Exchange uses site links when determining the least-cost path but will
always attempt to deliver messages directly to the destination Hub Transport
server. For example, if a user in Site B in the topology shown in Figure 7-18 sends a message to a user in
Site C, the Hub Transport server in Site B will connect directly to the Hub
Transport server in Site C. If you want to force messages to go through Site
A, you need to enable that site as a hub site.
2.3. Assigning Exchange Costs to Site Links
The default cost for a site link is 100. A valid site-link cost can be any
number from 1 through 99,999. If you specify more than one path, the link
with the lowest cost assignment is always preferred. You can assign an
Exchange-specific cost to an IP site link. If an Exchange cost is assigned to
an IP site link, it is used by Exchange Server 2010. Otherwise, the Active
Directory cost is used.
In most cases, existing IP site-link costs, based on network speeds, work
well for Exchange Server 2010 message routing. However, if costs and traffic
flow patterns are not optimal for Exchange traffic, you can assign Exchange
costs by using an EMS command based on the
Set-AdSiteLink cmdlet. For example, the following
command sets an Exchange cost of 1,000 on the IP site link LINK0304:
Set-AdSiteLink -Identity LINK0304 -ExchangeCost 1000
In Figure 3, messages
from Site 01 to Site 04 would normally be routed through Site 03 based on
Active Directory IP site-link costs. However, because the Exchange cost of
the IP site link between Site 03 and Site 04 has been set at 1,000, Exchange
will route messaging traffic from Site 01 to Site 04 through Site 02.
Adjusting IP site-link costs can be useful when the message routing
topology needs to diverge from the Active Directory replication topology.
You can use Exchange costs to force all messages to pass through a hub site.
You can also use Exchange costs to control situations where messages are
queued because communication to an Active Directory site fails or if a
network connection between sites is a low-bandwidth connection used only for
Active Directory replication.
2.4. Configuring Maximum Message Size on Site Links
By default, Exchange Server 2010 does not limit the size of messages that
are relayed between Hub Transport servers in different Active Directory
sites. If it becomes necessary to specify size limits because of traffic
considerations, you can use an EMS command based on the
Set-AdSiteLink EMS cmdlet to configure a maximum
message size on an Active Directory IP site link. For example, the following
command sets the maximum message size on the Active Directory IP site link
LINKAB to 1 gigabyte (GB):
Set-AdSiteLink -Identity LINKAB -MaxMessageSize 1GB
Exchange routing generates an NDR for any message that has a size larger
than the maximum message size limit configured on any Active Directory site
link in the least-cost routing path. You can use this
facility to restrict the size of messages sent to remote Active Directory
sites with low-bandwidth connections.
2.5. Implementing Hub Sites
Sometimes you want to ensure that all message delivery is relayed through
a particular Active Directory site, such as to comply with your Exchange
organization’s internal policies. You can use an EMS command based on
the Set-AdSite cmdlet to designate an Active Directory
site as a hub site. If a hub site exists along the least-cost routing path
for message delivery, the messages queue is processed by the Hub Transport
servers in the hub site before messages are relayed to their ultimate
destination. If several hub sites exist along the least-cost routing path,
messages stop at each hub site along that path.
The following command designates the Active Directory site MyADSite as a
hub site:
Set-AdSite -Identity MyADSite -HubSiteEnabled $true
2.6. Exchange 2010 Routing Tables
When the Microsoft Exchange Transport service starts, it calculates a set
of routing tables based on a snapshot of information retrieved from Active
Directory (or on an Edge Transport server from AD LDS). Routing tables
determine how messages are routed to recipients. When configuration changes
are made, the routing tables are rebuilt, and the new routing tables are
used to route incoming messages.
Exchange Server 2010 retrieves the following configuration data from
Active Directory and makes it available to the routing component on Hub
Transport servers:
Active Directory sites
Active Directory IP site links
Exchange servers and their relationship to Active Directory
sites
SMTP connectors
Non-SMTP connectors (these include delivery agent connectors,
Foreign connectors, and non-SMTP connectors hosted by Exchange
Server 2003)
Routing groups
Routing group connectors
Mailbox
stores
Public folder stores
Public folder hierarchies
Based on this data, the routing component of the Microsoft Exchange
Transport service populates routing tables. The routing table correlates the
data and maps the topology. This topology map contains the following
elements:
Linked connectors
map
This map identifies the Receive connectors on the local server
that are linked to the Send connector.
Server map
This contains all Exchange Server 2010 and Exchange Server
2007 Hub transport, Edge Transport, and Mailbox servers, in
addition to any Exchange Server 2003 servers in the
organization. The map includes the total cost to reach any
specific server.
Legacy server map
This contains all Exchange Server 2007 Hub Transport, Edge
Transport, and Mailbox servers, in addition to any Exchange
Server 2003 servers in the organization. The map includes the
total cost to reach any specific server.
Message Database (MDB)
map
This contains all MDBs in the organization and correlates the
distinguished name of each MDB to routing data that includes the
total cost to reach the server that hosts a specific MDB.
Active Directory site
map
This contains all Active Directory sites and a structure that
holds the least-cost routing path from the local site to every
other site. The map includes any hub sites along the least-cost
routing path. Each routing path hop also identifies all Hub
Transport servers on that site that will be used by the Enhanced
DNS component. DNS is discussed later in this lesson.
Routing groups map
This contains the total cost and first hop routing group
connector for the least-cost routing path from the Exchange 2010
routing group to each legacy routing group.
Send connectors
map
This identifies the Send connectors configured in the
organization and the source servers for each connector.
The information in the routing tables is logged to routing logs. These
logs are located by default in the C:\Program Files\Microsoft\Exchange
Server\V14\TransportRoles\Logs\Routing folder. A new log is generated every
time the routing tables are recalculated. If a Hub Transport server is
unable to contact Active Directory, routing decisions are based on the
currently cached data, even though that data may not be up to date.