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-connect-virtual-networks-cli.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ az group create \
41
41
--location eastus
42
42
```
43
43
44
-
Create a virtual network with [az network vnet create](/cli/azure/network/vnet). The following example creates a virtual network named **vnet-1** with the address prefix **10.0.0.0/16**.
44
+
Create a virtual network with [az network vnet create](/cli/azure/network/vnet#az-network-vnet-create). The following example creates a virtual network named **vnet-1** with the address prefix **10.0.0.0/16**.
45
45
46
46
```azurecli-interactive
47
47
az network vnet create \
@@ -65,7 +65,7 @@ az network vnet create \
65
65
66
66
## Peer virtual networks
67
67
68
-
Peerings are established between virtual network IDs, so you must first get the ID of each virtual network with [az network vnet show](/cli/azure/network/vnet) and store the ID in a variable.
68
+
Peerings are established between virtual network IDs, so you must first get the ID of each virtual network with [az network vnet show](/cli/azure/network/vnet#az-network-vnet-show) and store the ID in a variable.
69
69
70
70
```azurecli-interactive
71
71
# Get the id for vnet-1.
@@ -74,15 +74,15 @@ vNet1Id=$(az network vnet show \
74
74
--name vnet-1 \
75
75
--query id --out tsv)
76
76
77
-
# Get the id for myVirtualNetwork2.
77
+
# Get the id for vnet-2.
78
78
vNet2Id=$(az network vnet show \
79
79
--resource-group test-rg \
80
80
--name vnet-2 \
81
81
--query id \
82
82
--out tsv)
83
83
```
84
84
85
-
Create a peering from **vnet-1** to **vnet-2**with [az network vnet peering create](/cli/azure/network/vnet/peering). If the `--allow-vnet-access` parameter is not specified, a peering is established, but no communication can flow through it.
85
+
Create a peering from **vnet-1** to **vnet-2**with [az network vnet peering create](/cli/azure/network/vnet/peering#az-network-vnet-peering-create). If the `--allow-vnet-access` parameter is not specified, a peering is established, but no communication can flow through it.
86
86
87
87
```azurecli-interactive
88
88
az network vnet peering create \
@@ -93,7 +93,7 @@ az network vnet peering create \
93
93
--allow-vnet-access
94
94
```
95
95
96
-
In the output returned after the previous command executes, you see that the **peeringState** is **Initiated**. The peering remains in the **Initiated** state until you create the peering from **vnet-2** to **vnet-1**. Create a peering from **vnet-2**to **vnet-1**.
96
+
In the output returned after the previous command executes, you see that the **peeringState** is **Initiated**. The peering remains in the **Initiated** state until you create the peering from **vnet-2** to **vnet-1**. Create a peering from **vnet-2**to **vnet-1**.
97
97
98
98
```azurecli-interactive
99
99
az network vnet peering create \
@@ -104,7 +104,7 @@ az network vnet peering create \
104
104
--allow-vnet-access
105
105
```
106
106
107
-
In the output returned after the previous command executes, you see that the **peeringState** is **Connected**. Azure also changed the peering state of the **vnet-1-to-vnet-2** peering to **Connected**. Confirm that the peering state for the **vnet-1-to-vnet-2** peering changed to **Connected** with [az network vnet peering show](/cli/azure/network/vnet/peering).
107
+
In the output returned after the previous command executes, you see that the **peeringState** is **Connected**. Azure also changed the peering state of the **vnet-1-to-vnet-2** peering to **Connected**. Confirm that the peering state for the **vnet-1-to-vnet-2** peering changed to **Connected** with [az network vnet peering show](/cli/azure/network/vnet/peering#az-network-vnet-show).
108
108
109
109
```azurecli-interactive
110
110
az network vnet peering show \
@@ -122,7 +122,7 @@ Create a VM in each virtual network so that you can communicate between them in
122
122
123
123
### Create the first VM
124
124
125
-
Create a VM with [az vm create](/cli/azure/vm). The following example creates a VM named **vm-1** in the **vnet-1** virtual network. 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. The `--no-wait` option creates the VM in the background, so you can continue to the next step.
125
+
Create a VM with [az vm create](/cli/azure/vm#az-vm-create). The following example creates a VM named **vm-1** in the **vnet-1** virtual network. 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. The `--no-wait` option creates the VM in the background, so you can continue to the next step.
126
126
127
127
```azurecli-interactive
128
128
az vm create \
@@ -188,7 +188,7 @@ Close the SSH session to the **vm-2** VM.
188
188
189
189
## Clean up resources
190
190
191
-
When no longer needed, use [az group delete](/cli/azure/group) to remove the resource group and all of the resources it contains.
191
+
When no longer needed, use [az group delete](/cli/azure/group#az-group-delete) to remove the resource group and all of the resources it contains.
0 commit comments