I want to access my VM (the SQL Server instance to be specific) via 2 different IP addresses, one for internal use and one specific IP requested by a client that they will use. In my virtual network I need 2 different address spaces because the IP's are far apart. I also need 2 subnets then as far as I know (subnet A and subnet B).
In my internal load balancer I added both IP's (in different subnets) as frontend IP's, and added a rule to forward the traffic to my SQL Server VM instance (which is in subnet A). The rules are for different ports, but SQL Server is listening on both ports so the port thing works.
However...I can't connect via the 2nd (client requested IP), even if I switch the ports around, so it is the IP itself that's causing issues, perhaps because it is in subnet B and the VM is in subnet A? that would make sense because the first IP that is in the address space of subnet A does work?
In my load balancer rule I can specify the target VM and network adapater for both rules, so I would think the 2 subnets wouldn't be a problem.
My configuration -------
1 (internal) loadbalancer:
frontend IP's:
10.4.2.250 (in subnet A, and addressspace 1)
172.4.2.1 (in subnet B, and addressspace 2)
Backendpools (1 pool):
1 VM, in subnet A
Healthprobes (1 probe):
1 probe, TCP port 1440
Load balancing rules:
TCP 1440 to backendpool port 1440 with probe 1440
TCP 1450 to backendpool port 1450 with probe 1440
My MSSQL instance is configured via the Sql Server Configuration Manager > SQL Server Network Configuration > Protocols for MyInstance > TCP/IP properties
Protocol -> Enabled = Yes, Listen All = Yes
IP Addresses -> for all fields with 'TCP Port' = 1440,1450