You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/load-balancer/load-balancer-floating-ip.md
+36-43Lines changed: 36 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: load-balancer
5
5
author: mbender-ms
6
6
ms.service: azure-load-balancer
7
7
ms.topic: how-to
8
-
ms.date: 06/11/2024
8
+
ms.date: 04/16/2025
9
9
ms.author: mbender
10
10
ms.custom: template-how-to, engagement-fy23
11
11
---
@@ -50,37 +50,32 @@ In order to function, you configure the Guest OS for the virtual machine to rece
50
50
51
51
For each VM in the backend pool, run the following commands at a Windows Command Prompt on the server.
52
52
53
-
To get the list of interface names you have on your VM, type this command:
53
+
1.To get the list of interface names you have on your VM, enter this command:
54
54
55
-
```console
56
-
netsh interface ipv4 show interface
57
-
```
55
+
```console
56
+
netsh interface ipv4 show interface
57
+
```
58
+
2. For the VM NIC (Azure managed), enter the following command after replacing **interface-name** with the name of the interface you want to use:
58
59
59
-
For the VM NIC (Azure managed), type this command.
60
+
```console
61
+
netsh interface ipv4 set interface <interface-name> weakhostreceive=enabled
62
+
```
60
63
61
-
```console
62
-
netsh interface ipv4 set interface <interfacename> weakhostreceive=enabled
63
-
```
64
-
(replace **"interfacename"** with the name of this interface)
64
+
3. For each loopback interface you added, enter these commands after replacing **loopback-interface-name** with the name of the loopback interface and **floating-IP** and **floating-IPnetmask** with the appropriate values that correspond to the load balancer frontend IP:
65
65
66
-
For each loopback interface you added, repeat these commands:
netsh interface ipv4 set interface <loopbackinterfacename> weakhostreceive=enabled weakhostsend=enabled
71
-
```
72
-
(replace **loopbackinterfacename** with the name of this loopback interface and **floatingip** and **floatingipnetmask** with the appropriate values that correspond to the load balancer frontend IP)
71
+
4. Finally, if the guest host uses a firewall, ensure a rule set up so the traffic can reach the VM on the appropriate ports. This example configuration assumes a load balancer frontend IP configuration of 1.2.3.4 and a load balancing rule for port 80:
73
72
74
-
Finally, if the guest host uses a firewall, ensure a rule set up so the traffic can reach the VM on the appropriate ports.
75
-
76
-
This example configuration assumes a load balancer frontend IP configuration of 1.2.3.4 and a load balancing rule for port 80:
77
-
78
-
```console
79
-
netsh int ipv4 set int "Ethernet" weakhostreceive=enabled
80
-
netsh int ipv4 add addr "Loopback Pseudo-Interface 1" 1.2.3.4 255.255.255.0
81
-
netsh int ipv4 set int "Loopback Pseudo-Interface 1" weakhostreceive=enabled weakhostsend=enabled
For each VM in the backend pool, run the following commands via an SSH session.
92
87
93
-
To get the list of interface names you have on your VM, type this command:
88
+
1. To get the list of interface names you have on your VM, type this command:
94
89
95
-
```console
96
-
ip addr
97
-
```
98
-
For each loopback interface, repeat these commands, which assign the floating IP to the loopback alias:
90
+
```console
91
+
ip addr
92
+
```
99
93
100
-
```console
101
-
sudo ip addr add <floatingip>/<floatingipnetmask> dev lo:0
102
-
```
103
-
(replace **floatingip** and **floatingipnetmask** with the appropriate values that correspond to the load balancer frontend IP)
94
+
2. For each loopback interface you added, enter these commands after replacing **loopback-interface-name** with the name of the loopback interface and **floating-IP** and **floating-IPnetmask** with the appropriate values that correspond to the load balancer frontend IP:
104
95
105
-
Finally, if the guest host uses a firewall, ensure a rule set up so the traffic can reach the VM on the appropriate ports.
96
+
```console
97
+
sudo ip addr add <floating-IP>/<floating-IPnetmask> dev lo:0
98
+
```
106
99
107
-
This example configuration assumes a load balancer frontend IP configuration of 1.2.3.4 and a load balancing rule for port 80. This example also assumes the use of [UFW (Uncomplicated Firewall)](https://www.wikipedia.org/wiki/Uncomplicated_Firewall) in Ubuntu.
100
+
3. Finally, if the guest host uses a firewall, ensure a rule set up so the traffic can reach the VM on the appropriate ports. This example configuration assumes a load balancer frontend IP configuration of 1.2.3.4, a load balancing rule for port 80, and the use of [UFW (Uncomplicated Firewall)](https://www.wikipedia.org/wiki/Uncomplicated_Firewall) in Ubuntu.
108
101
109
-
```console
110
-
sudo ip addr add 1.2.3.4/24 dev lo:0
111
-
sudo ufw allow 80/tcp
112
-
```
102
+
```console
103
+
sudo ip addr add 1.2.3.4/24 dev lo:0
104
+
sudo ufw allow 80/tcp
105
+
```
113
106
</details>
114
107
115
108
## <a name = "limitations"></a>Limitations
116
109
117
110
- With Floating IP enabled on a load balancing rule, your application must use the primary IP configuration of the network interface for outbound.
118
-
- If your application binds to the frontend IP address configured on the loopback interface in the guest OS, Azure's outbound won't rewrite the outbound flow, and the flow fails. Review [outbound scenarios](load-balancer-outbound-connections.md).
119
-
- You can't use Floating IP on secondary IP configurations for Load Balancing scenarios. This limitation doesn't apply to Public load balancers where the secondary IP configuration is IPv6 an part of a dual-stack configuration or to architectures that utilize a NAT Gateway for outbound connectivity.
111
+
- If your application binds to the frontend IP address configured on the loopback interface in the guest OS, Azure's outbound connection doesn't rewrite the outbound flow, and the flow fails. Review [outbound scenarios](load-balancer-outbound-connections.md).
112
+
- You can't use Floating IP on secondary IP configurations for Load Balancing scenarios. This limitation doesn't apply to Public load balancers where the secondary IP configuration is IPv6 and part of a dual-stack configuration, or to architectures that utilize a NAT Gateway for outbound connectivity.
0 commit comments