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*
To configure a static IP address (say 192.168.1.104) for the DAG, run
Set-DatabaseAvailabilityGroup -identity "dagname" -DatabaseAvailabilityGroupIpAddress 192.168.1.104
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
Why isn’t a computer object and DNS good enough for the DAG? Why does it also require IP addresses?
Hi RoSiers,
The newer versions of DAG can work without an IP address. What version of Windows are you running the DAG on?
Thanks
We have 2 db servers in one site and 1 in another do we just need one IP in each site or one for each server?
Hi Michael,
If both the sites are in different subnets, then you will need an IP from each subnet in the DAG. It is not per server, but per subnet.
Hope that clarifies.
Thanks
HI Rajith,
While changing DAG IP address from dhcp to static in production, we need any downtime ?
Thanks
Devi
Hi Devi,
No downtime as such is required, although I would encourage you to do it out of hours.
Usefull Informations….
Thanks Luke.
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…).
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.