Microsoft Exchange and Blackberry Server Specialists

Load balancing: Prepare Exchange 2010 Server

On This Page

  • Introduction
  • Static ports for the RPC Client Access Server
  • Static Ports for RPC Client Access Service
  • RPC CAS Array Configuration
  • Web Services Changes
  • Introduction

    If you are going to use an external load balancer with Exchange 2010, then you have two main options, depending on what the load balancer supports.

    1. Use dynamic ports.
    2. Configure static ports.

    Once you have made that decision, then there are a number of steps that are required:

    1. Configure the static ports
    2. Configure the RPC CAS Array
    3. Adjust the clients to use the RPC CAS Array
    4. Adjust Exchange to use a generic host name for web services
    5. Implement the load balancer.

    These configuration changes can also apply if you need to get Exchange to communicate through internal firewalls.

    The most common configuration is to use static ports, which means modifying the Exchange configuration.

    These instructions apply to Exchange 2010 SP2 and later.

    Static Ports for the RPC Client Access Service

    The RPC CAS functionality communicates through port 135 and a dynamic port between 6005 and 59530. Therefore when you are setting the static ports you need to avoid this range. The guidance from Microsoft is to use a port between 59531 and 60554.

    Two services need to have static ports set:

    • MAPI Connections
    • Address Book Service

    Static Port for MAPI Connections

    This is a registry change on the server and should be made on all CAS role holders in the site.

    1. Open regedit and open the following key:

      HKEY_LOCAL_Machine, \ System \ CurrentControlSet \ Services \ MSEXCHANGERPC
       
    2. Create a new key called ParametersSystem (no space) if it isn't already present.
    3. Create a new REG_DWORD value called "TCP/IP Port"
    4. Assign a Decimal value for the port that you want to use.
    5. Close the registry editor and restart the Microsoft Exchange RPC Client Access Service

      This example registry change sets the value to 59560

    Static port for Address Book Service

    Another registry change on the server, again all CAS role holders in the site.

    1. Open regedit and open the following key:

      HKEY_LOCAL_Machine, \ System \ CurrentControlSet \ Services \ MSEXCHANGEAB
       

    2. Create a new key called Parameters
    3. Create a new String (REG_SZ) value called RpcTcpPort
    4. Enter the port number that you want to use - this should be different to the port for MAPI connections.
    5. Close the registry editor and restart the Microsoft Exchange Address Book Service

      This example registry change sets the value to 59561

    Confirm the changes are active

    To confirm the changes are active, start a command prompt and type

    netstat -an -p tcp | find /i "listening" | findstr 59560

    and repeat for the other ports.

    If you run this command:

    netstat -ano -p tcp | find /i "listening" | findstr 59560

    It will also show you the Process ID (PID) - then use Task Manager with PID's displayed (Show Columns command) to confirm the correct service is listening.

    Public Folder Access

    If you want to assign public folder access a static port as well, then you need to make the same change for MAPI connections, but on the servers with the Public Folder database. If you put that port through a load balancer then it should be a 1:1 mapping to a single server only, as the clients cannot connect to another public folder database on another server automatically.

    RPC CAS Array Configuration

    The RPC CAS Array is effectively a virtual Exchange server and exists in DNS only. It takes minutes to setup, and is best configured right at the start of your Exchange installation before any mailboxes are moved to the server. If it is setup after clients are using Exchange 2010 then you have to touch each client to get them to use the RPC CAS Array address - they will not start using it automatically.

    1. Configure the DNS Entry.
      The first step should be to configure the DNS entry for the CAS Array address.
      This is an internal ONLY DNS entry, it should not resolve externally. The common convention for the host name is Outlook.
      Therefore create a new A record in your internal DNS, called "outlook" and set it with the IP address of your existing Exchange 2010 server with the CAS role installed. DO NOT configure it with the load balancer address until you are satisfied it is working correctly.
      Once created, choose View, Advanced and then open the properties of the A record again and change the TTL time to 30 minutes. (0:0:30:0).
       
    2. Create the Exchange RPC CAS Array.
      To create the array in Exchange use the following command:

      New-ClientAccessArray –Name “HQ CAS Array” –Fqdn “outlook.domain.local” –Site “HQ”

      Each CAS Array should be unique to the AD site. The "Name" can be anything - the FQDN shoudl be the host that you created in step one and the Site is the AD site the Exchange server is in. If you haven't touched the AD site configuration (in AD Sites and Services) then the default name is "Default_First_Site_Name".
       
    3. Configure the Exchange databases to use the RPC CAS Array
      The final step on the Exchange server is to adjust the database configuration to use the RPC CAS Array address instead. This also changes what Autodiscover pushes out to the clients during a new profile configuration, so will be effective immediately.

      get-mailboxserver -identity servername | get-mailboxdatabase | Set-MailboxDatabase –RPCClientAccessServer outlook.domain.local

      This command sets the same value on all databases on the server.

    Client Changes

    Before the load balancer can be used, all clients need to be using the RPC CAS array address.
    If you have implemented this before you moved mailboxes to Exchange 2010 then they will use it from the start.
    However if this is a post implementation change then you will have to touch each client.
    This means going to every installation of Outlook and repairing the profile. This will change the Exchange server name from the actual address of the Client Access role server, to the RPC CAS Array name. Until this change is made, the clients will continue to connect directly to the CAS role, even after the load balancer has been implemented.

    Web Services Changes

    To complete the implementation, you need to adjust how Exchange uses web services. This usually means switching to a generic URL - a change that is encouraged as SSL vendors will shortly not issue SSL certificates to internal server names.
    These changes have to be made in a number of places, and full details on the process are outlined in our web services and other client access host name guide.

    More Information

    Static RPC Ports on an Exchange 2010 Client Access Server: http://social.technet.microsoft.com/wiki/contents/articles/864.configure-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx