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/network-watcher/diagnose-vm-network-routing-problem.md
+37-39Lines changed: 37 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,18 @@
2
2
title: 'Tutorial: Diagnose a VM network routing problem - Azure portal'
3
3
titleSuffix: Azure Network Watcher
4
4
description: In this tutorial, you learn how to diagnose a virtual machine network routing problem using the next hop capability of Azure Network Watcher.
#Customer intent: I want to diagnose virtual machine (VM) network routing problem that prevents communication to different destinations.
9
+
ms.date: 09/26/2023
10
+
11
+
#CustomerIntent: As an Azure administrator, I want to diagnose virtual machine (VM) network routing problem that prevents it from communicating with the internet.
13
12
---
14
13
15
14
# Tutorial: Diagnose a virtual machine network routing problem using the Azure portal
16
15
17
-
When you deploy a virtual machine (VM), Azure creates several [system default routes](/azure/virtual-network/virtual-networks-udr-overview#system-routes?toc=%2Fazure%2Fnetwork-watcher%2Ftoc.json&tabs=json) for it. You can create [custom routes](/azure/virtual-network/virtual-networks-udr-overview#custom-routes?toc=%2Fazure%2Fnetwork-watcher%2Ftoc.json&tabs=json) to override some of Azure's system routes. Sometimes, a custom route can result in a VM not being able to communicate with the intended destination. You can use Azure Network Watcher [next hop](network-watcher-next-hop-overview.md)capability to troubleshoot and diagnose the VM routing problem that's preventing it from correctly communicating with other resources.
16
+
In this tutorial, You use Azure Network Watcher [next hop](network-watcher-next-hop-overview.md)tool to troubleshoot and diagnose a VM routing problem that's preventing it from correctly communicating with other resources. Next hop shows you that the routing problem is caused by a [custom route](../virtual-network/virtual-networks-udr-overview.md#custom-routes).
18
17
19
18
In this tutorial, you learn how to:
20
19
@@ -26,21 +25,19 @@ In this tutorial, you learn how to:
26
25
> * Create a custom route
27
26
> * Diagnose a routing problem
28
27
29
-
If you prefer, you can diagnose a virtual machine network routing problem using the [Azure CLI](diagnose-vm-network-routing-problem-cli.md) or [Azure PowerShell](diagnose-vm-network-routing-problem-powershell.md)tutorials.
28
+
If you prefer, you can diagnose a virtual machine network routing problem using the [Azure CLI](diagnose-vm-network-routing-problem-cli.md) or [Azure PowerShell](diagnose-vm-network-routing-problem-powershell.md)versions of the tutorial.
30
29
31
30
## Prerequisites
32
31
33
32
- An Azure account with an active subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
34
33
35
-
## Sign in to Azure
36
-
37
-
Sign in to the [Azure portal](https://portal.azure.com).
38
-
39
34
## Create a virtual network
40
35
41
36
In this section, you create a virtual network.
42
37
43
-
1. In the search box at the top of the portal, enter *virtual networks*. Select **Virtual networks** in the search results.
38
+
1. Sign in to the [Azure portal](https://portal.azure.com).
39
+
40
+
1. In the search box at the top of the portal, enter ***virtual networks***. Select **Virtual networks** in the search results.
44
41
45
42
:::image type="content" source="./media/diagnose-vm-network-routing-problem/virtual-network-azure-portal.png" alt-text="Screenshot shows searching for virtual networks in the Azure portal.":::
46
43
@@ -50,9 +47,9 @@ In this section, you create a virtual network.
50
47
| --- | --- |
51
48
|**Project Details**||
52
49
| Subscription | Select your Azure subscription. |
53
-
| Resource Group | Select **Create new**. </br> Enter *myResourceGroup* in **Name**. </br> Select **OK**. |
50
+
| Resource Group | Select **Create new**. </br> Enter ***myResourceGroup*** in **Name**. </br> Select **OK**. |
54
51
|**Instance details**||
55
-
| Name | Enter *myVNet*. |
52
+
| Name | Enter ***myVNet***. |
56
53
| Region | Select **East US**. |
57
54
58
55
1. Select the **IP Addresses** tab, or select **Next: IP Addresses** button at the bottom of the page.
@@ -61,19 +58,19 @@ In this section, you create a virtual network.
61
58
62
59
| Setting | Value |
63
60
| --- | --- |
64
-
| IPv4 address space | Enter *10.0.0.0/16*. |
65
-
| Subnet name | Enter *mySubnet*. |
66
-
| Subnet address range | Enter *10.0.0.0/24*. |
61
+
| IPv4 address space | Enter ***10.0.0.0/16***. |
62
+
| Subnet name | Enter ***mySubnet***. |
63
+
| Subnet address range | Enter ***10.0.0.0/24***. |
67
64
68
65
1. Select the **Security** tab, or select the **Next: Security** button at the bottom of the page.
69
66
70
67
1. Under **BastionHost**, select **Enable** and enter the following values:
71
68
72
69
| Setting | Value |
73
70
| --- | --- |
74
-
| Bastion name | Enter *myBastionHost*. |
75
-
| AzureBastionSubnet address space | Enter *10.0.3.0/24*. |
76
-
| Public IP Address | Select **Create new**. </br> Enter *myBastionIP* for **Name**. </br> Select **OK**. |
71
+
| Bastion name | Enter ***myBastionHost***. |
72
+
| AzureBastionSubnet address space | Enter ***10.0.3.0/24***. |
73
+
| Public IP Address | Select **Create new**. </br> Enter ***myBastionIP*** for **Name**. </br> Select **OK**. |
77
74
78
75
1. Select the **Review + create** tab or select the **Review + create** button.
79
76
@@ -85,7 +82,7 @@ In this section, you create two virtual machines: **myVM** and **myNVA**. You us
85
82
86
83
### Create first virtual machine
87
84
88
-
1. In the search box at the top of the portal, enter *virtual machines*. Select **Virtual machines** in the search results.
85
+
1. In the search box at the top of the portal, enter ***virtual machines***. Select **Virtual machines** in the search results.
89
86
90
87
2. Select **+ Create** and then select **Azure virtual machine**.
91
88
@@ -97,7 +94,7 @@ In this section, you create two virtual machines: **myVM** and **myNVA**. You us
97
94
| Subscription | Select your Azure subscription. |
@@ -139,13 +136,13 @@ In this section, you create two virtual machines: **myVM** and **myNVA**. You us
139
136
140
137
### Create second virtual machine
141
138
142
-
Follow the previous steps that you used to create **myVM** virtual machine and enter *myNVA* for the virtual machine name.
139
+
Follow the previous steps that you used to create **myVM** virtual machine and enter ***myNVA*** for the virtual machine name.
143
140
144
141
## Test network communication using Network Watcher next hop
145
142
146
143
Use the next hop capability of Network Watcher to determine which route Azure is using to route traffic from **myVM**, which has one network interface with one IP configuration
147
144
148
-
1. In the search box at the top of the portal, enter *network watcher*. Select **Network Watcher** in the search results.
145
+
1. In the search box at the top of the portal, enter ***network watcher***. Select **Network Watcher** in the search results.
149
146
150
147
1. Under **Network diagnostic tools**, select **Next hop**. Enter or select the following values:
151
148
@@ -155,8 +152,8 @@ Use the next hop capability of Network Watcher to determine which route Azure is
155
152
| Resource group | Select **myResourceGroup**. |
156
153
| Virtual machine | Select **myVM**. |
157
154
| Network interface | Leave the default. |
158
-
| Source IP address | Enter *10.0.0.4* or the IP of your VM if it's different. |
159
-
| Destination IP address | Enter *13.107.21.200* to test the communication to `www.bing.com`. |
155
+
| Source IP address | Enter ***10.0.0.4*** or the IP of your VM if it's different. |
156
+
| Destination IP address | Enter ***13.107.21.200*** to test the communication to `www.bing.com`. |
160
157
161
158
1. Select **Next hop** button to start the test. The test result shows information about the next hop like the next hop type, its IP address, and the route table ID used to route traffic. The result of testing **13.107.21.200** shows that the next hop type is **Internet** and the route table ID is **System Route** which means traffic destined to `www.bing.com` from **myVM** is routed to the internet using Azure default system route.
162
159
@@ -174,7 +171,7 @@ Use the next hop capability of Network Watcher to determine which route Azure is
174
171
175
172
To further analyze routing, review the effective routes for **myVM** network interface.
176
173
177
-
1. In the search box at the top of the portal, enter *virtual machines*. Select **Virtual machines** in the search results.
174
+
1. In the search box at the top of the portal, enter ***virtual machines***. Select **Virtual machines** in the search results.
178
175
179
176
1. Under **Settings**, select **Networking**, then select the network interface.
180
177
@@ -198,7 +195,7 @@ Next, you create a static custom route to override Azure default system routes a
198
195
199
196
In this section, you create a static custom route (user-defined route) in a route table that forces all traffic destined outside the virtual network to a specific IP address. Forcing traffic to a virtual network appliance is a common scenario.
200
197
201
-
1. In the search box at the top of the portal, enter *route tables*. Select **Route tables** in the search results.
198
+
1. In the search box at the top of the portal, enter ***route tables***. Select **Route tables** in the search results.
202
199
203
200
1. Select **+ Create** to create a new route table. In the **Create Route table** page, enter or select the following values:
204
201
@@ -209,7 +206,7 @@ In this section, you create a static custom route (user-defined route) in a rout
209
206
| Resource group | Select **myResourceGroup**. |
210
207
|**Instance Details**||
211
208
| Region | Select **East US**. |
212
-
| Name | Enter *myRouteTable*. |
209
+
| Name | Enter ***myRouteTable***. |
213
210
| Propagate gateway routes | Leave the default. |
214
211
215
212
1. Select **Review + create**.
@@ -224,11 +221,11 @@ In this section, you create a static custom route (user-defined route) in a rout
| Destination IP addresses/CIDR ranges | Enter *0.0.0.0/0*. |
226
+
| Destination IP addresses/CIDR ranges | Enter ***0.0.0.0/0***. |
230
227
| Next hop type | Select **Virtual appliance**. |
231
-
| next hop address | Enter *10.0.0.5*. |
228
+
| next hop address | Enter ***10.0.0.5***. |
232
229
233
230
1. Select **Add**.
234
231
@@ -272,18 +269,19 @@ The custom route with prefix 0.0.0.0/0 overrode Azure default route and caused a
272
269
273
270
## Clean up resources
274
271
275
-
When no longer needed, delete the resource group and all of the resources it contains:
272
+
When no longer needed, delete **myResourceGroup** resource group and all of the resources it contains:
273
+
274
+
1. In the search box at the top of the portal, enter ***myResourceGroup***. Select **myResourceGroup** from the search results.
275
+
276
+
1. Select **Delete resource group**.
276
277
277
-
1. Enter *myResourceGroup* in the search box at the top of the portal. When you see **myResourceGroup** in the search results, select it.
278
-
2. Select **Delete resource group**.
279
-
3. Enter *myResourceGroup* for **TYPE THE RESOURCE GROUP NAME:** and select **Delete**.
278
+
1. In **Delete a resource group**, enter ***myResourceGroup***, and then select **Delete**.
280
279
281
-
## Next steps
280
+
1. Select **Delete** to confirm the deletion of the resource group and all its resources.
282
281
283
-
In this tutorial, you created a virtual machine and used Network Watcher next hop to diagnose routing to different destinations. To learn more about routing in Azure, see [Virtual network traffic routing](../virtual-network/virtual-networks-udr-overview.md?toc=%2fazure%2fnetwork-watcher%2ftoc.json).
282
+
## Next step
284
283
285
-
For outbound VM connections, you can use Network Watcher [connection troubleshoot](network-watcher-connectivity-portal.md) capability to determine the latency, allowed and denied network traffic between the VM and an endpoint, and the route to an endpoint.
284
+
To learn how to monitor communication between two virtual machines, advance to the next tutorial:
286
285
287
-
To learn how to monitor communication between two virtual machines, advance to the next tutorial.
288
286
> [!div class="nextstepaction"]
289
287
> [Monitor a network connection](monitor-vm-communication.md)
0 commit comments