Mod 8 - Lab - Load Balancer and Traffic Manager
Mod 8 - Lab - Load Balancer and Traffic Manager
Scenario
Lab: Load Balancer and Traffic Manager
All tasks in this lab are performed from the Azure portal (including a PowerShell Cloud Shell session) except for
Objectives
Exercise 1 Task 3, which includes steps performed from a Remote Desktop session to an Azure VM
Exercise 0:
Deploy Azure Lab files:
VMs by using
Azure Resource Labfiles\Module_08\Load_Balancer_and_Traffic_Manager\az-101-03_01_azuredeploy.json
Manager
templates Labfiles\Module_08\Load_Balancer_and_Traffic_Manager\az-101-
03_01_1_azuredeploy.parameters.json
Exercise 1:
Implement
Azure Load
Labfiles\Module_08\Load_Balancer_and_Traffic_Manager\az-101-
Balancing 03_01_2_azuredeploy.parameters.json
Exercise 2:
Implement Scenario
Azure Traffic
Manager load Adatum Corporation wants to implement Azure VM-hosted web workloads and facilitate their management for
balancing
its subsidiary Contoso Corporation in a highly available manner by leveraging load balancing and Network
Address Translation (NAT) features of Azure Load Balancer
Objectives
1. Deploy management Azure VMs running Windows Server 2016 Datacenter with the Web Server (IIS) role
installed into an availability set in the first Azure region by using an Azure Resource Manager template
2. Deploy management Azure VMs running Windows Server 2016 Datacenter with the Web Server (IIS) role
installed into an availability set in the second Azure region by using an Azure Resource Manager template
Task 1: Deploy management Azure VMs running Windows Server 2016 Datacenter with the Web Server (IIS)
role installed into an availability set in the first Azure region by using an Azure Resource Manager template
1. From the lab virtual machine, start Microsoft Edge, browse to the Azure portal at http://portal.azure.com
and sign in by using a Microsoft account that has the Owner role in the target Azure subscription.
3. From the New blade, search Azure Marketplace for Template deployment.
4. Use the list of search results to navigate to the Deploy a custom template blade.
5. On the Custom deployment blade, click the Build your own template in the editor link. If you do not
see this link, click Edit template instead.
❕ Note: Review the content of the template and note that it defines deployment of two Azure VMs hosting Windows
Server 2016 Datacenter Core into an availability set.
8. From the Custom deployment blade, navigate to the Edit parameters blade.
10. Save the parameters and return to the Custom deployment blade.
11. From the Custom deployment blade, initiate a template deployment with the following settings:
Subscription: the name of the subscription you intend to use in this lab
Location: the name of the Azure region which is closest to the lab location and where you can
provision Azure VMs
Subnet0Name: subnet0
Subnet0Prefix: 10.101.31.0/26
❕ Note: To identify Azure regions where you can provision Azure VMs, refer to https://azure.microsoft.com/en-
us/regions/offers/
❕ Note: Do not wait for the deployment to complete but proceed to the next task.
Task 2: Deploy management Azure VMs running Windows Server 2016 Datacenter with the Web Server (IIS)
role installed into an availability set in the second Azure region by using an Azure Resource Manager
template
2. From the New blade, search Azure Marketplace for Template deployment.
3. Use the list of search results to navigate to the Deploy a custom template blade.
4. On the Custom deployment blade, click the Build your own template in the editor link. If you do not
see this link, click Edit template instead.
❕ Note: This is the same template you used in the previous task. You will use it to deploy a pair of Azure VMs to the
second region.
7. From the Custom deployment blade, navigate to the Edit parameters blade.
10. From the Custom deployment blade, initiate a template deployment with the following settings:
Subscription: the name of the subscription you are using in this lab
Location: the name of the Azure region different from the one you chose in the previous task and
where you can provision Azure VMs
Subnet0Name: subnet0
Subnet0Prefix: 10.101.32.0/26
❕ Note: Do not wait for the deployment to complete but proceed to the next exercise.
❕ Result: After you completed this exercise, you have used Azure Resource Manager templates to initiate deployment of Azure
VMs running Windows Server 2016 Datacenter with the Web Server (IIS) role installed into availability sets in two Azure
regions.
❕ Note: Before you start this task, ensure that the template deployment you started in the first task of the previous exercise has
completed.
2. From the New blade, search Azure Marketplace for Load Balancer.
3. Use the list of search results to navigate to the Create load balancer blade.
4. From the Create load balancer blade, create a new Azure Load Balancer with the following settings:
Subscription: the name of the subscription you are using in this lab
Name: az1010301w-lb
Region: the name of the Azure region in which you deployed Azure VMs in the first task of the
previous exercise
Type: Public
SKU: Basic
Assignment: Dynamic
5. In the Azure portal, navigate to the blade of the newly deployed Azure load balancer az1010301w-lb.
6. From the az1010301w-lb blade, display the az1010301w-lb - Backend pools blade.
7. From the az1010301w-lb - Backend pools blade, add a backend pool with the following settings:
Name: az1010301w-bepool
IP version: IPv4
❕ Note: It is possible that the IP addresses of the Azure VMs are assigned in the reverse order.
❕ Note: Wait for the operation to complete. This should take less than a minute.
8. From the az1010301w-lb - Backend pools blade, display the az1010301w-lb - Health probes blade.
9. From the az1010301w-lb - Health probes blade, add a health probe with the following settings:
Name: az1010301w-healthprobe
Protocol: TCP
Port: 80
Interval: 5 seconds
❕ Note: Wait for the operation to complete. This should take less than a minute.
10. From the az1010301w-lb - Health probes blade, display the az1010301w-lb - Load balancing rules
blade.
11. From the az1010301w-lb - Load balancing rules blade, add a load balancing rule with the following
settings:
Name: az1010301w-lbrule01
IP Version: IPv4
Protocol: TCP
Port: 80
Backend port: 80
❕ Note: Before you start this task, ensure that the template deployment you started in the second task of the previous exercise
has completed.
2. From the New blade, search Azure Marketplace for Load Balancer.
3. Use the list of search results to navigate to the Create load balancer blade.
https://microsoftlearning.github.io/AZ-103-MicrosoftAzureAdministrator/Instructions/Labs/08 - Load Balancer and Traffic Manager (az-101-03).html 5/12
1/25/2021 AZ-103-MicrosoftAzureAdministrator
4. From the Create load balancer blade, create a new Azure Load Balancer with the following settings:
Subscription: the name of the subscription you are using in this lab
Name: az1010302w-lb
Region: the name of the Azure region in which you deployed Azure VMs in the second task of the
previous exercise
Type: Public
SKU: Basic
Assignment: Dynamic
5. In the Azure portal, navigate to the blade of the newly deployed Azure load balancer az1010302w-lb.
6. From the az1010302w-lb blade, display the az1010302w-lb - Backend pools blade.
7. From the az1010302w-lb - Backend pools blade, add a backend pool with the following settings:
Name: az1010302w-bepool
IP version: IPv4
❕ Note: It is possible that the IP addresses of the Azure VMs are assigned in the reverse order.
❕ Note: Wait for the operation to complete. This should take less than a minute.
8. From the az1010302w-lb - Backend pools blade, display the az1010302w-lb - Health probes blade.
9. From the az1010302w-lb - Health probes blade, add a health probe with the following settings:
Name: az1010302w-healthprobe
Protocol: TCP
Port: 80
Interval: 5 seconds
❕ Note: Wait for the operation to complete. This should take less than a minute.
10. From the az1010302w-lb - Health probes blade, display the az1010302w-lb - Load balancing rules
blade.
https://microsoftlearning.github.io/AZ-103-MicrosoftAzureAdministrator/Instructions/Labs/08 - Load Balancer and Traffic Manager (az-101-03).html 6/12
1/25/2021 AZ-103-MicrosoftAzureAdministrator
11. From the az1010302w-lb - Load balancing rules blade, add a load balancing rule with the following
settings:
Name: az1010302w-lbrule01
IP Version: IPv4
Protocol: TCP
Port: 80
Backend port: 80
1. In the Azure portal, navigate to the blade of the Azure load balancer az1010301w-lb.
2. From the az1010301w-lb blade, display the az1010301w-lb - Inbound NAT rules blade.
3. From the az1010301w-lb - Inbound NAT rules blade, add the first inbound NAT rule with the following
settings:
Name: az1010301w-vm0-RDP
IP Version: IPv4
Service: Custom
Protocol: TCP
Port: 33890
❕ Note: Wait for the operation to complete. This should take less than a minute.
4. From the az1010301w-lb - Inbound NAT rules blade, add the second inbound NAT rule with the
following settings:
Name: az1010301w-vm1-RDP
IP Version: IPv4
Service: Custom
Protocol: TCP
Port: 33891
❕ Note: Wait for the operation to complete. This should take less than a minute.
1. In the Azure portal, navigate to the blade of the Azure load balancer az1010302w-lb.
2. From the az1010302w-lb blade, display the az1010302w-lb - Inbound NAT rules blade.
3. From the az1010302w-lb - Inbound NAT rules blade, add the first inbound NAT rule with the following
settings:
Name: az1010302w-vm0-RDP
IP Version: IPv4
Service: Custom
Protocol: TCP
Port: 33890
❕ Note: Wait for the operation to complete. This should take less than a minute.
4. From the az1010302w-lb - Inbound NAT rules blade, add the second inbound NAT rule with the
following settings:
Name: az1010302w-vm1-RDP
IP Version: IPv4
Service: Custom
Protocol: TCP
Port: 33891
❕ Note: Wait for the operation to complete. This should take less than a minute.
1. In the Azure portal, navigate to the blade of the Azure load balancer az1010301w-lb.
2. On the az1010301w-lb blade, identify the public IP address assigned to the load balancer frontend.
3. In the Microsoft Edge window, open a new tab and browse to the IP address you identified in the previous
step.
4. Verify that the tab displays the default Internet Information Services home page.
5. Close the browser tab displaying the default Internet Information Services home page.
6. In the Azure portal, navigate to the blade of the Azure load balancer az1010301w-lb.
7. On the az1010301w-lb blade, identify the public IP address assigned to the load balancer frontend.
8. From the lab virtual machine, start Command Prompt and run the following command, after replacing the
<az1010301w-lb_public_IP> placeholder with the IP address you identified in the previous task:
Code Copy
mstsc /v:<az1010301w-lb_public_IP>:33890
❕ Note: This command initiates a Remote Desktop session to the az1010301w-vm0 Azure VM by using the
az1010301w-vm0-RDP NAT rule you created in the previous task.
10. Once you sign in, start Command Prompt and run the following command:
Code Copy
hostname
11. Review the output and verify that you are actually connected to the az1010301w-vm0 Azure VM.
❕ Result: After you completed this exercise, you have implemented load balancing rules and NAT rules of Azure in two Azure
regions and verified load balancing rules and NAT rules of Azure load balancers in the first region.
❕ Note: This task is necessary because each Traffic Manager endpoint must have a DNS name assigned.
1. In the Azure portal, navigate to the blade of the public IP address resource associated with the Azure load
balancer in the first region named az1010301w-lb-pip.
3. From the az1010301w-lb-pip - Configuration blade set the DNS name label of the public IP address to a
unique value.
❕ Note: The green check mark in the DNS name label (optional) text box will indicate whether the name you typed in
is valid and unique.
4. Navigate to the blade of the public IP address resource associated with the Azure load balancer in the
second region named az1010302w-lb-pip.
6. From the az1010302w-lb-pip - Configuration blade set the DNS name label of the public IP address to a
unique value.
❕ Note: The green check mark in the DNS name label (optional) text box will indicate whether the name you typed in
is valid and unique.
2. From the New blade, search Azure Marketplace for Traffic Manager profile.
3. Use the list of search results to navigate to the Create Traffic Manager profile blade.
4. From the Create Traffic Manager profile blade, create a new Azure Traffic Manager profile with the
following settings:
Subscription: the name of the subscription you are using in this lab
Location: either of the Azure regions you used earlier in this lab
5. In the Azure portal, navigate to the blade of the newly provisioned Traffic Manager profile.
6. From the Traffic Manager profile blade, display its Configuration blade and review the configuration
settings.
❕ Note: The default TTL of the Traffic Manager profile DNS records is 60 seconds
7. From the Traffic Manager profile blade, display its Endpoints blade.
8. From the Endpoints blade, add the first endpoint with the following settings:
Name: az1010301w-lb-pip
Weight: 100
9. From the Endpoints blade, add the second endpoint with the following settings:
Name: az1010302w-lb-pip
Weight: 100
10. On the Endpoints blade, examine the entries in the MONITORING STATUS column for both endpoints.
Wait until both are listed as Online before you proceed to the next task.
1. From the Endpoints blade, switch to the Overview section of the Traffic Manager profile blade.
2. Note the DNS name assigned to the Traffic Manager profile (the string following the http:// prefix).
3. From the Azure Portal, start a PowerShell session in the Cloud Shell pane.
❕ Note: If this is the first time you are launching the Cloud Shell in the current Azure subscription, you will be asked to
create an Azure file share to persist Cloud Shell files. If so, accept the defaults, which will result in creation of a storage
account in an automatically generated resource group.
4. In the Cloud Shell pane, run the following command, replacing the <TM_DNS_name> placeholder with the
value of the DNS name assigned to the Traffic Manager profile you identified in the previous task:
Code Copy
nslookup <TM_DNS_name>
5. Review the output and note the Name entry. This should match the DNS name of the one of the Traffic
Manager profile endpoints you created in the previous task.
6. Wait for at least 60 seconds and run the same command again:
Code Copy
nslookup <TM_DNS_name>
7. Review the output and note the Name entry. This time, the entry should match the DNS name of the other
Traffic Manager profile endpoint you created in the previous task.
❕ Result: After you completed this exercise, you have implemented and verified Azure Traffic Manager load balancing
1. At the top of the portal, click the Cloud Shell icon to open the Cloud Shell pane.
3. At the Cloud Shell command prompt, type in the following command and press Enter to list all resource
groups you created in this lab:
Shell Copy
4. Verify that the output contains only the resource groups you created in this lab. These groups will be
deleted in the next task.
1. At the Cloud Shell command prompt, type in the following command and press Enter to delete the
resource groups you created in this lab
Shell Copy
❕ Result: In this exercise, you removed the resources used in this lab.