Does the Windows Failover Cluster for a multi-subnet SQL Server
Availability Group require a static IP entry for each subnet?
The CNO will require an IP address for every subnet it could reside in.
I am running SQL Server 2012 on Windows Server 2012 Hyper V VMs in 2
separate subnets in the same domain. I understand that I will need an
IP from each subnet when I create the listener for my AAG. What I am
unclear on is the configuration of IPs on the underlying Windows
Failover Cluster.
For the underlying WSFC you'll need at a minimum:
Node1 - IP Address for each unique subnet for each network interface
Node2 - IP Address for each unique subnet for each network interface
CNO - IP Address for each unique subnet
EX: 2 nodes, 2 subnets, 1 interface per node, subnets 192.168.1.1/24 and 192.168.2.1/24
Node1: 192.168.1.10
Node2: 192.168.2.10
CNO: 192.168.1.20, 192.168.2.20
Also, if the server hosting the secondary replica does require its own
IP, does it also require its own unique cluster name (and can you
explain why this is necessary)?
I'm not sure I understand this part of the question. All of the resources can only belong to a single cluster - there is no cluster inside of a cluster thing.
Edit - I looked at the link that you posted and I'm not sure why the author stated "•Cluster name for each node". My only guess is they meant each node needs a name and IP (for the node). Otherwise it's not a correct statement, the author should probably be contacted.
The simplest answer is, no, you won't be able to facilitate this with a 3 node cluster in the manner described.
The reason is due to quorum. Assuming the 3 nodes, 2 at Primary and 1 at DR with Windows Server 2012R2. Dynamic quorum is on by default, this will automatically adjust node weights in case of a node failure. Dynamic witness is also on by default which will change the witness vote to keep the number of total votes odd.
The thing is that dynamic quorum only works if less than half of the nodes go down simultaneously. If 50% or more voting nodes go down at once there won't be enough voters left to keep quorum or for dynamic quorum to decide that this isn't a split brain scenario.
How could you potentially achieve this?
If it would be possible to put 2 nodes at the Primary site, 2 nodes at the DR site, and a witness at a 3rd site then it should do what you're looking for.
is there any way to configure this in a way which automatic failover will occur if the primary and DR sites lose connectivity or if the primary site goes down entirely?
These look the same from the perspective of the DR site. Whether it loses connection with the servers at the primary site or whether the primary site goes down doesn't look any different. In each case they no longer can "see" the other nodes, only the local ones. This results in the race to acquire the lock on the witness. Whichever side attains the lock first, wins.
There is an additional setting in Windows Server 2012R2 called LowerQuorumPriorityNodeID
which can be used to weight one side or the other when these types of situations happen.
Best Answer
There are a few things going on in your question. To start I presume you are referring to an Always On Availability Group, just to be clear. You shared a link about multi-subnet failover.
Multi-subnet failovers are a feature, not a requirement. So the two nodes in your data center don't need to be on different subnets. Even when you go to San Jose later, it depends on if the subnet is "stretched" there whether you even need to worry about multi-subnet failover or not.
There are also various network connections involved in an Always On Availability Group.
At the very least there needs to be a public Network that all the nodes can see each other on and receive traffic from the outside on. You could setup with just this one network. You can be, as your link indicates , on separate subnets, but if you are on one? That makes life easier.
You can also add (and I say should) other networks if you don't then this one public network handles all of the functions:
Cluster Communications/Heartbeat - this is a network where the windows cluster nodes can send heartbeat traffic. These don't need to communicate on the public network and just need to be routable to one another.
SQL Server Availability Group Replication Network - The Availability Group replicas talk to each other over a network. You don't have to configure a separate network, but many environments prefer to segregate their traffic to a network that only has this replication traffic. These NICs would not need to speak to the public or rest of the netowrk, and just need to be routable to each other.
You didn't ask about those extra networks, and it seemed like you were just talking about the public network, but I wanted to throw a few thoughts out.