Skip to content

Commit f770fdc

Browse files
committed
fixes
1 parent 518bd37 commit f770fdc

File tree

1 file changed

+60
-70
lines changed

1 file changed

+60
-70
lines changed

articles/virtual-network/tutorial-create-route-table-portal.md

Lines changed: 60 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -206,44 +206,44 @@ Create a resource group with [az group create](/cli/azure/group) for all resourc
206206
```azurecli-interactive
207207
# Create a resource group.
208208
az group create \
209-
--name test-rg \
210-
--location eastus2
209+
--name test-rg \
210+
--location eastus2
211211
```
212212

213213
Create a virtual network with one subnet with [az network vnet create](/cli/azure/network/vnet).
214214

215215
```azurecli-interactive
216216
az network vnet create \
217-
--name vnet-1 \
218-
--resource-group test-rg \
219-
--address-prefix 10.0.0.0/16 \
220-
--subnet-name subnet-1 \
221-
--subnet-prefix 10.0.0.0/24
217+
--name vnet-1 \
218+
--resource-group test-rg \
219+
--address-prefix 10.0.0.0/16 \
220+
--subnet-name subnet-1 \
221+
--subnet-prefix 10.0.0.0/24
222222
```
223223

224224
Create two more subnets with [az network vnet subnet create](/cli/azure/network/vnet/subnet).
225225

226226
```azurecli-interactive
227227
# Create a bastion subnet.
228228
az network vnet subnet create \
229-
--vnet-name vnet-1 \
230-
--resource-group test-rg \
231-
--name AzureBastionSubnet \
232-
--address-prefix 10.0.1.0/24
229+
--vnet-name vnet-1 \
230+
--resource-group test-rg \
231+
--name AzureBastionSubnet \
232+
--address-prefix 10.0.1.0/24
233233
234234
# Create a private subnet.
235235
az network vnet subnet create \
236-
--vnet-name vnet-1 \
237-
--resource-group test-rg \
238-
--name subnet-private \
239-
--address-prefix 10.0.2.0/24
236+
--vnet-name vnet-1 \
237+
--resource-group test-rg \
238+
--name subnet-private \
239+
--address-prefix 10.0.2.0/24
240240
241241
# Create a DMZ subnet.
242242
az network vnet subnet create \
243-
--vnet-name vnet-1 \
244-
--resource-group test-rg \
245-
--name subnet-dmz \
246-
--address-prefix 10.0.3.0/24
243+
--vnet-name vnet-1 \
244+
--resource-group test-rg \
245+
--name subnet-dmz \
246+
--address-prefix 10.0.3.0/24
247247
```
248248

249249
### Create Azure Bastion
@@ -268,6 +268,7 @@ az network bastion create \
268268
--vnet-name vnet-1 \
269269
--public-ip-address public-ip-bastion \
270270
--location eastus2
271+
--no-wait
271272
```
272273

273274
---
@@ -355,31 +356,18 @@ Create a VM to be used as the NVA in the *subnet-dmz* subnet with [az vm create]
355356

356357
```azurecli-interactive
357358
az vm create \
358-
--resource-group test-rg \
359-
--name vm-nva \
360-
--image Ubuntu2204 \
361-
--public-ip-address "" \
362-
--subnet subnet-dmz \
363-
--vnet-name vnet-1 \
364-
--admin-username azureuser \
365-
--authentication-type password
359+
--resource-group test-rg \
360+
--name vm-nva \
361+
--image Ubuntu2204 \
362+
--public-ip-address "" \
363+
--subnet subnet-dmz \
364+
--vnet-name vnet-1 \
365+
--admin-username azureuser \
366+
--authentication-type password
366367
```
367368

368369
The VM takes a few minutes to create. Don't continue to the next step until Azure finishes creating the VM and returns output about the VM.
369370

370-
Within the VM, the operating system, or an application running within the VM, must also be able to forward network traffic. We use the `sysctl` command to enable the Linux kernel to forward packets. To run this command without logging onto the VM, we use the [Custom Script extension](/azure/virtual-machines/extensions/custom-script-linux) [az vm extension set](/cli/azure/vm/extension):
371-
372-
```azurecli-interactive
373-
az vm extension set \
374-
--resource-group test-rg \
375-
--vm-name vm-nva \
376-
--name customScript \
377-
--publisher Microsoft.Azure.Extensions \
378-
--settings '{"commandToExecute":"sudo sysctl -w net.ipv4.ip_forward=1"}'
379-
```
380-
381-
The command might take up to a minute to execute. This change won't persist after a VM reboot, so if the NVA VM is rebooted for any reason, the script will need to be repeated.
382-
383371
---
384372

385373
## Create public and private virtual machines
@@ -536,27 +524,29 @@ Create a VM in the *subnet-1* subnet with [az vm create](/cli/azure/vm). The `--
536524

