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-cli.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Azure automatically routes traffic between all subnets within a virtual network,
25
25
* Create a route
26
26
* Create a virtual network with multiple subnets
27
27
* Associate a route table to a subnet
28
-
* Create an NVA that routes traffic
28
+
* Create a basic NVA that routes traffic from an Ubuntu VM
29
29
* Deploy virtual machines (VM) into different subnets
30
30
* Route traffic from one subnet to another through an NVA
31
31
@@ -112,9 +112,9 @@ az network vnet subnet update \
112
112
113
113
## Create an NVA
114
114
115
-
An NVA is a VM that performs a network function, such as routing, firewalling, or WAN optimization.
115
+
An NVA is a VM that performs a network function, such as routing, firewalling, or WAN optimization. We will create a basic NVA from a general purpose Ubuntu VM, for demonstration purposes.
116
116
117
-
Create an NVA in the *DMZ* subnet with [az vm create](/cli/azure/vm). When you create a VM, Azure creates and assigns a network interface *myVmNvaVMNic* and a public IP address to the VM, by default. The `--public-ip-address ""` parameter instructs Azure not to create and assign a public IP address to the VM, since the VM doesn't need to be connected to from the internet. If SSH keys do not already exist in a default key location, the command creates them. To use a specific set of keys, use the `--ssh-key-value` option.
117
+
Create a VM to be used as the NVA in the *DMZ* subnet with [az vm create](/cli/azure/vm). When you create a VM, Azure creates and assigns a network interface *myVmNvaVMNic* and a public IP address to the VM, by default. The `--public-ip-address ""` parameter instructs Azure not to create and assign a public IP address to the VM, since the VM doesn't need to be connected to from the internet. If SSH keys do not already exist in a default key location, the command creates them. To use a specific set of keys, use the `--ssh-key-value` option.
118
118
119
119
```azurecli-interactive
120
120
az vm create \
@@ -138,7 +138,7 @@ az network nic update \
138
138
--ip-forwarding true
139
139
```
140
140
141
-
Within the VM, the operating system, or an application running within the VM, must also be able to forward network traffic. Enable IP forwarding within the VM's operating system with[az vm extension set](/cli/azure/vm/extension):
141
+
Within the VM, the operating system, or an application running within the VM, must also be able to forward network traffic. We will use the `sysctl` command to enable the Linux kernel to forward packets. To run this command without logging onto the VM, we will use the [Custom Script extension](/azure/virtual-machines/extensions/custom-script-linux)[az vm extension set](/cli/azure/vm/extension):
The command may take up to a minute to execute. Note that this change will not persist after a VM reboot, so if the NVA VM is rebooted for any reason, the script will need to be repeated.
153
153
154
154
## Create virtual machines
155
155
@@ -203,7 +203,7 @@ Take note of the **publicIpAddress**. This address is used to access the VM from
203
203
204
204
## Route traffic through an NVA
205
205
206
-
Use the following command to create an SSH session with the *myVmPrivate* VM. Replace *\<publicIpAddress>* with the public IP address of your VM. In the example above, the IP address is *13.90.242.231*.
206
+
Using an SSH client of your choice, connect to the VMs created above. For example, the following command can be used from a command line interface such as [WSL](/windows/wsl/install) to create an SSH session with the *myVmPrivate* VM. Replace *\<publicIpAddress>* with the public IP address of your VM. In the example above, the IP address is *13.90.242.231*.
207
207
208
208
```bash
209
209
ssh azureuser@<publicIpAddress>
@@ -214,13 +214,10 @@ When prompted for a password, enter the password you selected in [Create virtual
214
214
Use the following command to install trace route on the *myVmPrivate* VM:
215
215
216
216
```bash
217
-
sudo apt-get update
218
-
sudo apt-get upgrade
219
-
sudo apt-get install traceroute
217
+
sudo apt update
218
+
sudo apt install traceroute
220
219
```
221
220
222
-
223
-
224
221
Use the following command to test routing for network traffic to the *myVmPublic* VM from the *myVmPrivate* VM.
0 commit comments