I want to setup the following with SQL Server 2014 Enterprise and Windows Server 2012 R2. I have two nodes and a fileshare for witness. Both are virtual machines in the same vsphere cluster. To minize the network traffic in our network, the network administrators told me to use a seperate, unrouted vlan for the mirroring of the databases in the AG with a seperate NIC.
Host1 (primary):
- NIC1 = 10.0.111.21 (routet, clientaccess)
- NIC2 = 10.0.211.21 (nonroutet, mirroring)
Host2 (secondary):
- NIC1 = 10.0.111.22 (routet, clientaccess)
- NIC2 = 10.0.211.22 (nonroutet, mirroring)
I have tried to use the second nic as the endpoints and wrote a custom create script:
:CONNECT Host1
CREATE ENDPOINT [Hadr_endpoint]
AS TCP (LISTENER_PORT = 5022, LISTENER_IP = (10.0.211.21))
FOR DATA_MIRRORING (ROLE = ALL, ENCRYPTION = REQUIRED ALGORITHM AES);
GO
:CONNECT Host2
CREATE ENDPOINT [Hadr_endpoint]
AS TCP (LISTENER_PORT = 5022, LISTENER_IP = (10.0.211.22))
FOR DATA_MIRRORING (ROLE = ALL, ENCRYPTION = REQUIRED ALGORITHM AES);
GO
After that I have created the AG:
:CONNECT Host1
CREATE AVAILABILITY GROUP [AG1]
WITH (AUTOMATED_BACKUP_PREFERENCE = SECONDARY)
FOR DATABASE [TestDB1]
REPLICA ON N'Host1' WITH (ENDPOINT_URL = N'TCP://10.0.211.21:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, BACKUP_PRIORITY = 50, SECONDARY_ROLE(ALLOW_CONNECTIONS = NO)),
N'Host2' WITH (ENDPOINT_URL = N'TCP://10.0.211.22:5022', FAILOVER_MODE = AUTOMATIC, AVAILABILITY_MODE = SYNCHRONOUS_COMMIT, BACKUP_PRIORITY = 50, SECONDARY_ROLE(ALLOW_CONNECTIONS = NO));
The script runs and runs and after 5 minutes I got the error, that the second host can't connect to the first to synchronizise.
Can anyone please help me to setup the ag in a different vlan?