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/virtual-network/tutorial-create-route-table-portal.md
+60-70Lines changed: 60 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,44 +206,44 @@ Create a resource group with [az group create](/cli/azure/group) for all resourc
206
206
```azurecli-interactive
207
207
# Create a resource group.
208
208
az group create \
209
-
--name test-rg \
210
-
--location eastus2
209
+
--name test-rg \
210
+
--location eastus2
211
211
```
212
212
213
213
Create a virtual network with one subnet with [az network vnet create](/cli/azure/network/vnet).
214
214
215
215
```azurecli-interactive
216
216
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
222
222
```
223
223
224
224
Create two more subnets with [az network vnet subnet create](/cli/azure/network/vnet/subnet).
225
225
226
226
```azurecli-interactive
227
227
# Create a bastion subnet.
228
228
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
233
233
234
234
# Create a private subnet.
235
235
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
240
240
241
241
# Create a DMZ subnet.
242
242
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
247
247
```
248
248
249
249
### Create Azure Bastion
@@ -268,6 +268,7 @@ az network bastion create \
268
268
--vnet-name vnet-1 \
269
269
--public-ip-address public-ip-bastion \
270
270
--location eastus2
271
+
--no-wait
271
272
```
272
273
273
274
---
@@ -355,31 +356,18 @@ Create a VM to be used as the NVA in the *subnet-dmz* subnet with [az vm create]
355
356
356
357
```azurecli-interactive
357
358
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
366
367
```
367
368
368
369
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.
369
370
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):
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
-
383
371
---
384
372
385
373
## 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 `--
536
524
537
525
```azurecli-interactive
538
526
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
547
536
```
548
537
549
538
Create a VM in the *subnet-private* subnet.
550
539
551
540
```azurecli-interactive
552
541
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
560
550
```
561
551
---
562
552
@@ -610,9 +600,9 @@ Enable IP forwarding for the network interface of the **vm-nva** virtual machine
610
600
611
601
```azurecli-interactive
612
602
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
616
606
```
617
607
618
608
---
@@ -776,30 +766,30 @@ Create a route table with [az network route-table create](/cli/azure/network/rou
776
766
```azurecli-interactive
777
767
# Create a route table
778
768
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
781
771
```
782
772
783
773
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).
784
774
785
775
```azurecli-interactive
786
776
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
793
783
```
794
784
795
785
Associate the *route-table-subnet-public* route table to the *subnet-1* subnet with [az network vnet subnet update](/cli/azure/network/vnet/subnet).
0 commit comments