title | titleSuffix | description | author | ms.author | ms.date | ms.topic | ms.service | ms.custom |
---|---|---|---|---|---|---|---|---|
Quickstart: Use the Azure portal to create a virtual network |
Azure Virtual Network |
Learn how to use the Azure portal to create and connect through an Azure virtual network and virtual machines. |
asudbring |
allensu |
06/06/2023 |
quickstart |
virtual-network |
ai-video-concept |
This quickstart shows you how to create a virtual network by using the Azure portal. You then create two virtual machines (VMs) in the network, deploy Azure Bastion to securely connect to the VMs from the internet, and start private communication between the VMs.
:::image type="content" source="./media/quick-create-portal/virtual-network-qs-resources.png" alt-text="Diagram of resources created in the virtual network quickstart.":::
A virtual network is the fundamental building block for private networks in Azure. Azure Virtual Network enables Azure resources like VMs to securely communicate with each other and the internet.
[!VIDEO https://learn-video.azurefd.net/vod/player?id=6b5b138e-8406-406e-8b34-40bdadf9fc6d]
- An Azure account with an active subscription. You can create an account for free.
Sign in to the Azure portal with your Azure account.
[!INCLUDE virtual-network-create-with-bastion.md]
[!INCLUDE create-two-virtual-machines.md]
-
In the portal, search for and select Virtual machines.
-
On the Virtual machines page, select vm-1.
-
In the Overview information for vm-1, select Connect.
-
On the Connect to virtual machine page, select the Bastion tab.
-
Select Use Bastion.
-
Enter the username and password that you created when you created the VM, and then select Connect.
-
At the bash prompt for vm-1, enter
ping -c 4 vm-2
.You get a reply similar to the following message:
azureuser@vm-1:~$ ping -c 4 vm-2 PING vm-2.3bnkevn3313ujpr5l1kqop4n4d.cx.internal.cloudapp.net (10.0.0.5) 56(84) bytes of data. 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=1 ttl=64 time=1.83 ms 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=2 ttl=64 time=0.987 ms 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=3 ttl=64 time=0.864 ms 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=4 ttl=64 time=0.890 ms
-
Close the Bastion connection to vm-1.
-
Repeat the steps in Connect to a virtual machine to connect to vm-2.
-
At the bash prompt for vm-2, enter
ping -c 4 vm-1
.You get a reply similar to the following message:
azureuser@vm-2:~$ ping -c 4 vm-1 PING vm-1.3bnkevn3313ujpr5l1kqop4n4d.cx.internal.cloudapp.net (10.0.0.4) 56(84) bytes of data. 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=1 ttl=64 time=0.695 ms 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=2 ttl=64 time=0.896 ms 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=3 ttl=64 time=3.43 ms 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=4 ttl=64 time=0.780 ms
-
Close the Bastion connection to vm-2.
[!INCLUDE portal-clean-up.md]
In this quickstart, you created a virtual network with two subnets: one that contains two VMs and the other for Bastion. You deployed Bastion, and you used it to connect to the VMs and establish communication between the VMs. To learn more about virtual network settings, see Create, change, or delete a virtual network.
Private communication between VMs is unrestricted in a virtual network. To learn more about configuring various types of VM network communications, continue to the next article:
[!div class="nextstepaction"] Filter network traffic