Skip to content

Commit b639116

Browse files
authored
Merge pull request #189375 from thisisanniefang/patch-17
Add NIC IP config chaining instructions
2 parents a446bb9 + 97456a4 commit b639116

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

articles/load-balancer/tutorial-gateway-cli.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,32 @@ Use [az network lb frontend-ip update](/cli/azure/network/lb/frontend-ip#az_netw
252252
253253
```
254254

255+
## Chain virtual machine to Gateway Load Balancer
256+
257+
Alternatively, you can chain a VM's NIC IP configuration to the gateway load balancer.
258+
259+
You'll add the gateway load balancer's frontend to an existing VM's NIC IP configuration.
260+
261+
Use [az network lb frontend-ip show](/cli/azure/network/lb/frontend-ip#az_az_network_lb_frontend_ip_show) to place the resource ID of your gateway load balancer frontend into a variable.
262+
263+
Use [az network lb frontend-ip update](/cli/azure/network/nic/ip-config#az-network-nic-ip-config-update) to chain the gateway load balancer frontend to your existing VM's NIC IP configuration.
264+
265+
```azurecli-interactive
266+
feid=$(az network lb frontend-ip show \
267+
--resource-group TutorGwLB-rg \
268+
--lb-name myLoadBalancer-gw \
269+
--name myFrontend \
270+
--query id \
271+
--output tsv)
272+
273+
az network nic ip-config update \
274+
--resource-group MyResourceGroup
275+
--nic-name MyNIC
276+
--name MyIPconfig
277+
--gateway-lb $feid
278+
279+
```
280+
255281
## Clean up resources
256282

257283
When no longer needed, you can use the [az group delete](/cli/azure/group#az_group_delete) command to remove the resource group, load balancer, and the remaining resources.

0 commit comments

Comments
 (0)