Assigning Static IP Address For Database Availability Group…

MS Exchange

Database Availability Group (DAG) uses an IP address assigned by a DHCP server by default. Please check my previous articles about configuring DAG and points to note if you are not familiar with DAG. You can use the exchange console or the shell to configure the properties of a DAG, including the witness server and directory used by the DAG. The shell enables you to configure the DAG properties that are not available in the console. As an administrator, you can assign a static IP address for the DAG, though it is not a requirement. DAG doesn’t really care as long as it has an IP address and the name of the DAG is resolvable. The DAG name is not used by users or admins anyway. It is only used by the system for internal communication.

To find the current ip address of the DAG, run the command

Get-DatabaseAvailabilityGroup -identity "dagname" | fl *ip*

Get DAG IP

To configure a static IP address (say 192.168.1.104) for the DAG, run

Set-DatabaseAvailabilityGroup -identity "dagname" -DatabaseAvailabilityGroupIpAddress 192.168.1.104

DAG Static IP

If you have a DAG that spans multiple subnets (for high availability), you can configure multiple ip addresses for the DAG. To configure multiple ip addresses, run

Set-DatabaseAvailabilityGroup -identity "dagname" -DatabaseAvailabilityGroupIpAddress 192.168.1.104, 192.168.2.104

Other Popular Articles


MS Exchange

Scripting Agent Initialization Failed: “File is not found” Error During Exchange 2016 Setup

MS Exchange

EAC Access While Co-Existing Exchange 2013 With 2010

MS Exchange

Delete All Calendar Entries In An Exchange 2010 Mailbox

10 thoughts on “Assigning Static IP Address For Database Availability Group…”

  1. Hi!
    Thank you for the post.

    If you have servers in multiple sites (hence at least two IP-addresses) – which site should the DNS-record for the “dagname” be pointing to (since you only have one name and two IP-addresses…).

    Reply
    • Hi Manne,

      Depending on which site owns the site, Exchange will automatically change the IPs back and forth. All you need to do is add both the IPs and Exchange will take care of the rest.

      Reply

Leave a Comment