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.
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.
Step 2 : Change windows cluster core resource IP (Am changing from 192.168.1.185 to 192.168.1.153)
Right click, Go to properties and edit the IP address as shown below.
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.
Verify health status and validate in SSMS….
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.”