https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator/blob/master/Instructions/Labs/LAB_04-Implement_Virtual_Networking.md

Task 1: Create and configure a virtual network
Task 2: Deploy virtual machines into the virtual network
Task 3: Configure private and public IP addresses of Azure VMs
Task 4: Configure network security groups
Task 5: Configure Azure DNS for internal name resolution
Task 6: Configure Azure DNS for external name resolution

Task 1: Create and configure a virtual network

az104-04-rg1

az104-04-vnet1, Click Next : IP Addresses and delete the existing IPv4 address space. In the IPv4 address space textbox type in 10.40.0.0/20.

Click + Add subnet enter the following values then click Add.

SettingValue
Subnet namesubnet0
Subnet address range10.40.0.0/24

When done, Create a subnet with the following settings (leave others with their default values):

SettingValue
Namesubnet1
Address range (CIDR block)10.40.1.0/24
Network security groupNone
Route tableNone


Task 2: Deploy virtual machines into the virtual network

Code add to the ps1 script

# Connect-AzAccount -TenantId is-something-123

$rgName = "az104-04-rg1"
New-AzResourceGroupDeployment `
   -ResourceGroupName $rgName `
   -TemplateFile az104-04-vms-loop-template.json `
   -TemplateParameterFile az104-04-vms-loop-parameters.json

Yea

Result


Task 3: Configure private and public IP addresses of Azure VMs

Click az104-04-nic0 and, on the az104-04-nic0 blade, click IP configurations.

On the ipconfig1 blade, in the Public IP address settings section, select Associate, click + Create new, specify the following settings, and click OK:

On the ipconfig1 blade, set Assignment to Static, leave the default value of IP address set to 10.40.0.4.

SettingValue
Nameaz104-04-pip0
SKUStandard

Result

Save it

Click az104-04-nic1 and, on the az104-04-nic1 blade, click IP configurations. (same as above)

Navigate back to the az104-04-rg1 resource group blade, in the list of its resources, click az104-04-vm0, and from the az104-04-vm0 virtual machine blade, note the public IP address entry.


Task 4: Configure network security groups

RDP = Note that the connection attempt fails.

Select Network security groups, and, on the Network security groups blade, click + Create.

Add an inbound rule with the following settings (leave others with their default values):

On the NSG

click Network interfaces and then click + Associate.

RDP

az104-04-vm1

az104-04-vm0


Task 5: Configure Azure DNS for internal name resolution

In the Azure portal, search for and select Private DNS zones and, on the Private DNS zones blade, click + Create.

SettingValue
Subscriptionthe name of the Azure subscription you are using in this lab
Resource Groupaz104-04-rg1
Nameepok.org


When created

On the epok.org private DNS zone blade, in the Settings section, click Virtual network links

Click + Add to create a virtual network link with the following settings (leave others with their default values):

SettingValue
Link nameaz104-04-vnet1-link
Subscriptionthe name of the Azure subscription you are using in this lab
Virtual networkaz104-04-vnet1
Enable auto registrationenabled

Done

Verify that the DNS records for az104-04-vm0 and az104-04-vm1 appear in the list of record sets as Auto registered.

Switch to the Remote Desktop session to az104-04-vm0, right-click the Start button and, in the right-click menu, click Windows PowerShell (Admin).

Task 6: Configure Azure DNS for external name resolution

In a web browser, open a new tab and navigate to https://www.godaddy.com/domains/domain-name-search.

epicetus.com

In the Azure portal, search for and select DNS zones and, on the DNS zones blade, click + Create.

Create a DNS zone with the following settings (leave others with their default values):

SettingValue
Subscriptionthe name of the Azure subscription you are using in this lab
Resource Groupaz104-04-rg1
Nameepicetus.com

Done

Name server 1 to 4 is here.

On the DNS zone blade, click + Record set.

SettingValue
Nameaz104-04-vm0
TypeA
Alias record setNo
TTL1
TTL unitHours

IP addresspublic IP add az104-04-vm0 
SettingValue
Nameaz104-04-vm1
TypeA
Alias record setNo
TTL1
TTL unitHours

IP addresspublic IP add az104-04-vm1 

On the DNS zone blade, note the name of the Name server 1 entry.

Run cloud shell, since we have not bought the domain and edited ns

From the Cloud Shell pane, run the following to test external name resolution of the az104-04-vm0 DNS record set in the the newly created DNS zone (replace the placeholder [Name server 1] with the name of Name server 1 you noted earlier in this task and the [domain name] placeholder with the name of the DNS domain you created earlier in this task):

nslookup az104-04-vm0.[domain name] [Name server 1]
nslookup az104-04-vm1.[domain name] [Name server 1]

Delete all

But before that lets see the topology in the network watcher

Get-AzResourceGroup -Name "az104-04*"

Remove it

Get-AzResourceGroup -Name "az104-04*" | Remove-AzResourceGroup -Force -AsJob