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
Azure routes traffic between all subnets within a virtual network, by default. You can create your own routes to override Azure's default routing. The ability to create custom routes is helpful if, for example, you want to route traffic between subnets through a network virtual appliance (NVA). In this tutorial, you learn how to:
21
21
22
22
> [!div class="checklist"]
23
+
> * Create an NVA that routes traffic
23
24
> * Create a route table
24
25
> * Create a route
25
-
> * Create a virtual network with multiple subnets
26
26
> * Associate a route table to a subnet
27
-
> * Create an NVA that routes traffic
28
27
> * Deploy virtual machines (VM) into different subnets
29
28
> * Route traffic from one subnet to another through an NVA
30
29
31
30
If you prefer, you can finish this tutorial using the [Azure CLI](tutorial-create-route-table-cli.md) or [Azure PowerShell](tutorial-create-route-table-powershell.md).
32
31
33
32
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
34
33
35
-
## Create a route table
36
-
37
-
1. On the [Azure portal](https://portal.azure.com) menu or from the **Home** page, select **Create a resource**.
38
-
39
-
2. In the search box, enter *Route table*. When **Route table** appears in the search results, select it.
40
-
41
-
3. In the **Route table** page, select **Create**.
42
-
43
-
4. In **Create route table**, enter or select this information:
44
-
45
-
| Setting | Action |
46
-
| ------- | ----- |
47
-
| Name | Enter *myRouteTablePublic*. |
48
-
| Subscription | Select your subscription. |
49
-
| Resource group | Select **Create new**, enter *myResourceGroup*, and select **OK**. |
Network virtual appliances (NVAs) are virtual machines that help with network functions, such as routing and firewall optimization. You can select a different operating system if you want. This tutorial assumes you're using **Windows Server 2016 Datacenter**.
54
37
55
-
## Create a route
38
+
1. On the [Azure portal](https://portal.azure.com) menu or from the **Home** page, select **Create a resource**.
56
39
57
-
1.Go to the [Azure portal](https://portal.azure.com) to manage your route table. Search for and select **Route tables**.
40
+
1.Choose **Security** > **Windows Server 2016 Datacenter**.
58
41
59
-
1. Pick the name of your route table (**myRouteTablePublic**).
42
+

60
43
61
-
1.Choose **Routes**> **Add**.
44
+
1.In the **Create a virtual machine**window, under **Basics**, enter or select this information:
|| Image | Choose **Windows Server 2016 Datacenter**. |
54
+
|| Size | Keep the default, **Standard DS1 v2**. |
55
+
|**Administrator account**| Username | Enter a user name of your choosing. |
56
+
|| Password | Enter a password of your choosing, which must be at least 12 characters long and meet the [defined complexity requirements](../virtual-machines/windows/faq.md?toc=%2fazure%2fvirtual-network%2ftoc.json#what-are-the-password-requirements-when-creating-a-vm). |
57
+
|| Confirm Password | Enter your password again. |
58
+
|**Inbound port rules**| Public inbound ports | Pick **None**. |
59
+
|**Save money**| Already have a Windows Server license? | Pick **No**. |
60
+
61
+

64
62
65
-
1. In **Add route**, enter or select this information:
63
+
Then select **Next : Disks >**.
66
64
67
-
| Setting | Value |
68
-
| ------- | ----- |
69
-
| Route name |*ToPrivateSubnet*|
70
-
| Address prefix |*10.0.1.0/24*|
71
-
| Next hop type |**Virtual appliance**|
72
-
| Next hop address |*10.0.2.4*|
65
+
1. Under **Disks**, select the settings that are right for your needs, and then select **Next : Networking >**.
73
66
74
-
1.Select**OK**.
67
+
1.Under**Networking**:
75
68
76
-
## Associate a route table to a subnet
69
+
1. For **Virtual network**, select **Create new**.
70
+
71
+
1. In the **Create virtual network** dialog box, under **Name**, enter *myVirtualNetwork*.
77
72
78
-
Before you can associate a route table to a subnet, you have to create a virtual network and subnet.
73
+
1. In **Address space**, replace the existing address range with *10.0.0.0/16*.
79
74
80
-
### Create a virtual network
75
+
1. In **Subnets**, select the **Delete** icon to delete the existing subnet, and then enter the following combinations of **Subnet name** and **Address range**. Once a valid name and range is entered, a new empty row appears below it.
81
76
82
-
1. On the [Azure portal](https://portal.azure.com) menu or from the **Home** page, select **Create a resource**.
77
+
| Subnet name | Address range |
78
+
| ----------- | ------------- |
79
+
|*Public*|*10.0.0.0/24*|
80
+
|*Private*|*10.0.1.0/24*|
81
+
|*DMZ*|*10.0.2.0/24*|
83
82
84
-
1.Choose**Networking**> **Virtual network**.
83
+
1.Select**OK**to exit the dialog box.
85
84
86
-
1. In **Basics**, enter or select this information:
85
+
1. In **Subnet**, choose **Public (10.0.0.0/24)**.
87
86
88
-
| Setting | Value |
89
-
| ------- | ----- |
90
-
| Subscription | Your subscription |
91
-
| Resource group |**myResourceGroup**|
92
-
| Name |*myVirtualNetwork*|
93
-
| Region |**(US) East US**|
87
+
1. In **Public IP**, choose **None**, since the VM won't connect over the internet.
94
88
95
-
1. Select **Next : IP Addresses >**.
89
+
1. Select **Next : Management >**.
96
90
97
-
1.In**IP Addresses**, under **IPv4 address space**, enter *10.0.0.0/16*.
91
+
1.Under**Management**:
98
92
99
-
1. Under the **Subnet name**/**Subnet address range** table, choose **default**. Then in the **Add subnet** dialog box, change the **Subnet name** to *Public* and change **Subnet address range** to *10.0.0.0/24*. Finally, select **Save**.
93
+
1. In **Diagnostics storage account**, select **Create New**.
94
+
95
+
1. In the **Create storage account** dialog box, enter or select this information:
100
96
101
-
1. Select **Review + create**. Once you see the **Validation passed** message, select **Create** to create the new virtual network.
1. Select **Review + create**. You're taken to the **Review + create** page, and Azure validates your configuration.
104
107
105
-
1.Go to the [Azure portal](https://portal.azure.com) to manage your new virtual network. Search for and select **Virtual networks**.
108
+
1.When you see the **Validation passed** message, select **Create**.
106
109
107
-
1. Pick the name of your virtual network (**myVirtualNetwork**).
110
+
The VM takes a few minutes to create. Don't keep going until Azure finishes creating the VM. The **Your deployment is underway** page will show you deployment details.
108
111
109
-
1.Choose **Subnets** > **Subnet**.
112
+
1.When your VM is ready, select **Go to resource**.
1.On the [Azure portal](https://portal.azure.com) menu or from the **Home** page, select **Create a resource**.
114
117
115
-
| Setting | Value |
116
-
| ------- | ----- |
117
-
| Name |*Private*. |
118
-
| Address space (CIDR block) |*10.0.1.0/24*|
118
+
2. In the search box, enter *Route table*. When **Route table** appears in the search results, select it.
119
119
120
-
1. Leave the rest of the defaults and select **OK**.
120
+
3. In the **Route table** page, select **Create**.
121
121
122
-
1. Select**Subnet** again. This time, enter this information:
122
+
4. In**Create route table**, enter or select this information:
123
123
124
124
| Setting | Value |
125
125
| ------- | ----- |
126
-
| Name |*DMZ*|
127
-
| Address space (CIDR block) |*10.0.2.0/24*|
128
-
129
-
1. Like the last time, leave the rest of the defaults and select **OK**.
130
-
131
-
Azure shows the three subnets: **Public**, **Private**, and **DMZ**.
132
-
133
-
### Associate myRouteTablePublic to your Public subnet
134
-
135
-
1. In the virtual network's subnet list, choose **Public**.
136
-
137
-
1. In **Route table**, choose the route table you created (**myRouteTablePublic**), and then select **Save** to associate your route table to the *Public* subnet.
Network virtual appliances (NVAs) are virtual machines that help with network functions, such as routing and firewall optimization. You can select a different operating system if you want. This tutorial assumes you're using **Windows Server 2016 Datacenter**.
|**Administrator account**| Username | A user name of your choosing |
161
-
|| Password | A password of your choosing, which must be at least 12 characters long and meet the [defined complexity requirements](../virtual-machines/windows/faq.md?toc=%2fazure%2fvirtual-network%2ftoc.json#what-are-the-password-requirements-when-creating-a-vm)|
162
-
|| Confirm Password | Your password again |
163
-
|**Inbound port rules**| Public inbound ports |**None**|
164
-
|**Save money**| Already have a Windows Server license? |**No**|
140
+
1. Pick the name of your route table (**myRouteTablePublic**).
165
141
166
-
Then select **Next : Disks >**.
142
+
1. Choose **Routes** > **Add**.
167
143
168
-
1. Under **Disks**, select the settings that are right for your needs, and then select **Next : Networking >**.
1. Go to the [Azure portal](https://portal.azure.com) to manage your virtual network. Search for and select **Virtual networks**.
190
160
191
-
Then select **OK**.
161
+
1. Pick the name of your virtual network (**myVirtualNetwork**).
192
162
193
-
1.Select **Review + create**. You're taken to the**Review + create** page, and Azure validates your configuration.
163
+
1.In the virtual network's menu bar, choose**Subnets**.
194
164
195
-
1.When you see the **Validation passed** message, select**Create**.
165
+
1.In the virtual network's subnet list, choose**Public**.
196
166
197
-
The VM takes a few minutes to create. Don't keep going until Azure finishes creating the VM. The **Your deployment is underway** page will show you deployment details.
167
+
1. In **Route table**, choose the route table you created (**myRouteTablePublic**), and then select **Save** to associate your route table to the *Public* subnet.
198
168
199
-
1. When your VM is ready, select **Go to resource**.
Next, turn on IP forwarding for your new NVA virtual machine, *myVmNva*. When Azure sends network traffic to *myVmNva*, if the traffic is destined for a different IP address, IP forwarding sends the traffic to the correct location.
204
174
175
+
1. Go to the [Azure portal](https://portal.azure.com) to manage your VM. Search for and select **Virtual machines**.
176
+
177
+
1. Pick the name of your VM (**myVmNva**).
178
+
205
179
1. In your NVA virtual machine's menu bar, select **Networking**.
206
180
207
181
1. Select **myvmnva123**. That's the network interface Azure created for your VM. It will have a string of numbers to make it unique for you.
0 commit comments