Azure Virtual Network Route Tables

Learn about route tables in Azure Virtual Network (VNet) and how to configure custom routes to control traffic flow.

What are Route Tables?

Route tables are a core component of Azure networking that enable you to define custom routes for traffic within your Virtual Network. By default, Azure automatically creates a system route table for each subnet. However, you can create your own user-defined route (UDR) tables to override the default routing behavior.

Key Concepts

When to Use Custom Routes

Custom routes are essential for scenarios such as:

Creating and Managing Route Tables

You can manage route tables using the Azure portal, Azure CLI, Azure PowerShell, or ARM templates.

Azure Portal Walkthrough

  1. Navigate to the Azure portal.
  2. Search for "Route tables" and select it.
  3. Click "Create" to start the creation process.
  4. Fill in the required details: Subscription, Resource group, Region, and a Name for your route table.
  5. Click "Review + create" and then "Create".

Adding Routes

Once a route table is created, you can add routes to it:

  1. Open your route table resource in the Azure portal.
  2. Under "Settings", select "Routes".
  3. Click "Add".
  4. Provide a Route name, Address prefix (CIDR notation), Next hop type, and Next hop address.

Associating Route Tables with Subnets

To apply your custom routes, associate the route table with a subnet:

  1. Navigate to the subnet you want to configure.
  2. Under "Settings", select "Route table".
  3. Choose your custom route table from the dropdown list or select "None" to use the system route table.
  4. Click "Save".

Example Route Configuration

Consider a scenario where you want to send all traffic destined for the internet through a Network Virtual Appliance (NVA) deployed in your VNet. You would create a route table with a route:


Route Name: ToNVAInternet
Address Prefix: 0.0.0.0/0
Next Hop Type: Virtual Appliance
Next Hop Address: [IP Address of your NVA]
        

This route, when associated with a subnet, will ensure all outgoing internet traffic from that subnet is first routed to the specified NVA for inspection or processing.

Route Priorities and Propagation

Azure evaluates routes in the following order:

  1. User-defined routes (UDRs)
  2. BGP routes (from VPN Gateway or ExpressRoute)
  3. System routes

Routes are propagated to the route table of each subnet associated with the route table.

Important Considerations