AZ 100T04A ENU TrainerHandbook
AZ 100T04A ENU TrainerHandbook
AZ 100T04A ENU TrainerHandbook
AZ-100T04
Configure and Manage
Virtual Networks
MCT USE ONLY. STUDENT USE PROHIBITED
AZ-100T04
Configure and Manage Virtual
Networks
MCT USE ONLY. STUDENT USE PROHIBITED
MCT USE ONLY. STUDENT USE PROHIBITED
Contents
■■ Module 0 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Start Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
■■ Module 1 Azure Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Introducing Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Creating Azure Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Review of IP Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Network Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Module 1 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
■■ Module 2 Azure DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Azure DNS Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Implementing Azure DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Module 2 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
■■ Module 3 Securing Virtual Network Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Introduction to Network Security Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Implementing Network Security Groups and Service Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Module 3 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
■■ Module 4 Connecting Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Intersite Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Virtual Network Peering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Module 4 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
■■ Module 5 Lab-Configure and Manage Virtual Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
MCT USE ONLY. STUDENT USE PROHIBITED
Module 0 Welcome
Start Here
Azure Administrator Curriculum
This course is part of a series of courses to help you prepare for Microsoft’s Azure Administrator certifica-
tion tests. There are two exams:
●● AZ-100, Microsoft Azure Infrastructure and Deployment1, and
●● AZ-101, Microsoft Azure Integration and Security2.
Each exam measures your ability to accomplish certain technical tasks. For example, AZ-100 includes five
study areas, as shown in the table. The percentages indicate the relative weight of each area on the exam.
The higher the percentage, the more questions you are likely to see in that area.
1 https://www.microsoft.com/en-us/learning/exam-az-100.aspx
2 https://www.microsoft.com/en-us/learning/exam-az-101.aspx
MCT USE ONLY. STUDENT USE PROHIBITED 2 Module 0 Welcome
are moved to Azure, they require the same networking functionality as an on-premises deployment, and
this course deals with the basic network configuration tasks.
Students review the basis of IP addressing, with specific emphasis on how public and private IP address-
ing works in the cloud. Students learn how to configure network routing and how to implement Azure
DNS.
Securing the network infrastructure is of key importance and students learn how to use Network Security
Groups (NSGs) to limit network traffic to resources in a virtual network, by creating security rules that
allow or deny inbound or outbound traffic. Students also learn how to use NSG logging to diagnose and
troubleshoot network connectivity problems.
The course also covers different connectivity scenarios for Azure virtual networks and students learn how
to connect virtual networks with VNet-to-VNet VPN gateways and virtual network peering.
Level: Intermediate
Audience
This course is for Azure Administrators. Azure Administrators manage the cloud services that span
storage, networking, and compute cloud capabilities, with a deep understanding of each service across
the full IT lifecycle. They take end-user requests for new cloud applications and make recommendations
on services to use for optimal performance and scale, as well as provision, size, monitor and adjust as
appropriate. This role requires communicating and coordinating with vendors. Azure Administrators use
the Azure Portal and as they become more proficient they use PowerShell and the Command Line
Interface.
Prerequisites
Successful Azure Administrators start this role with experience on operating systems, virtualization, cloud
infrastructure, storage structures, and networking.
Expected learning
●● Understand virtual networking components, IP addressing, and network routing options.
●● Implement Azure DNS domains, zones, record types, and resolution methods.
●● Configure network security groups, service endpoints, logging, and network troubleshooting.
●● Implement site connectivity schemas including VNet-to-VNet connections and virtual network
peering.
Syllabus
This course includes content that will help you prepare for the certification exam. Other content is
included to ensure you have a complete picture of Azure virtual networks. The course content includes a
mix of videos, graphics, reference links, module review questions, and practice labs.
Module 1 – Azure Virtual Networks
In this module, you’ll will be introduced to Azure virtual networks. What are virtual networks and how are
they organized? How do you create and configure virtual networks with templates, PowerShell, CLI, or the
Azure portal? What is the difference between public, private, static, and dynamic IP addressing? How are
system routes, routing tables, and routing algorithms used? Lessons include:
●● Introducing Virtual Networks
●● Creating Azure Virtual Networks
●● Review of IP Addressing
MCT USE ONLY. STUDENT USE PROHIBITED
Start Here 3
●● Network Routing
Module 2 – Azure DNS
In this module, you will learn about DNS basics and specifically implementing Azure DNS. In the DNS
Basics lesson you will review DNS domains, zones, record types, and resolution methods. In the Azure
DNS lesson, we will cover delegation, metrics, alerts, and DNS hosting schemes. Lessons include:
●● Azure DNS Basics
●● Implementing Azure DNS
Module 3 – Securing Virtual Network Resources
In this module, you will learn primarily about Network Security Groups (NSGs) including NSG rules and
NSG scenarios. You will also learn how to implement NSGs considering service endpoints, logging,
troubleshooting, and other network traffic. Lesson include:
●● Introduction to Network Security Groups
●● Implementing Network Security Groups and Service Endpoints
Module 4 – Connecting Virtual Networks
In this module, you will learn about two specific types of intersite connectivity: VNet-to-VNet connections
and VNet Peering. In both cases, you will learn when to choose which connectivity method, and how to
implement and configure the method. Lessons include:
●● Intersite Connectivity (VNet-to-VNet Connections)
●● Virtual Network Peering
Study Guide
The Configure and manage virtual networks objective of the AZ-100 exam, consists of four main areas of
study: Create connectivity between virtual machines, Implement and manage virtual networking, Config-
ure name resolution, and Create and configure a network security group . These tables show you what
may be included in each test area and where it is covered in this course.
✔️ We recommend you use these tables as a checklist to ensure you are prepared in each area.
✔️ We recommend supplementing your study with a practice test.3 Also, hands-on practice is critical to
understanding these concepts and passing the certification exams. There are several ways to get an
Azure subscription4.
Create connectivity between virtual networks
3 https://us.mindhub.com/az-100-microsoft-azure-infrastructure-deployment-microsoft-official-practice-test/p/MU-AZ-100
4 https://azure.microsoft.com/en-us/offers/ms-azr-0044p/
MCT USE ONLY. STUDENT USE PROHIBITED 4 Module 0 Welcome
●● Create a dedicated private cloud-only VNet. Sometimes you don't require a cross-premises config-
uration for your solution. When you create a VNet, your services and VMs within your VNet can
communicate directly and securely with each other in the cloud. You can still configure endpoint
connections for the VMs and services that require internet communication, as part of your solution.
MCT USE ONLY. STUDENT USE PROHIBITED
Introducing Virtual Networks 7
●● Securely extend your data center With VNets. You can build traditional site-to-site (S2S) VPNs to
securely scale your datacenter capacity. S2S VPNs use IPSEC to provide a secure connection between
your corporate VPN gateway and Azure.
●● Enable hybrid cloud scenarios. VNets give you the flexibility to support a range of hybrid cloud
scenarios. You can securely connect cloud-based applications to any type of on-premises system such
as mainframes and Unix systems.
For more information, you can see:
What is an Azure virtual network? - https://docs.microsoft.com/en-us/azure/virtual-network/
virtual-networks-faq#what-is-an-azure-virtual-network-vnet
Subnets
A virtual network can be segmented into one or more subnets. Subnets provide logical divisions within
your network. Subnets can help improve security, increase performance, and make it easier to manage
the network.
Each subnet contains a range of IP addresses that fall within the virtual network address space. Each
subnet must have a unique address range, specified in CIDR format. The address range cannot overlap
with other subnets in the virtual network.
It is important to carefully plan your subnets. Here are some things to think about.
●● Service requirements. Each service directly deployed into virtual network has specific requirements
for routing and the types of traffic that must be allowed into and out of subnets. A service may
require, or create, their own subnet, so there must be enough unallocated space for them to do so.
For example, if you connect a virtual network to an on-premises network using an Azure VPN Gate-
way, the virtual network must have a dedicated subnet for the gateway.
●● Virtual appliances. Azure routes network traffic between all subnets in a virtual network, by default.
You can override Azure's default routing to prevent Azure routing between subnets, or to route traffic
between subnets through a network virtual appliance. So, if you require that traffic between resources
in the same virtual network flow through a network virtual appliance (NVA), deploy the resources to
different subnets.
✔️ Azure reserves the first three IP addresses and the last IP address in each subnet address range.
✔️ The Review of IP Addressing lesson covers the basics of IP addressing if you need a refresher.
For more information, you can see:
MCT USE ONLY. STUDENT USE PROHIBITED 8 Module 1 Azure Virtual Networks
Subnets - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-VNet-plan-de-
sign-arm#subnets
Services that can be deployed into a virtual network - https://docs.microsoft.com/en-us/azure/
virtual-network/virtual-network-for-azure-services#services-that-can-be-deployed-into-a-virtu-
al-network
1 https://docs.microsoft.com/en-us/azure/virtual-network/quick-create-portal
MCT USE ONLY. STUDENT USE PROHIBITED
Creating Azure Virtual Networks 9
✔️ Always plan to use an address space that is not already in use in your organization, either on-premis-
es or in other VNets. Even if you plan for a VNet to be cloud-only, you may want to make a VPN connec-
tion to it later. If there is any overlap in address spaces at that point, you will have to reconfigure or
recreate the VNet. The next lesson will focus on IP addressing.
For more information, you can see:
What is Azure Virtual Network - https://docs.microsoft.com/en-us/azure/virtual-network/virtu-
al-networks-overview
Networking Limits - https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#net-
working-limits-1
The figure above shows a VM with three NICs, each connected to a different subnet.
●● The order of the NICs from inside the VM will be random and could also change across Azure infra-
structure updates. However, the IP addresses, and the corresponding ethernet MAC addresses will
remain the same. For example, assume Eth1 has IP address 10.1.0.100 and MAC address 00-0D-3A-B0-
39-0D; after an Azure infrastructure update and reboot, it could be changed to Eth2, but the IP and
MAC pairing will remain the same. When a restart is customer-initiated, the NIC order will remain the
same.
●● The address for each NIC on each VM must be in a subnet and multiple NICs on a single VM can each
be assigned addresses that are in the same subnet.
●● The VM size determines the number of NICS that you can create for a VM.
MCT USE ONLY. STUDENT USE PROHIBITED
Creating Azure Virtual Networks 11
The following limitations are applicable when using the multiple NIC feature:
●● All VMs in an availability set need to use either multiple NICs or a single NIC. You cannot have a
mixture of multi NIC VMs and single NIC VMs within an availability set. Same rules apply for VMs in a
cloud service.
●● A VM with single NIC cannot be configured with multiple NICs (and vice-versa) once it is deployed,
without deleting and re-creating it.
For more information, you can see:
Add network interfaces to or remove network interfaces from virtual machines - https://docs.microsoft.
com/en-us/azure/virtual-network/virtual-network-network-interface-vm
Review of IP Addressing
Video: IP Addressing
Overview of IP Addressing
You can assign IP addresses to Azure resources to communicate with other Azure resources, your
on-premises network, and the Internet. There are two types of IP addresses you can use in Azure. Virtual
networks can contain both public and private IP address spaces.
1. Private IP addresses: Used for communication within an Azure virtual network (VNet), and your
on-premises network, when you use a VPN gateway or ExpressRoute circuit to extend your network to
Azure.
2. Public IP addresses: Used for communication with the Internet, including Azure public-facing
services.
IP addresses can also be statically assigned or dynamically assigned. Static IP addresses do not change
and are best for certain situations such as:
●● DNS name resolution, where a change in the IP address would require updating host records.
●● IP address-based security models which require apps or services to have a static IP address.
●● SSL certificates linked to an IP address.
●● Firewall rules that allow or deny traffic using IP address ranges.
●● Role-based VMs such as Domain Controllers and DNS servers.
✔️ As a best practice you may decide to separate dynamically and statically assigned IP resources into
different subnets. And, IP Addresses are never managed from within a virtual machine.
Public IP Addresses
A public IP address resource can be associated with virtual machine network interfaces, internet-facing
load balancers, VPN gateways, and application gateways. Azure can provide an IP address (dynamic
assignment) or you can assign the IP address (static assignment). The type of resource affects the assign-
ment.
MCT USE ONLY. STUDENT USE PROHIBITED
Review of IP Addressing 13
Your SKU choice affects the IP assignment method, security, available resources, and redundancy. This
table summarizes the differences.
Private IP Addresses
A private IP address resource can be associated with virtual machine network interfaces, internal load
balancers, and application gateways. Azure can provide an IP address (dynamic assignment) or you can
assign the IP address (static assignment).
2 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm
3 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm
MCT USE ONLY. STUDENT USE PROHIBITED 14 Module 1 Azure Virtual Networks
A private IP address is allocated from the address range of the virtual network subnet a resource is
deployed in.
●● Dynamic. Azure assigns the next available unassigned or unreserved IP address in the subnet's
address range. For example, Azure assigns 10.0.0.10 to a new resource, if addresses 10.0.0.4-10.0.0.9
are already assigned to other resources. Dynamic is the default allocation method.
●● Static. You select and assign any unassigned or unreserved IP address in the subnet's address range.
For example, if a subnet's address range is 10.0.0.0/16 and addresses 10.0.0.4-10.0.0.9 are already
assigned to other resources, you can assign any address between 10.0.0.10 - 10.0.255.254.
For more information, you can see:
Private IP addresses - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-net-
work-ip-addresses-overview-arm#private-ip-addresses4
Requirements:
●● Create a virtual network called TestVNet. The IP address space is 192.168.0.0/16.
●● Create a subnet within the virtual network called FrontEnd. The address space is 192.168.0.1/24.
4 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-ip-addresses-overview-arm
MCT USE ONLY. STUDENT USE PROHIBITED
Review of IP Addressing 15
●● Create a virtual machine called Web1 (your choice of machine type) and associate it with the new
subnet. You may use an existing virtual machine.
●● Configure the virtual machine to use a static public IP address. Set the IP address to 192.168.1.101.
✔️ You should be able to easily implement this scenario. If you need a hint use the reference links. You
can try this practice in the portal, PowerShell, or CLI.
For more information, you can see:
Create a VM with a static public IP address using the Azure portal - https://docs.microsoft.com/en-us/
azure/virtual-network/virtual-network-deploy-static-pip-arm-portal
Create a VM with a static public IP address using PowerShell - https://docs.microsoft.com/en-us/
azure/virtual-network/virtual-network-deploy-static-pip-arm-ps
Create a VM with a static public IP address using the Azure CLI - https://docs.microsoft.com/en-us/
azure/virtual-network/virtual-network-deploy-static-pip-arm-cli
Requirements:
●● Create a virtual network called TestVNet. The IP address space is 192.168.0.0/16.
●● Create a subnet within the virtual network called FrontEnd. The address space is 192.168.0.1/24.
●● Create a virtual machine called DNS01 (your choice of machine type) and associate it with the new
subnet. You may use an existing virtual machine.
●● Configure the virtual machine to use a static private IP address. Set the IP address to 192.168.1.102.
✔️ You cannot set a static private IP address during the creation of a VM in the Resource Manager
deployment mode by using the Azure portal. You must create the VM first, then set its private IP to be
static. Use the reference link to explore different configuration options.
For more information, you can see:
Configure private IP addresses for a virtual machine using the Azure portal - https://docs.microsoft.
com/en-us/azure/virtual-network/virtual-networks-static-private-ip-arm-pportal
MCT USE ONLY. STUDENT USE PROHIBITED 16 Module 1 Azure Virtual Networks
Network Routing
System Routes
Azure uses system routes to direct network traffic between virtual machines, on-premises networks, and
the Internet. The following situations are managed by these system routes:
●● Traffic between VMs in the same subnet.
●● Between VMs in different subnets in the same virtual network.
●● Data flow from VMs to the Internet.
●● Communication between VMs using a VNet-to-VNet VPN.
●● Site-to-Site and ExpressRoute communication through the VPN gateway.
For example, consider this virtual network with two subnets. Communication between the subnets and
from the frontend to the internet are all managed by Azure using the default system routes.
Information about the system routes is recorded in a route table. A route table contains a set of rules,
called routes, that specifies how packets should be routed in a virtual network. Route tables are associat-
ed to subnets, and each packet leaving a subnet is handled based on the associated route table. Packets
are matched to routes using the destination. The destination can be an IP address, a virtual network
gateway, a virtual appliance, or the internet. If a matching route can't be found, then the packet is
dropped.
For more information, you can see:
System routes - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-net-
works-udr-overview#system-routes
MCT USE ONLY. STUDENT USE PROHIBITED 18 Module 1 Azure Virtual Networks
In these situations, you can configure user-defined routes (UDRs). UDRs control network traffic by
defining routes that specify the next hop of the traffic flow. This hop can be a virtual network gateway,
virtual network, internet, or virtual appliance.
✔️ Each route table can be associated to multiple subnets, but a subnet can only be associated to a
single route table. There are no additional charges for creating route tables in Microsoft Azure. Do you
think you will need to create custom routes?
For more information, you can see:
Custom routes - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-net-
works-udr-overview#custom-routes
Routing Example
Let’s look at a specific example where you have a virtual network that includes 3 subnets: Private, DMZ,
and Public. In the DMZ subnet there is a network virtual appliance (NVA). You want to ensure all traffic
from the Public subnet goes through the NVA to the Private subnet.
MCT USE ONLY. STUDENT USE PROHIBITED
Network Routing 19
Let’s look at how we could implement this scenario by creating the route table, creating the route, and
associating the route to the subnet.
✔️ There is practice exercise that includes a complete set of steps for this scenario, including creating the
virtual appliance and testing.
BGP is the standard routing protocol commonly used on the Internet to exchange routing and reachabili-
ty information between two or more networks. Routes are automatically added to the route table of all
subnets with BGP propagation enabled. In many situations this is what you want. For example, if you are
using ExpressRoute you would want all subnets to know about that routing. Read more at the reference
links.
For more information, you can see:
Border gateway protocol - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-net-
works-udr-overview#border-gateway-protocol
Overview of BGP with Azure VPN Gateways - https://docs.microsoft.com/en-us/azure/vpn-gateway/
vpn-gateway-bgp-overview?toc=%2fazure%2fvirtual-network%2ftoc.json
Notice this route applies to any address prefixes in 10.0.1.0/24 (private subnet). Traffic headed to these
addresses will be sent to the virtual appliance with a 10.0.2.4 address.
Associate Route to Subnet
Each subnet can have zero or one route table associated to it. In this example, our Public subnet will be
associated with the routing table.
MCT USE ONLY. STUDENT USE PROHIBITED
Network Routing 21
✔️ In this case the virtual appliance should not have a public IP address and IP forwarding should be ena-
bled. Be sure to try the practice.
Routing Algorithms
So far routing has been fairly straightforward, but what if a destination address matches two routes in the
routing table? Azure sorts this out in two ways: longest prefix match algorithm, and route priorities.
Longest prefix match algorithm
For example, if the destination address is 10.0.0.5 and there are two routes: One route specifies the
10.0.0.0/24 address prefix, while the other route specifies the 10.0.0.0/16 address prefix. In this case,
Azure selects a route using the longest prefix match algorithm, which is the 10.0.0.0/24 route.
5 https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-create-route-table-portal
6 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview#routing-example
7 https://docs.microsoft.com/en-us/azure/virtual-network/manage-route-table
MCT USE ONLY. STUDENT USE PROHIBITED
Module 1 Review Questions 23
●● Scalability. The Microsoft global network of name servers has the scale and redundancy to give you
ultra-high availability for your domains. With Azure DNS, you can be confident that your DNS will
always be available.
●● Updating. When you add a new DNS record, the Azure DNS name servers are updated in a few
seconds—so you don’t have to wait long before that DNS record can be used.
●● Management. Can be managed via the Azure portal, Azure PowerShell cmdlets, and the cross-plat-
form Azure CLI. Applications requiring automatic DNS management can integrate with the service via
the REST API and SDKs.
✔️ Have you thought about using Azure for your DNS needs?
For more information, you can see:
Azure DNS - https://azure.microsoft.com/en-us/services/dns/
What is DNS? - https://docs.microsoft.com/en-us/azure/dns/dns-overview
Azure DNS FAQ - https://docs.microsoft.com/en-us/azure/dns/dns-faq
DNS Domains
The DNS is a hierarchy of domains. The hierarchy starts from the ‘root’ domain, whose name is simply '.'.
Below this come top-level domains, such as ‘com’, 'net', ‘org’, 'uk' or ‘jp’. Below these are second-level
domains, such as 'org.uk' or ‘co.jp’. The domains in the DNS hierarchy are globally distributed, hosted by
DNS name servers around the world.
1. Root Domain. The DNS namespace organizes host names and IP addresses into a hierarchical tree. At
the top is the root domain.
2. Top-Level Domain. Under the root domain are top-level domains such as org, edu, com, gov, and
mil. There are also two letter country code designations such as au and us.
3. Second-Level Domain. Examples of second-level domains are: contoso, adatum, and fabrikam. These
domains are private domains owned and managed locally.
4. Sub-Domain. Sub-domains under a second-level domain could include: sales and research.
5. Individual Machine. An individual machine within the sales sub-domain would be uniquely refer-
enced as sales1.sales.adatum.com.
MCT USE ONLY. STUDENT USE PROHIBITED
Azure DNS Basics 27
✔️ Azure DNS does not currently support purchasing of domain names. If you want to purchase do-
mains, you'll need to use a third-party domain name registrar. The registrar will typically charge a small
annual fee. Purchasing a domain name gives you the right to control the DNS hierarchy under that name.
For example, allowing you to direct the name ‘www.contoso.com’ to your company web site.
For more information, you can see:
Domain Names - https://docs.microsoft.com/en-us/azure/dns/dns-zones-records#domain-names1
DNS Zones
A DNS zone hosts the DNS records for a domain. So, to start hosting your domain in Azure DNS, you
need to create a DNS zone for that domain name. Each DNS record for your domain is then created
inside this DNS zone.
From the portal you can easily add a DNS zone and then view information including name, number of
records, resource group, location (always global), subscription, and name servers.
1 https://docs.microsoft.com/en-us/azure/dns/dns-zones-records
MCT USE ONLY. STUDENT USE PROHIBITED 28 Module 2 Azure DNS
DNS Resolution
Azure DNS provides an authoritative DNS service for domain name resolution. Name resolution is the
process by which a computer name is resolved to an IP address. That means it hosts DNS zones and
answers DNS queries for records only in those zones. To answer queries, it uses a special type of DNS
record called a Name Server (NS) record.
For example, the root zone contains NS records for ‘com’ and shows the name servers for the ‘com’ zone.
In turn, the ‘com’ zone contains NS records for ‘contoso.com’, which shows the name servers for the
‘contoso.com’ zone. Setting up the NS records is called delegating the domain.
MCT USE ONLY. STUDENT USE PROHIBITED
Azure DNS Basics 29
There are two copies of the NS records; one in the parent zone pointing to the child, and another in the
child zone itself. The ‘contoso.com’ zone contains the NS records for ‘contoso.com’ (in addition to the NS
records in ‘com’). These are called authoritative NS records and they sit at the apex of the child zone.
For more information, you can see:
Resolution and delegation - https://docs.microsoft.com/en-us/azure/dns/dns-domain-delega-
tion#resolution-and-delegation
2 https://docs.microsoft.com/en-us/azure/dns/dns-operations-dnszones-portal
3 https://docs.microsoft.com/en-us/azure/dns/dns-operations-recordsets-portal
MCT USE ONLY. STUDENT USE PROHIBITED 30 Module 2 Azure DNS
●● Update a record.
●● Remove a record from a record set.
●● Delete a record set.
●● Work with Name Server and SOA records.
✔️If you prefer, use the reference links for PowerShell and CLI tasks.
For more information, you can see:
Manage DNS records and record sets in Azure DNS using Azure PowerShell- https://docs.microsoft.
com/en-us/azure/dns/dns-operations-recordsets
Manage DNS records and record sets in Azure DNS using the Azure CLI 2.0 – https://docs.microsoft.
com/en-us/azure/dns/dns-operations-recordsets-cli
MCT USE ONLY. STUDENT USE PROHIBITED
Implementing Azure DNS 31
DNS Delegation
To delegate your domain to Azure DNS, you first need to know the name server names for your zone.
Each time a DNS zone is created Azure DNS allocates name servers from a pool. Once the Name Servers
are assigned, Azure DNS automatically creates authoritative NS records in your zone.
The easiest way to see the name servers assigned to your zone is through the Azure portal. In this
example, the zone ‘contoso.net’ has been assigned four name servers: ‘ns1-01.azure-dns.com’, ‘ns2-01.
azure-dns.net’, ‘ns3-01.azure-dns.org’, and ‘ns4-01.azure-dns.info’:
You can also discover the NS records with PowerShell, use Get-AzureRmDnsZone and Get-AzureRMDns-
RecordSet. Note that the record name “@” is used to refer to records at the apex of the zone.
# Retrieve the zone information
$zone = Get-AzureRmDnsZone –Name contoso.net –ResourceGroupName MyResource-
Group
# Retrieve the name server records
Get-AzureRmDnsRecordSet –Name “@” –RecordType NS –Zone $zone
Once the DNS zone is created, and you have the name servers, you need to update the parent domain.
Each registrar has their own DNS management tools to change the name server records for a domain. In
the registrar’s DNS management page, edit the NS records and replace the NS records with the ones
Azure DNS created.
✔️ When delegating a domain to Azure DNS, you must use the name server names provided by Azure
DNS. You should always use all four name server names, regardless of the name of your domain.
Delegating Sub-Domains
If you want to set up a separate child zone, you can delegate a sub-domain in Azure DNS. For example,
after configuring contoso.com in Azure DNS, you could configure a separate child zone for partners.
contoso.com.
MCT USE ONLY. STUDENT USE PROHIBITED 32 Module 2 Azure DNS
Setting up a sub-domain follows the same process as typical delegation. The only difference, step 3, is
that NS records must be created in the parent zone contoso.com in Azure DNS, rather than in the domain
registrar.
The following PowerShell example demonstrates how this works. The same steps can be executed via the
Azure Portal, or via the cross-platform Azure CLI.
✔️ The parent and child zones can be in the same or different resource group. Notice that the record set
name in the parent zone matches the child zone name, in this case “partners”.
●● Query Volume. The Query Volume metric in Azure DNS shows the volume of DNS queries (query
traffic) that is received by Azure DNS for your DNS zone. The unit of measurement is Count and the
aggregation is the total of all the queries received in a specified time.
●● Record Set Capacity Utilization. The Record Set Capacity Utilization metric in Azure DNS shows the
percentage of utilization of your Record set capacity for a DNS Zone. Every DNS zone is subject to a
Record set. This metric shows you how close you are to hitting the Record set limit.
●● Record Set Count. The Record Set Count metric shows the number of Record sets in Azure DNS for
your DNS zone. All the Records sets defined in your zone are counted. The unit of measurement is
Count and the aggregation is the Maximum of all the Record sets.
✔️Azure Monitor provides the capability to alert against available metric values.
For more information, you can see:
Azure DNS metrics and alerts - https://docs.microsoft.com/en-us/azure/dns/dns-alerts-metrics
4 https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal
MCT USE ONLY. STUDENT USE PROHIBITED 34 Module 2 Azure DNS
5 https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns
6 https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-powershell
MCT USE ONLY. STUDENT USE PROHIBITED
Module 2 Review Questions 35
DNS Delegation
You move your on-premises DNS servers to Azure DNS. How should you proceed to update your domain
registrar? When delegating a domain to Azure DNS, which name servers should you use?
MCT USE ONLY. STUDENT USE PROHIBITED 36 Module 2 Azure DNS
After discovering your name servers, you need to update the parent domain. Each registrar has their own
DNS management tools to change the name server records for a domain. In the registrar’s DNS manage-
ment page, edit the NS records and replace the NS records with the ones Azure DNS created.
When delegating a domain to Azure DNS, you must use the name server names provided by Azure DNS.
You should always use all four name server names, regardless of the name of your domain.
MCT USE ONLY. STUDENT USE PROHIBITED
Module 3 Securing Virtual Network Resources
✔️ To simplify management of security rules, it's recommended that you associate a network security
group to individual subnets, rather than individual network interfaces within the subnet.
For more information, you can see:
Network Security Groups - https://docs.microsoft.com/en-us/azure/virtual-network/security-over-
view#network-security-groups1
NSG Rules
Security rules in network security groups enable you to filter the type of network traffic that can flow in
and out of virtual network subnets and network interfaces. Azure creates several default security rules
within each network security group.
You can add more rules by specifying Name, Priority, Port, Protocol (Any, TCP, UDP), Source (Any, IP
Addresses, Service tag), Destination (Any, IP Addresses, Virtual Network), and Action (Allow or Deny). You
cannot delete the default rules, but you can add other rules with a higher priority.
✔️ Take minute to locate the Virtual Machines Networking blade. Review the settings that are available
when you add inbound and outbound port rules. Also, check out the Effective security rules link. Your
virtual machine must be running for the rules to load.
For more information, you can see:
1 https://docs.microsoft.com/en-us/azure/virtual-network/security-overview
MCT USE ONLY. STUDENT USE PROHIBITED
Introduction to Network Security Groups 39
In the above example if there was incoming traffic on port 80, you would need to have the NSG at subnet
level ALLOW port 80, and you would also need another NSG with ALLOW rule on port 80 at the NIC level.
For incoming traffic, the NSG set at the subnet level is evaluated first, then the NSG set at the NIC level is
evaluated. For outgoing traffic, it is the converse.
If you have several NSGs and are not sure which security rules are being applied, you can use the Effec-
tive security rules link. For example, you could verify the security rules being applied to a network
interface.
2 https://docs.microsoft.com/en-us/azure/virtual-network/security-overview
3 https://docs.microsoft.com/en-us/azure/virtual-network/security-overview
MCT USE ONLY. STUDENT USE PROHIBITED 40 Module 3 Securing Virtual Network Resources
NSG Scenarios
Your subnet designs will affect your NSG associations. For example, let’s assume you have two apps
(App1 and App2). Each app has front-end (web servers) and backend (workload) resources. Consider
these three designs.
Service. The service specifies the destination protocol and port range for this rule. You can choose a
predefined service, like HTTPS and SSH. When you select a service the Port range is automatically com-
pleted. Choose custom to provide your own port range.
Port ranges. If you choose a custom service then provide a single port, such as 80; a port range, such as
1024-65635; or a comma-separated list of single ports and/or port ranges, such as 80, 1024-65535. This
specifies on which ports traffic will be allowed or denied by this rule. Provide an asterisk (*) to allow traffic
on any port.
Priority. Rules are processed in priority order. The lower the number, the higher the priority. We recom-
mend leaving gaps between rules – 100, 200, 300, etc. This is so it is easier to add new rules without
editing existing rules. Enter a value between 100-4096 that is unique for all security rules within the
network security group.
✔️Take a minute to locate the Advanced rule page. Are there any services you are interested in?
For more information, you can see:
Create a security rule - https://docs.microsoft.com/en-us/azure/virtual-network/manage-net-
work-security-group#create-a-security-rule
MCT USE ONLY. STUDENT USE PROHIBITED 42 Module 3 Securing Virtual Network Resources
4 https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-filter-network-traffic
5 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-nsg-manage-log
MCT USE ONLY. STUDENT USE PROHIBITED
Implementing Network Security Groups and Service Endpoints 43
Service Endpoints
Virtual network service endpoints enable you to limit network access to Azure service resources. Access is
limited to just the virtual network subnets and IP addresses you specify. Currently, Azure supports service
endpoints to these services: Cosmos DB, Event Hub, Key Vault, SQL, and Storage. Endpoints allow you to
secure your critical Azure service resources to your virtual networks.
6 https://docs.microsoft.com/en-us/azure/virtual-network/diagnose-network-traffic-filter-problem
MCT USE ONLY. STUDENT USE PROHIBITED 44 Module 3 Securing Virtual Network Resources
endpoints. Service endpoints are configured through a simple click on a subnet. There is no additional
overhead to maintaining the endpoints.
✔️ Can you see using service endpoints in your organization?
For more information, you can see:
Virtual network service endpoints - https://docs.microsoft.com/en-us/azure/virtual-network/
virtual-network-service-endpoints-overview
Limitations of network service endpoints - https://docs.microsoft.com/en-us/azure/virtual-network/
virtual-network-service-endpoints-overview#limitations
The steps necessary to restrict network access to Azure services varies across services. For accessing a
storage account, you would use the Firewalls and virtual networks blade to add/create the virtual net-
works that will have access. You may also configure to allow access to one or more public IP ranges.
✔️It is important to test and ensure the service endpoint is limiting access as expected. You will do this in
the practice exercise.
MCT USE ONLY. STUDENT USE PROHIBITED
Implementing Network Security Groups and Service Endpoints 45
7 https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-restrict-network-access-to-resources
MCT USE ONLY. STUDENT USE PROHIBITED 46 Module 3 Securing Virtual Network Resources
Endpoints
You manage a database server instance that hosts personal customer information which cannot be
exposed to the internet or exported to countries/regions in the European Union. You need to limit access
to the information to users on your corporate network.
How can you use a service endpoint to achieve your goal?
MCT USE ONLY. STUDENT USE PROHIBITED
Module 3 Review Questions 47
Intersite Connectivity
Video: Virtual Network Connectivity
Virtual Network Connectivity
In this video Corey covers the ways virtual networks can be connected. In this course, we will only cover
VNet Peering and VNet-to-VNet. A second course will cover ExpressRoute and Site-to-Site connections.
VNet-to-VNet Connections
You can connect your VNets with a VNet-to-VNet VPN connection. Using this connection method, you
create a VPN gateway in each virtual network. The VPN gateway can also be used to provide a connec-
tion to an on-premises network. This is called a Site-to-Site (S2S) connection. In both cases a secure
tunnel using IPsec/IKE provides the communication between the networks.
MCT USE ONLY. STUDENT USE PROHIBITED 50 Module 4 Connecting Virtual Networks
●● Name and Gateway Type. Name your gateway and use the VPN Gateway type.
●● VPN Type. Most VPN types are Route-based.
●● SKU. Use the drop-down to select a gateway SKU1. Your choice will affect the number of tunnels you
can have and the aggregate throughput benchmark. The benchmark is based on measurements of
multiple tunnels aggregated through a single gateway. It is not a guaranteed throughput due to
Internet traffic conditions and your application behaviors.
●● Virtual Networks. Associate a virtual network with the gateway. Before you do this, you must
configure the gateway subnet. Each virtual network will need its own VPN gateway.
●● IP Address. The gateway needs a public IP address to its IP configuration to enable it to communicate
with the remote network.
It can take up to 45 minutes to provision the VPN gateway.
✔️Be sure to use the reference link and read more about the VPN gateway configuration. And, continue
to the next page for configuring the connections between the VPN gateways.
For more information, you can see:
Create a virtual network gateway - https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gate-
way-howto-vnet-vnet-resource-manager-portal#VNetGateway
VPN Types - https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-gate-
way-settings#vpntype
1 https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-gateway-settings
MCT USE ONLY. STUDENT USE PROHIBITED 52 Module 4 Connecting Virtual Networks
For example, you could add a connection between TestVNet1GW and TestVNet4GW. In the Shared key
field, type a shared key for your connection. You can generate or create this key yourself.
✔️ If your VNets are in different subscriptions, you must use PowerShell to make the connection. You can
use the New-AzureRmVirtualNetworkGatewayConnection2 command. This command can also be
used for Site-to-Site connections.
For more information, you can see:
Configure the TestVNet1 gateway connection - https://docs.microsoft.com/en-us/azure/vpn-gate-
way/vpn-gateway-howto-vnet-vnet-resource-manager-portal#TestVNet1Connection
2 https://docs.microsoft.com/en-us/powershell/module/azurerm.network/new-azurermvirtualnetworkgatewayconnection?view=azur-
ermps-6.3.0
MCT USE ONLY. STUDENT USE PROHIBITED
Intersite Connectivity 53
3 https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-vnet-vnet-resource-manager-portal
4 https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-tutorial-create-gateway-powershell
MCT USE ONLY. STUDENT USE PROHIBITED 54 Module 4 Connecting Virtual Networks
The benefits of using virtual network peering, whether regional or global, include:
●● Security. Network traffic between peered virtual networks is private. Traffic between the virtual
networks is kept on the Microsoft backbone network.
●● Performance. Once virtual networks are peered, resources in both virtual networks can communicate
with each other, with the same latency and bandwidth as if the resources were in the same virtual
network.
●● Seamless. The ability for resources in one virtual network to communicate with resources in a differ-
ent virtual network once the virtual networks are peered. The ability to transfer data across Azure
subscriptions, deployment models, and across Azure regions.
●● Efficient. No downtime to resources in either virtual network when creating the peering, or after the
peering is created. Peering is easy to configure and manage.
5 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview
MCT USE ONLY. STUDENT USE PROHIBITED
Virtual Network Peering 55
✔️ The default VNet peering configuration provides full connectivity. Can you see how network security
groups could be applied to block or deny access to specific subnets or virtual machines?
For more information, you can see:
Virtual network peering - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-net-
work-peering-overview
To configure the peering use the Add peering blade. There are only a few optional configuration parame-
ters to consider. Remember you must configure the peering on each virtual network. For example, if you
select ‘allow gateway transit’ on one virtual network; then you should select ‘use remote gateways’ on the
other virtual network.
●● Allow forwarded traffic. Allows traffic not originating from within the peer virtual network into your
virtual network.
●● Allow gateway transit. Allows the peer virtual network to use your virtual network gateway. The peer
cannot already have a gateway configured.
●● Use remote gateways. Use your peer’s virtual gateway. Only one virtual network can have this
enabled.
Use the reference link to get the complete details about the peering configuration options. The gateway
option will be discussed in more detail in an upcoming topic.
MCT USE ONLY. STUDENT USE PROHIBITED 56 Module 4 Connecting Virtual Networks
✔️ Remember If virtual network address spaces overlap, the virtual networks cannot be peered.
For more information, you can see:
Create a peering - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-man-
age-peering#create-a-peering6
●● Initiated. When you create the peering to the second virtual network from the first virtual network,
the peering status is Initiated.
●● Connected. When you create the peering from the second virtual network to the first virtual network,
its peering status is Connected. If you view the peering status for the first virtual network, you see its
status changed from Initiated to Connected.
Requirements and constraints
The benefits and configuration steps are the same as for regional peering, but there are some special
requirements.
●● Public clouds. The virtual networks can exist in any Azure public cloud region, but not in Azure
national clouds. National clouds are physical and logical network-isolated instances of Microsoft
enterprise cloud services, which are confined within the geographic borders of specific countries and
operated by local personnel. There are very specific customer requirements to using and operating
national clouds.
●● Virtual network resources. Resources in one virtual network cannot communicate with the IP
address of an Azure internal load balancer in the peered virtual network. The load balancer and the
resources that communicate with it must be in the same virtual network.
●● Gateway transit. You should not configure ‘use remote gateways’ or ‘allow gateway transit’. Gateway
transit only applies to regional VNet peering.
●● Transitivity. VNet global peerings are not transitive meaning downstream VNets in one region cannot
talk with downstream VNets in another region. If you create peerings between VNet1-VNet2 and
VNet2-VNet3, there is no implied peering between VNet1 and VNet3.
●● Virtual machines. Peering high performance compute7 and GPU8 virtual machines is not supported.
For example, H, NC, NV, NCv2, NCv3, and ND series VMs.
For more information, you can see:
How to setup Global VNet peering in Azure - https://blogs.msdn.microsoft.com/azu-
reedu/2018/04/24/how-to-setup-global-vnet-peering-in-azure/
6 https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering
7 https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-hpc
8 https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-gpu
MCT USE ONLY. STUDENT USE PROHIBITED
Virtual Network Peering 57
Gateway Transit
When you allow gateway transit the virtual network can communicate to resources outside the peering.
For example, the subnet gateway could:
●● Use a site-to-site VPN to connect to an on-premises network.
●● Use a VNet-to-VNet connection to another virtual network.
●● Use a point-to-site VPN to connect to a client.
In these scenarios, gateway transit allows peered virtual networks to share the gateway and get access to
resources. This means you do not need to deploy a VPN gateway in the peer virtual network.
When you create your virtual network gateway, gateway VMs are deployed to the gateway subnet and
configured with the required VPN gateway settings. You must never deploy anything else (for example,
additional VMs) to the gateway subnet. The gateway subnet must be named ‘GatewaySubnet’.
To deploy a gateway in your virtual network simply add a gateway subnet.
This architecture is often referred to as a hub-spoke topology in Azure. In the illustration at the beginning
of this topic, VNet1 is the hub and acts as a central point of connectivity to external resources. VNet2 is
the spoke that peers with the hub and can be used to isolate workloads.
✔️ When working with gateway subnets, avoid associating a network security group (NSG) to the
gateway subnet. Associating a network security group to this subnet may cause your VPN gateway to
stop functioning as expected.
For more information, you can see:
Gateway transit - https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peer-
ing-gateway-transit?toc=%2fazure%2fvirtual-network%2ftoc.json
MCT USE ONLY. STUDENT USE PROHIBITED 58 Module 4 Connecting Virtual Networks
9 https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peering-gateway-transit?toc=%2fazure%2fvirtual-network%2ftoc.json
10 https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-gateway-settings
11 https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal
MCT USE ONLY. STUDENT USE PROHIBITED
Module 4 Review Questions 59
VNet Peering
You configure a VNet-to-VNet connection between two VNets hosted in Azure across two regions. The
VNets contain virtual machines (VMs) used for a business-critical application.
How can you verify that the VNet peering has been successfully established? What are the benefits and
constraints for global VNet peering?
●● Virtual machines. Peering high performance compute and GPU virtual machines is not supported. For
example, H, NC, NV, NCv2, NCv3, and ND series VMs.
VNet Peering
You configure VNet peering between two virtual networks. You create a virtual machine (VM) in each
network to test communication. What configuration options should you consider?
Lab
Lab
Scenario
Adatum Corporation wants to implement service chaining between Azure virtual networks in its Azure
subscription.
Exercise 0
Prepare the Azure environment.
Exercise 1
Configure VNet peering.
Exercise 2
Implement custom routing.
Exercise 3
Validating service chaining.
Estimated Time: 120 minutes
✔️ If you are in a classroom, ask your instructor for the lab guide. If you are in a self-paced online course,
check the Course Handouts page.
MCT USE ONLY. STUDENT USE PROHIBITED 62 Module 5 Lab-Configure and Manage Virtual Networks