537525
```azurecli-interactive
538526
az vm create \
539-
--resource-group test-rg \
540-
--name vm-public \
541-
--image Ubuntu2204 \
542-
--vnet-name vnet-1 \
543-
--subnet subnet-1 \
544-
--admin-username azureuser \
545-
--authentication-type password \
546-
--no-wait
527+
--resource-group test-rg \
528+
--name vm-public \
529+
--image Ubuntu2204 \
530+
--vnet-name vnet-1 \
531+
--subnet subnet-1 \
532+
--public-ip-address "" \
533+
--admin-username azureuser \
534+
--authentication-type password \
535+
--no-wait
547536
```
548537

549538
Create a VM in the *subnet-private* subnet.
550539

551540
```azurecli-interactive
552541
az vm create \
553-
--resource-group test-rg \
554-
--name vm-private \
555-
--image Ubuntu2204 \
556-
--vnet-name vnet-1 \
557-
--subnet subnet-private \
558-
--admin-username azureuser \
559-
--authentication-type password
542+
--resource-group test-rg \
543+
--name vm-private \
544+
--image Ubuntu2204 \
545+
--vnet-name vnet-1 \
546+
--subnet subnet-private \
547+
--public-ip-address "" \
548+
--admin-username azureuser \
549+
--authentication-type password
560550
```
561551
---
562552

@@ -610,9 +600,9 @@ Enable IP forwarding for the network interface of the **vm-nva** virtual machine
610600

611601
```azurecli-interactive
612602
az network nic update \
613-
--name vm-nvaVMNic \
614-
--resource-group test-rg \
615-
--ip-forwarding true
603+
--name vm-nvaVMNic \
604+
--resource-group test-rg \
605+
--ip-forwarding true
616606
```
617607

618608
---
@@ -776,30 +766,30 @@ Create a route table with [az network route-table create](/cli/azure/network/rou
776766
```azurecli-interactive
777767
# Create a route table
778768
az network route-table create \
779-
--resource-group test-rg \
780-
--name route-table-public
769+
--resource-group test-rg \
770+
--name route-table-public
781771
```
782772

783773
Create a route in the route table with [az network route-table route create](/cli/azure/network/route-table/route#az-network-route-table-route-create).
784774

785775
```azurecli-interactive
786776
az network route-table route create \
787-
--name to-private-subnet \
788-
--resource-group test-rg \
789-
--route-table-name route-table-public \
790-
--address-prefix 10.0.2.0/24 \
791-
--next-hop-type VirtualAppliance \
792-
--next-hop-ip-address 10.0.3.4
777+
--name to-private-subnet \
778+
--resource-group test-rg \
779+
--route-table-name route-table-public \
780+
--address-prefix 10.0.2.0/24 \
781+
--next-hop-type VirtualAppliance \
782+
--next-hop-ip-address 10.0.3.4
793783
```
794784

795785
Associate the *route-table-subnet-public* route table to the *subnet-1* subnet with [az network vnet subnet update](/cli/azure/network/vnet/subnet).
796786

797787
```azurecli-interactive
798788
az network vnet subnet update \
799-
--vnet-name vnet-1 \
800-
--name subnet-1 \
801-
--resource-group test-rg \
802-
--route-table route-table-public
789+
--vnet-name vnet-1 \
790+
--name subnet-1 \
791+
--resource-group test-rg \
792+
--route-table route-table-public
803793
```
804794

805795
---

0 commit comments

Comments
 (0)