Lab scenario
In this lab, you will configure connectivity between the CoreServicesVnet and the ManufacturingVnet by adding peerings to allow traffic flow.
In this unit, you will:
- Task 1: Create a Virtual Machine to test the configuration
- Task 2: Connect to the Test VMs using RDP
- Task 3: Test the connection between the VMs
- Task 4: Create VNet peerings between CoreServicesVnet and ManufacturingVnet
- Task 5: Test the connection between the VMs
Prerequisites for this labs : Azure Account
Task 1: Create a Virtual Machine to test the configuration
In this section, you will create a test VM on the Manufacturing VNet to test if you can access resources inside another Azure virtual network from your ManufacturingVnet.
Create ManufacturingVM
- On the Azure home page, using the global search type Virtual Machines and select virtual machines under services.
- In Virtual Machines, select + Create; + Virtual machine.
- Use the information in the following table to create your VM.
Tab | Option | Value |
Basics | Resource group | ExceedlabsResourceGroup |
Virtual machine name | ManufacturingVM | |
Region | West Europe | |
Availability options | No infrastructure redundancy required | |
Image | Windows Server 2022 Datacenter- Gen1 | |
Azure Spot instance | Not selected | |
Size | Standard_D2s_v3 – 2vcpus, 8GiB memory | |
Username | TestUser | |
Password | TestPa$$w0rd! | |
Public inbound ports | Allow selected ports | |
Select inbound ports | RDP (3389) | |
Disks | No changes required | |
Networking | Virtual network | ManufacturingVnet |
Subnet | ManufacturingSystemSubnet (10.30.10.0/24) | |
Public IP | (new) ManufacturingVM-ip | |
NIC network security group | Basic | |
Public inbound ports | Allow selected ports | |
Select inbound ports | RDP (3389) | |
Load balancing | Not selected | |
Management | No changes required | |
Advanced | No changes required | |
Tags | No changes required | |
Review + create | Review your settings and select Create |
- When the deployment is complete, select Go to resource.
Task 2: Connect to the Test VMs using RDP
- On the Azure Portal home page, select Virtual Machines.
- Select ManufacturingVM.
- In ManufacturingVM, select Connect > RDP.
In ManufacturingVM | Connect, select Download RDP file. |
- Save the RDP file to your desktop.
- Connect to ManufacturingVM using the RDP file, and the username TestUser and the password TestPa$$w0rd!.
- On the Azure Portal home page, select Virtual Machines.
- Select TestVM1.
- In TestVM1, select Connect > RDP.
In TestVM1 | Connect, select Download RDP file. |
- Save the RDP file to your desktop.
- Connect to TestVM1 using the RDP file, and the username TestUser and the password TestPa$$w0rd!.
- On both VMs, in Choose privacy settings for your device, select Accept.
- On both VMs, in Networks, select Yes.
- On TestVM1, open a PowerShell prompt, and run the following command: ipconfig
- Note the IPv4 address.
Task 3: Test the connection between the VMs
- On the ManufacturingVM, open a PowerShell prompt.
- Use the following command to verify that there is no connection to TestVM1 on CoreServicesVnet. Be sure to use the IPv4 address for TestVM1.
code
Test-NetConnection 10.20.20.4 -port 3389
- The test connection should fail, and you will see a result similar to the following:
Task 4: Create VNet peerings between CoreServicesVnet and ManufacturingVnet
- On the Azure home page, select Virtual Networks, and then select CoreServicesVnet.
- In CoreServicesVnet, under Settings, select Peerings.
On CoreServicesVnet | Peerings, select + Add. |
- Use the information in the following table to create the peering.
Section | Option | Value |
This virtual network | ||
Peering link name | CoreServicesVnet-to-ManufacturingVnet | |
Traffic to remote virtual network | Allow (default) | |
Traffic forwarded from remote virtual network | Allow (default) | |
Virtual network gateway or Route Server | None (default) | |
Remote virtual network | ||
Peering link name | ManufacturingVnet-to-CoreServicesVnet | |
Virtual network deployment model | Resource manager | |
I know my resource ID | Not selected | |
Subscription | Your Subscription-xxxxxxxx | |
Virtual network | ManufacturingVnet | |
Traffic to remote virtual network | Allow (default) | |
Traffic forwarded from remote virtual network | Allow (default) | |
Virtual network gateway or Route Server | None (default) | |
Review your settings and select Add. |
In CoreServicesVnet | Peerings, verify that the CoreServicesVnet-to-ManufacturingVnet peering is listed. |
Under Virtual networks, select ManufacturingVnet, and verify the ManufacturingVnet-to-CoreServicesVnet peering is listed.
Task 5: Test the connection between the VMs
- On the ManufacturingVM, open a PowerShell prompt.
- Use the following command to verify that there is now a connection to TestVM1 on CoreServicesVnet.
code
Test-NetConnection 10.20.20.4 -port 3389
The test connection should succeed, and you will see a result similar to the following:
Congratulations! You have successful configured connectivity between VNets by adding peerings.
Reminder: Don’t forget to delete or shutdown all unused Azure resources after your labs for cost saving
Leave a Reply