How to re-size Azure virtual networks that are peered
By: Date: 22/09/2021 Categories: azure Tags:

Available in Preview- Azure Virtual networks can freely resize without any downtime now with this feature existing peerings on the virtual network do not need to be deleted prior to adding or deleting an address prefix on the Azure virtual network.

How to add or remove address space on peered virtual networks

You can add or remove address space on a virtual network that is peered with another virtual network in the same region or across regions.

Introduces two new properties on the virtualNetworkPeerings.

RemoteVirtualNetworkAddressSpace- It contains the most current address space of the peered virtual network and this address may or may not be the same as the peered address.

PeeringSyncLevel- If the virtual address contained in the remoteVirtualNetworkAddressSpace property is the same as the address that is actually peered.

To get started

In a virtual network updating the address space that is peered can be performed in two easy steps. It is supported through REST APIs, Azure Portal, and PowerShell.

  1. Add a new address on a virtual network that has active peering connections with other virtual networks.
  2. Perform a “sync” on the peering link from each of the peered remote virtual networks to this virtual network on which the address change is made. This action is required for each remote peered VNet to learn of the newly added address prefix.

Doing this in the Azure portal, Go to the peerings tab on the virtual network where the address update has been made. Select all the peerings that have peering status as “Remote sync required”, and then click the Sync button.

Doing this in the PowerShell, use the commandlet: Sync-AzVirtualNetworkPeering on each peering link from the remote virtual network to the virtual network (1) on which the address change is made.

Note:-

  1. Peered virtual networks across Azure AD tenants are currently not supported.
  2. This feature is in preview, customers need to register their subscriptions with the feature flag: Microsoft.Network/AllowUpdateAddressSpaceInPeeredVnets to use this capability. This flag will be deprecated when the feature is generally available.

For more details- Check out the video