
close
close
Chance to win $250 in Petri 2023 Audience Survey
In this article, I’ll explain how you can customize network routing for Azure virtual machines on, from, and to a virtual network.
In a normal deployment of virtual machines, Azure uses a number of system routes to direct network traffic between virtual machines, on-premises networks, and the Internet. The following situations are managed by these system routes:
Every subnet in a virtual network is associated with a route table that enables the flow of data. This table can be comprised of three system route rules:
A lot of deployments never require routing customization, but there are scenarios where you might want to adjust the default flow of traffic. The following image depicts a simple design where a virtual network has two subnets. One of these subnets is the frontend, where web services will run in virtual machines. The second subnet is the backend, where more sensitive application and data services will run in virtual machines.
Those who have deployed or secured multi-tier web services will realize that there’s no added security with the following design. By default, all traffic can flow from the web servers in the frontend to the application and data services in the backend via the default local VNet system rule; there is no filtering.
Default system rules with a multi-tier web application in Azure (Image Credit: Microsoft)
A user defined route forces traffic through an Azure virtual appliance (Image Credit: Microsoft)
User defined routes forcing traffic via the on-premises network (Image Credit: Microsoft)
You can create a route table and associate it with a subnet in a virtual network. You can then create user defined routes based on three criteria:
Note that a route tabling can be associated with multiple virtual networks, but a virtual network can be associated with only one route table.
Once you add a route table to a subnet, routing is based on a combination of system routes and user defined routes. If you add ExpressRoute to the mix, then BGP routes will also be propagated to Azure. The following order is used to prioritise routes if more than one route is found for traffic:
Azure makes routing pretty simple. Now if only Azure could end the decades old Cross-Atlantic debate on the correct pronunciations of route and routing (rowt and rowting in USA, and root and rooting in Europe).
More in Microsoft Azure
Microsoft Introduces Fully-Managed Azure Load Testing Service for Developers
Feb 2, 2023 | Rabia Noureen
Azure Native New Relic Service Provides Full Stack Observability To Boost Digital Transformation
Jan 25, 2023 | Rabia Noureen
Microsoft to Roll Out EU Data Boundary Plan for Cloud Services on January 1
Dec 15, 2022 | Rabia Noureen
Most popular on petri