Exchange 2013 configuration part 1. – DAG

DAG description

  • DAG is a forming block for site resilience and data loss prevention as it was in Exchange 2010
  • DAG can consist of 16 nodes forming a group, which protects data from DB, Server and site failures
  • Data protection is on database level (Multiple copies of the same database, where only one copy is active at the same time)
  • Database copy activation is maintained by “Active Manager” which runs on every Exchange server within DAG
  • Active Manager is a part of MS Exchange Replication service (MSExchangeRepl.exe)
  • Active Manager is repsonsible for switchover (moving active copy to another node hosting passive copy of DB) and failover (automatic move of all active DBs to another nodes in case of server failure)

How to manage DAG in Exchange 2013

We can use 2 ways of DAG management in Exchange 2013. Powershell and Exchange Administration Center (Exchange Management Console is not present anymore in Exchange 2013

DAG prerequisites

DAG is simple to be configured, however there are several things to consider before actual configuration:

  • Static IP addresses (If we are going to use static IP addresses, we should register DNS A record prior DAG configuration
  • File Share Witness location – FSW can be automatically configured (usually will be placed on HUB server if it doesnt have Mailbox role on it) or you can configure FSW on other domain server specified by you. FSW can be either placed on DC, which is not supported but possible configuration and it will be also my case, because on my LAB I have only 2xDC, 2x Exchange 2013 multirole server and 1x Exchange 2010 multirole server.
  • At least one replication network should be reserverd and it is recommended to have separate backup segment for mailbox database and system backup (in my case I will only have separate replication network and nodedicated backup network)

Creating DAG

  • DNS A record has been created witg E13DAG and pointing to DAG IP address
  • Replication network has been added to virtual machines and basic configuration was made (no default GW is needed)
  • Networks priority has been changed to order Production -> Replication -> Backup (if applicable) Open the Network and Sharing center ->Change adapter settings ->  Hold Alt key  and select advanced settings:

  • Witness Directory has been created on DC1 and DC2 servers c:FSWEX13DAG
  • DAG has been created by issuing the following command
New-DatabaseAvailabilityGroup -Name E13DAG -WitnessServer DC1 -WitnessDirectory C:FSWE13DAG1 -DatabaseAvailabilityGroupIPAddress
  • Adding nodes to DAG (this task will automatically install Failover clistering to Windows server hodting mailbox role for DAG. Failover Clustering is essential component for creating Active Manager and “Quorum” for DAG)
Add-DatabaseAvailabilityGroupServer -Identity E13DAG -MailboxServer FrontEnd1
  • After second node is added, go to your witness server and check if data has been written to WitnessDirectory. If yes, your FSW is configured correctly. If you have ODD (1,3,5,7..) number of nodes in the DAG, FSW will not be used (will stay empty or with the directory with the last timestapm, when DAG had EVEN number of nodes).

DAG Network configuration

DAG is set to automatic network configuration as default option. This means that we are not able to change any network settings for the DAG. To set DAG to manual mode we will use the following command:

Set-DatabaseAvailabilityGroup E13DAG -ManualDAGNetworkConfiguration $true

After DAG Network configuration is set to manual mode, we can create new DAG networks, assign subnets to them and then remove automatically configured networks from DAG assignment. We can specify which network to use efor clients and which for replication or keep it as default (both enabled for clients and replication)

  • Adding production (client or “MAPI” network with disabled replication)
New-DatabaseAvailabilityGroupNetwork E13DAG -Name Production
Set-DatabaseAvailabilityGroupNetwork E13DAGProd -Name Production -Description Production -ReplicationEnabled $false -Subnets
  • Adding replication network with disabled client access
New-DatabaseAvailabilityGroupNetwork E13DAG -Name Replication

Set-DatabaseAvailabilityGroupNetwork E13DAGRepl -Name Replication -Description Replication -ReplicationEnabled $true -Subnets
  • checking network configuration
Get-DatabaseAvailabilityGroupNetwork E13DAG* | fl

DAC mode setting, alternate FSW

This also stays the same as it was in Exchange 2010.  To activate DAC mode DAG must have more than 2 nodes! Note: The directories on WitnessServer and AlternateWitnessServer must be the same (Path, name, share)

Get-DatabaseAvailabilityGroup E13DAG | Set-DatabaseAvailabilityGroup -DatacenterActivationMode DAGOnly -AlternateWitnessDirectory c:FSWE13DAG -AlternateWitnessServer DC2

Gathering Active Manager status

Gathering Active Manager status works as same way as in Exchange 2010: Article is

Gathering DAG status

This is regular command but it is very important. There are a list of active nodes, nodes under maintenance etc. To gather this info we need to use parameter -Status.

Get-DatabaseAvailabilityGroup E13DAG -Status | fl

In next article I will describe Store differences btween Exchange 2010 and Exchange 2013


One thought on “Exchange 2013 configuration part 1. – DAG

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s