Azure Virtual Network represents your local network in the cloud. It enables other Azure resources to communicate over a secure private network without exposing endpoints over the internet.
Creating a virtual network in the portal
Getting ready
Before you start, open a web browser and go to the Azure portal at https://portal.azure.com.
How to do it...
In order to create a new virtual network using the Azure portal, use the following steps:
- In the Azure portal, select Create a resource and choose Virtual network under Networking services (or, search for virtual network in the search bar).
- A new blade will open where we need to provide information for the virtual network to include Name, define Address space, select the Subscription option we want to use, select the Resource group option for where the virtual network will be deployed, select Location (Azure data center) for where the virtual network will be deployed, and define Name and Address range for the first subnet. We also have the option to select what kind of DDoS protection we want to use and if we want to use the Firewall option; an example is shown in the following screenshot:
- Creating a virtual network usually doesn't take much time and should be completed in under two minutes. Once deployment is finished, you can start using the virtual network.
How it works...
We deploy virtual networks to Resource group under Subscription in the Azure data center that we choose. Location and Subscription are important parameters; we will only be able to attach Azure resources to this virtual network if they are in the same subscription and region (as the Azure data center). The Address space option defines the number of IP addresses that will be available for our network. It uses the Classless Inter-Domain Routing (CIDR) format and the largest range we can choose is /8. In the portal, we need to create an initial subnet and define the subnet address range. The smallest subnet allowed is /29 and the largest is /8 (however, this can't be larger than the virtual network range).