How to clone azure route table

Rafal Wozniakowski 0 Reputation points
2025-05-13T07:36:49.6533333+00:00

Hi,

We need to create new subnet which has almost identical routes as the current one (only 1 route will be different). Is there any simply way to copy current route table?

Thank you in advance.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-05-13T07:50:39.8+00:00

    Hello Rafal Wozniakowski

    You can create route table in azure with copying an existing route table in Azure and make modifications to create a new one with nearly identical routes.

    1. Create a New Route Table:
    2. Copy Routes from Existing Route Table:
      • After creating the new route table, navigate back to your existing route table.
      • Click on the Routes section to view all the routes.
      • Take note of the route names, address prefixes, and next hop types for each route you want to copy, except for the one route that will be different.
    3. Add Routes to the New Route Table:
      • Go back to your newly created route table.
      • Under the Routes section, click on + Add.
      • Enter the route details (name, address prefix, next hop type, etc.) that are identical to the existing routes, and make sure to adjust the one route that is different.
      • Repeat until all routes have been added.
    4. you can use below Azure CLI comments to create:
    az network route-table route create --name
                                        --resource-group
                                        --route-table-name
                                        [--address-prefix]
                                        [--next-hop-ip-address]
                                        [--next-hop-type {Internet, None, VirtualAppliance, VirtualNetworkGateway, VnetLocal}]
                                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
    
    1. Refer: https://learn.microsoft.com/en-us/cli/azure/network/route-table/route?view=azure-cli-latest#az-network-route-table-route-create

    I hope this information is helpful! If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!

    User's image


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.