Virtual networks are the computer networks you create when you create and deploy Azure virtual machines (VMs). An Azure Virtual Network (VNet) can be connected to your on-premises network, or it can be disconnected from the on-premises network and function as an isolated network. This article provides information about VNets, how they work, and what they do.
Types of virtual networks
There are two types of virtual networks you can create in Azure: VNet-to-VNet connections, which allow you to connect your virtual networks across different regions, and site-to-site connections, which connect your on-premises network to an Azure virtual network. For most scenarios you will use a VNet-to-VNet connection. To learn more about site-to-site connections, see Site Connectivity in Azure Virtual Networks. See also Available Point-to-Site configurations for VPN Gateway. If you want to connect from an on premises network that doesn’t have a gateway, you can configure direct point-to-site connectivity from one side of your VNet to an equivalent virtual network gateway resource on another subnet. This configuration is referred to as cross subnet or secondary site connectivity. See Cross Subnet Connectivity for VPN Gateway for more information.
Defining a virtual network
A virtual network links your Azure resources to each other, creating a private domain name space for your resources. A virtual network provides essential security features that help protect your data and applications from unauthorized access. When you create a virtual network, you can define custom routing rules for any traffic that flows between devices in that network. These rules determine how traffic flows between your virtual machines, web apps, mobile apps, SQL databases, Linux machines, or any other device within that virtual network. For example, if you want all HTTP requests to flow over port 8080 on one machine to port 80 on another machine, then you configure that rule. Or maybe you want all traffic between these two hosts to flow through a load balancer instead of directly; that’s also possible. The specific configuration is up to you!