Update the address space for a peered virtual network using the Azure portal

In this article, you'll learn how to update a peered virtual network by adding or deleting an address space without incurring downtime interruptions using the Azure portal. This feature is useful when you need to grow or resize the virtual networks in Azure after scaling your workloads.

Prerequisites

  • An existing peered virtual network w/ two virtual networks
  • If adding address space, ensure it doesn't overlap other address spaces

Modify the address range prefix of an existing address range

In this section, you'll modify the address range prefix for an existing address range within your peered virtual network.

  1. In the search box at the top of the portal, enter virtual networks in the search box. When Virtual networks appear in the search results, select it.

  2. From the list of virtual networks, select the virtual network where you're adding an address range.

  3. Select Address space under settings.

  4. On the Address space page, change the address range prefix per your requirements, and select Save when finished.

    Image of the Address Space page for changing a sugnet's prefix

  5. Select Peerings under Settings and select the checkbox for the peering requiring synchronization.

  6. Select Sync from the task bar.

    Image of the Peerings page where you re-syncronize a peering connection.

  7. Select the name of the other peered virtual network under Peer.

  8. Under Settings of the peered virtual network, select Address space and verify that the Address space listed has been updated.

    Image the Address Space page where you verify the address space has changed.

Note

When an update is made to the address space for a virtual network, you will need to sync the virtual network peer for each remote peered VNet to learn of the new address space updates. We recommend that you run sync after every resize address space operation instead of performing multiple resizing operations and then running the sync operation.

The following actions will require a sync:

  • Modifying the address range prefix of an existing address range (For example changing 10.1.0.0/16 to 10.1.0.0/18)
  • Adding address ranges to a virtual network
  • Deleting address ranges from a virtual network

Add an address range

In this section, you'll add an IP address range to the IP address space of a peered virtual network.

  1. In the search box at the top of the portal, enter virtual networks in the search box. When Virtual networks appear in the search results, select it.

  2. From the list of virtual networks, select the virtual network where you're adding an address range.

  3. Select Address space, under Settings.

  4. On the Address space page, add the address range per your requirements, and select Save when finished.

    Image of the Address Space page used to add an IP address range.

  5. Select Peering, under Settings and Sync the peering connection.

  6. As previously done, verify the address space is updated on the remote virtual network.

Delete an address range

In this task, you'll delete an IP address range from an address space. First, you'll delete any existing subnets, and then delete the IP address range.

Important

Before you can delete an address space, it must be empty. If a subnet exists in the address range, you can't remove the address range. To remove an address range, you must first delete any subnets and any of the subnet's resources which exist in the address range.

  1. In the search box at the top of the portal, enter virtual networks in the search box. When Virtual networks appear in the search results, select it.

  2. From the list of virtual networks, select the virtual network where you're removing an address range.

  3. Select Subnets, under settings

  4. On the right of the address range you want to remove, select ... and select Delete from the dropdown list. Choose Yes to confirm deletion.

    Image of Subnet page and menu for deleting a subnet.

  5. Select Save when you've completed all changes.

    1. Select Peering, under Settings and Sync the peering connection.
  6. As previously done, verify the address space is updated on the remote virtual network.

Next steps