1

We are using Azure Resource Manager(ARM) to create virtual machines. We have a scenario where we want a set of load-balanced VMs to be exposed both via Azure internet facing load balancer as well as Azure internal load balancer.

Can Azure NICs participate in multiple load balancers (preferably one internal and other external)?

Alternately, Is it possible to add multiple(two in this case) NICs to a VM and then associate these NICs with separate load balancers(one internal and other external)?

Gaurav
  • 895
  • 3
  • 14
  • 31

2 Answers2

1

Azure NICs can participate in (only) one external load-balancer and/or (only) one internal load-balancer.

With powershell,

$backendnic1 = New-AzureRmNetworkInterface -ResourceGroupName "Test-RG" -Name test-nic1-be -Location "West US" -Subnet $backendSubnet -LoadBalancerBackendAddressPool $lbExt.BackendAddressPools[0],$lbInt.BackendAddressPools[0]

However, note that LB rules on the external and internal load-balancers cannot use the same backend port.

As per a multi-NIC VM, only the primary NIC can be used in load-balancer backend pools. So, the first statement above remains true even for a multi-NIC VM.

  • Assuming you meant "Only primary IP configuration withtin a NIC". When a VM has multiple NICs, I think they all can be configured on different LB backendpools. – Thomas Jul 16 '20 at 20:06
0

One Azure VM can be associated with:

  • max one backend pool owned by an Internal Load Balancer
  • and also at the same time with max one backend pool owned by a Public Load Balancer. (It can be associated to either the same Network Interface of the VM, or to a different one.)

The "primary" Network Interface is not special in any way, all are treated equally.

One of possible configurations of an LB, the floating IP mode, does not support non-primary IP Configurations of a NIC.

kubanczyk
  • 5,184
  • 1
  • 41
  • 52