Thursday, September 13, 2012

Availability Group Listener's IP address keeps changing between Online and Offline address

I've been testing Multi-Subnet Availability Groups and I ran into a peculiar situation which I hadn't experienced before; the IP address kept flipping between the offline and online IP address for the resource.

I was a little perplexed, I had tested Multi-Subnet AGs on our old Colocation, and was now testing it with our new (and improved) colo. I tried lots of things, but it came down to one cluster resource setting for my AG... RegisterAllProvidersIP.

When this setting is set to 1, any IP address that is associated with the clustered resource. As shown below:

This means that dns will return either IP address, and your client could fail connecting if the offline IP address is returned by DNS after the TTL timer expires.

By setting RegisterAllProvidersIP to 0, only the online IP address is registered. Success!!