How to change IP Addresses in an Always On Availability group.

In this blog post, let’s see how to change all the IP addresses involved in a typical Always on Availability group configuration. In my setup, I have an AG with two replicas and a listener. See below to get an idea of my current environment on which I am going to change all the underlying IP addresses.

1

2

Okay, so there you have it. Two IPs for my two nodes, One IP for my windows cluster and one IP for my availability group listener. Nothing fancy really….I am using host names in my endpoints, no dedicated IPs in my case.

Step 1: Change the IP addresses of both replicas.
For W16SQL2019A node, I am changing IP address from 192.168.1.182 to 192.168.1.151.
For W16SQL2019B node, I am changing IP address from 192.168.1.182 to 192.168.1.152.

Go to the NIC on the respective nodes and make the change, very straight forward.

3_node1IP

4

Step 2 : Change windows cluster core resource IP (Am changing from 192.168.1.185 to 192.168.1.153)
5

Right click, Go to properties and edit the IP address as shown below.

6

7

8

Well, That’s a nice little warning, once this is done, check the core cluster resource status and bring it online if it is in offline status at this point. Moving on…

Step 3: Change the IP address of the Always on availability group listener. (Am changing from 192.168.1.186 to 192.168.1.154)

Go to the AG in failover cluster manager, locate the server name in the bottom pane, right click and go to properties and change the static IP address as needed as shown below.

9 

10

Verify health status and validate in SSMS….
12

There we go, we have successfully changed the IP address of our Always on Availability group.

Things to remember:

  • Expect nodes loosing connectivity with each other when changing IP addresses and going offline as a result in Cluster.
  • The process remains same even if you are moving to a different subnet, Just make sure all the IPs involved are changed reflecting new subnet and cluster resource and all other things are showing online.
  • If you are using dedicated NICs for AOAG traffic, you should change the IP addresses for your Endpoints as well on all the replicas.


One thought on “How to change IP Addresses in an Always On Availability group.

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.