Skip to content

Commit 0776f8e

Browse files
author
Michael Bender
committed
Update CLI
1 parent 0ec2ea0 commit 0776f8e

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

articles/load-balancer/configure-inbound-NAT-rules-vm-scale-set.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ In this article you'll learn how to configure, update, and delete inbound NAT Ru
1515

1616
## Prerequisites
1717

18-
- A running instance of [Azure Load Balancer](quickstart-load-balancer-standard-public-portal.md).
19-
- A [Virtual Machine Scale Set instance](configure-vm-scale-set-portal.md) in the backend pool of the running load balancer.
18+
- A standard SKU [Azure Load Balancer](quickstart-load-balancer-standard-public-portal.md) in the same subscription as the Virtual Machine Scale Set.
19+
- A [Virtual Machine Scale Set instance](configure-vm-scale-set-portal.md) in the backend pool of the load balancer.
2020
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2121

2222
## Add inbound NAT rules
@@ -28,16 +28,16 @@ The new inbound NAT rule shouldn't have an overlapping front-end port range with
2828

2929
```azurecli
3030
31-
az network lb inbound-nat-rule create
32-
-g MyResourceGroup
33-
--lb-name MyLb
34-
-n MyNatRule
35-
--protocol TCP
36-
--frontend-port-range-start 200
37-
--frontend-port-range-end 250
38-
--backend-port 22
39-
--backend-pool-name mybackend
40-
--frontend-ip-name MyFrontendIp
31+
az network lb inbound-nat-rule create \
32+
--resource-group MyResourceGroup \
33+
--name MyNatRule \
34+
--lb-name MyLb \
35+
--protocol TCP \
36+
--frontend-port-range-start 200 \
37+
--frontend-port-range-end 250 \
38+
--backend-port 22 \
39+
--backend-pool-name mybackend \
40+
--frontend-ip-name MyFrontendIp
4141
4242
```
4343

@@ -46,12 +46,11 @@ When using inbound NAT rules with Virtual Machine Scale Sets, Individual inbound
4646

4747
```azurecli
4848
49-
az network lb inbound-nat-rule update
50-
-g MyResourceGroup
51-
--lb-name MyLb
52-
53-
-n MyNatPool
54-
--frontend-port-range-start 150
49+
az network lb inbound-nat-rule update \
50+
--resource-group MyResourceGroup \
51+
--name MyNatPool \
52+
--lb-name MyLb \
53+
--frontend-port-range-start 150 \
5554
--frontend-port-range-end 250
5655
5756
```
@@ -61,7 +60,7 @@ When using inbound NAT rules with Virtual Machine Scale Sets, Individual inbound
6160

6261
```azurecli
6362
64-
az network lb inbound-nat-rule delete -g MyResourceGroup --lb-name MyLb -n MyNatRule
63+
az network lb inbound-nat-rule delete --resourcegroup MyResourceGroup --name MyNatRule --lb-name MyLb
6564
6665
```
6766

@@ -70,26 +69,26 @@ az network lb inbound-nat-rule delete -g MyResourceGroup --lb-name MyLb -n MyNat
7069
Multiple inbound NAT rules can be attached to a single Virtual Machine Scale Set, given that the rules frontend port ranges aren’t overlapping. This is accomplished by having multiple inbound NAT rules that target the same backend pool. A full example using the CLI is shown.
7170

7271
```azurecli
73-
az network lb inbound-nat-rule create
74-
-g MyResourceGroup
75-
--lb-name MyLb
76-
-n MyNatRule
77-
--protocol TCP
78-
--frontend-port-range-start 200
79-
--frontend-port-range-end 250
80-
--backend-port 22
81-
--backend-pool-name mybackend
72+
az network lb inbound-nat-rule create \
73+
--resource-group MyResourceGroup \
74+
--name MyNatRule \
75+
--lb-name MyLb \
76+
--protocol TCP \
77+
--frontend-port-range-start 200 \
78+
--frontend-port-range-end 250 \
79+
--backend-port 22 \
80+
--backend-pool-name mybackend \
8281
--frontend-ip-name MyFrontendIp
8382
84-
az network lb inbound-nat-rule create
85-
-g MyResourceGroup
86-
--lb-name MyLb
87-
-n MyNatRule2
88-
--protocol TCP
89-
--frontend-port-range-start 150
90-
--frontend-port-range-end 180
91-
--backend-port 80
92-
--backend-pool-name mybackend
83+
az network lb inbound-nat-rule create \
84+
--resource-group MyResourceGroup \
85+
--name MyNatRule2 \
86+
--lb-name MyLb \
87+
--protocol TCP \
88+
--frontend-port-range-start 150 \
89+
--frontend-port-range-end 180 \
90+
--backend-port 80 \
91+
--backend-pool-name mybackend \
9392
--frontend-ip-name MyFrontendIp
9493
9594
```

0 commit comments

Comments
 (0)