Skip to content

Commit dc78ee3

Browse files
committed
changes in PR
1 parent fd2c7f6 commit dc78ee3

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

articles/virtual-network/how-to-configure-subnet-peering.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,69 @@ For this, we run the virtual network peering create command with the optional pa
141141
az network vnet peering create -n vnet-1_to_vnet-2
142142
-g test-rg
143143
-o none
144+
--vnet-name vnet-1
145+
--remote-vnet vnet-2
144146
--allow-forwarded-traffic
145147
--allow-gateway-transit
146148
--allow-vnet-access
147-
--peer-complete-vnet fasle
149+
--peer-complete-vnet false
148150
--local-subnet-names subnet-1
149151
--remote-subnet-names subnet-3
152+
az network vnet peering create -n vnet-2_to_vnet-1
153+
-g test-rg
154+
-o none
155+
--vnet-name vnet-2
156+
--remote-vnet vnet-1
157+
--allow-forwarded-traffic
158+
--allow-gateway-transit
159+
--allow-vnet-access
160+
--peer-complete-vnet false
161+
--local-subnet-names subnet-3
162+
--remote-subnet-names subnet-1
163+
```
164+
165+
**Add a new subnet to peering**
166+
```azurecli
167+
az network vnet peering update -n vnet-1_to_vnet-2
168+
-g test-rg
169+
--vnet-name vnet-1
170+
--local-subnet-names subnet-1 subnet-2
171+
az network vnet peering update -n vnet-2_to_vnet-1
172+
-g test-rg
173+
--vnet-name vnet-2
174+
--remote-subnet-names subnet-3 subnet-4
175+
```
150176

177+
**Remove subnets to peering**
178+
```azurecli
179+
az network vnet peering update -n vnet-1_to_vnet-2
180+
-g test-rg
181+
--vnet-name vnet-1
182+
--local-subnet-names subnet-1
183+
az network vnet peering update -n vnet-2_to_vnet-1
184+
-g test-rg
185+
--vnet-name vnet-2
186+
--remote-subnet-names subnet-3
187+
```
188+
189+
**Sync peerings**
190+
```azurecli
191+
az network vnet peering sync -n vnet-1_to_vnet-2
192+
-g test-rg
193+
--vnet-name vnet-1
194+
az network vnet peering sync -n vnet-2_to_vnet-1
195+
-g test-rg
196+
--vnet-name vnet-2
197+
```
198+
199+
**Show peerings**
200+
```azurecli
201+
az network vnet peering show -n vnet-1_to_vnet-2
202+
-g test-rg
203+
--vnet-name vnet-1
204+
az network vnet peering show -n vnet-2_to_vnet-1
205+
-g test-rg
206+
--vnet-name vnet-2
151207
```
152208

153209
## Subnet Peering Checks and Limitations

0 commit comments

Comments
 (0)