Module5 Intersite Connectivity
Module5 Intersite Connectivity
Perhaps the simplest and quickest way to connect your VNets is to use VNet peering. Virtual network peering
enables you to seamlessly connect two Azure virtual networks. Once peered, the virtual networks appear as one,
for connectivity purposes. There are two types of VNet peering.
Private. Network traffic between peered virtual networks is private. Traffic between the virtual
networks is kept on the Microsoft backbone network. No public Internet, gateways, or encryption is
required in the communication between the virtual networks.
Performance. A low-latency, high-bandwidth connection between resources in different virtual
networks.
Communication. The ability for resources in one virtual network to communicate with resources in a
different virtual network, once the virtual networks are peered.
Seamless. The ability to transfer data across Azure subscriptions, deployment models, and across Azure
regions.
No disruption. No downtime to resources in either virtual network when creating the peering, or after
the peering is created.
Cloud regions. When creating a global peering, the peered virtual networks can exist in any Azure
public cloud region or China cloud regions, but not in Government cloud regions. You can only peer virtual
networks in the same region in Azure Government cloud regions.
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.
When you Allow Gateway Transit the virtual network can communicate to resources outside the peering. For
example, the subnet gateway could:
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.
✔️The default VNet peering configuration provides full connectivity. Network security groups can be applied
in either virtual network to block access to other virtual networks or subnets, if desired. When configuring
virtual network peering, you can either open or close the network security group rules between the virtual
networks.
To configure the peering use the Add peering page. There are only a few optional configuration parameters to
consider.
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.
✔️When you add a peering on one virtual network, the second virtual network configuration is automatically
added.
✔️If you select ‘Allow gateway transit’ on one virtual network; then you should select ‘Use remote gateways’
on the other virtual network.
Service Chaining
VNet Peering is nontransitive. This means that if you establish VNet Peering between VNet1 and VNet2 and
between VNet2 and VNet3, VNet Peering capabilities do not apply between VNet1 and VNet3. However, you
can leverage user-defined routes and service chaining to implement custom routing that will provide transitivity.
This allows you to:
Service chaining enables you to direct traffic from one virtual network to a virtual appliance, or virtual network
gateway, in a peered virtual network, through user-defined routes.
Checking connectivity
You can check the status of the VNet peering. The peering is not successfully established until the peering
status for both virtual network peerings shows Updating.
Updating. 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,
the status is changed from Initiated to Connected.
VPN Gateways
A VPN gateway is a specific type of virtual network gateway that is used to send encrypted traffic between an
Azure virtual network and an on-premises location over the public Internet. You can also use a VPN gateway to
send encrypted traffic between Azure virtual networks over the Microsoft network. Each virtual network can
have only one VPN gateway. However, you can create multiple connections to the same VPN gateway. When
you create multiple connections to the same VPN gateway, all VPN tunnels share the available gateway
bandwidth.
A virtual network gateway is composed of two or more VMs that are deployed to a specific subnet you create
called the gateway subnet. Virtual network gateway VMs contain routing tables and run specific gateway
services. These VMs are created when you create the virtual network gateway. You can't directly configure the
VMs that are part of the virtual network gateway.
VPN gateways can be deployed in Azure Availability Zones. This brings resiliency, scalability, and higher
availability to virtual network gateways. Deploying gateways in Azure Availability Zones physically and
logically separates gateways within a region, while protecting your on-premises network connectivity to Azure
from zone-level failures.
Create VNets and subnets. By now you should be familiar with creating virtual networks and subnets.
Remember for this VNet to connect to an on-premises location. You need to coordinate with your on-premises
network administrator to reserve an IP address range that you can use specifically for this virtual network.
Specify the DNS server (optional). DNS is not required to create a Site-to-Site connection. However, if you
want to have name resolution for resources that are deployed to your virtual network, you should specify a DNS
server in the virtual network configuration.
✔️Take time to carefully plan your network configuration. If a duplicate IP address range exists on both sides
of the VPN connection, traffic will not route the way you may expect it to.
Create the Gateway Subnet
Before creating a virtual network gateway for your virtual network, you first need to create the gateway subnet.
The gateway subnet contains the IP addresses that are used by the virtual network gateway. If possible, it's best
to create a gateway subnet by using a CIDR block of /28 or /27 to provide enough IP addresses to accommodate
future additional configuration requirements.
When you create your gateway subnet, gateway VMs are deployed to the gateway subnet and configured with
the required VPN gateway settings. You must never deploy other resources (for example, additional VMs) to
the gateway subnet. The gateway subnet must be named GatewaySubnet.
✔️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.
✔️After the gateway is created, view the IP address that has been assigned to it by looking at the virtual
network in the portal. The gateway should appear as a connected device.
The VPN type you select must satisfy all the connection requirements for the solution you want to create. For
example, if you want to create a S2S VPN gateway connection and a P2S VPN gateway connection for the
same virtual network, you would use VPN type Route-based because P2S requires a Route-based VPN type.
You would also need to verify that your VPN device supported a Route-based VPN connection.
Route-based VPNs. Route-based VPNs use routes in the IP forwarding or routing table to direct
packets into their corresponding tunnel interfaces. The tunnel interfaces then encrypt or decrypt the packets
in and out of the tunnels. The policy (or traffic selector) for Route-based VPNs are configured as any-to-any
(or wild cards).
Policy-based VPNs. Policy-based VPNs encrypt and direct packets through IPsec tunnels based on the
IPsec policies configured with the combinations of address prefixes between your on-premises network and
the Azure VNet. The policy (or traffic selector) is usually defined as an access list in the VPN device
configuration. When using a Policy-based VPN, keep in mind the following limitations:
Policy-Based VPNs can only be used on the Basic gateway SKU and is not compatible with
other gateway SKUs.
You can have only 1 tunnel when using a Policy-based VPN.
You can only use Policy-based VPNs for S2S connections, and only for certain configurations.
Most VPN Gateway configurations require a Route-based VPN.
✔️Once a virtual network gateway has been created, you can't change the VPN type.
Address Space. One or more IP address ranges (in CIDR notation) that define your local network's address
space. For example: 192.168.0.0/16. If you plan to use this local network gateway in a BGP-enabled
connection, then the minimum prefix you need to declare is the host address of your BGP Peer IP address on
your VPN device.
A shared key. This is the same shared key that you will specify when creating the VPN connection
(next step).
The public IP address of your VPN gateway. When you created the VPN gateway you may have
configured a new public IP address or used an existing IP address.
✔️Depending on the VPN device that you have, you may be able to download a VPN device configuration
script.
Active/active
You can now create an Azure VPN gateway in an active-active configuration, where both instances of the
gateway VMs will establish S2S VPN tunnels to your on-premises VPN device.
In this configuration, each Azure gateway instance will have a unique public IP address, and each will establish
an IPsec/IKE S2S VPN tunnel to your on-premises VPN device specified in your local network gateway and
connection. Note that both VPN tunnels are actually part of the same connection. You will still need to
configure your on-premises VPN device to accept or establish two S2S VPN tunnels to those two Azure VPN
gateway public IP addresses.
Because the Azure gateway instances are in active-active configuration, the traffic from your Azure virtual
network to your on-premises network will be routed through both tunnels simultaneously, even if your on-
premises VPN device may favor one tunnel over the other. Note though the same TCP or UDP flow will always
traverse the same tunnel or path, unless a maintenance event happens on one of the instances.
When a planned maintenance or unplanned event happens to one gateway instance, the IPsec tunnel from that
instance to your on-premises VPN device will be disconnected. The corresponding routes on your VPN devices
should be removed or withdrawn automatically so that the traffic will be switched over to the other active IPsec
tunnel. On the Azure side, the switch over will happen automatically from the affected instance to the active
instance.
Demonstration - VPN Gateway Connections
In this demonstration, we will explore virtual network gateways.
Note: This demonstration works best with two virtual networks with subnets. All the steps are in the portal.
1. Search for Connections.
2. Click + Add.
3. Notice the Connection type can be VNet-to-VNet, Site-to-Site (IPsec), or ExpressRoute.
4. Provide enough information, so you can click the Ok button.
5. On the Settings page, notice that you will need select the two different virtual networks.
6. Read the Help information on the Establish bidirectional connnectivity checkbox.
7. Notice the Shared key (PSK) information.
8. Close the Add connection page. You do not need to save your changes.
ExpressRoute
Azure ExpressRoute lets you extend your on-premises networks into the Microsoft cloud over a dedicated
private connection facilitated by a connectivity provider. With ExpressRoute, you can establish connections to
Microsoft cloud services, such as Microsoft Azure, Office 365, and CRM Online.
With ExpressRoute, establish connections to Azure at an ExpressRoute location, such as an Exchange provider
facility, or directly connect to Azure from your existing WAN network, such as a multiprotocol label switching
(MPLS) VPN, provided by a network service provider.
ExpressRoute Capabilities
ExpressRoute is supported across all Azure regions and locations. The following map provides a list of Azure
regions and ExpressRoute locations. ExpressRoute locations refer to those where Microsoft peers with several
service providers. You will have access to Azure services across all regions within a geopolitical region if you
connected to at least one ExpressRoute location within the geopolitical region.
ExpressRoute benefits
Layer 3 connectivity
Microsoft uses BGP, an industry standard dynamic routing protocol, to exchange routes between your on-
premises network, your instances in Azure, and Microsoft public addresses. We establish multiple BGP sessions
with your network for different traffic profiles.
Redundancy
Each ExpressRoute circuit consists of two connections to two Microsoft Enterprise edge routers (MSEEs) from
the connectivity provider/your network edge. Microsoft requires dual BGP connection from the connectivity
provider/your network edge – one to each MSEE. The graphic on the previous topics shows the primary and
secondary connection.
ExpressRoute connections enable access to the following services: Microsoft Azure services, Microsoft Office
365 services, and Microsoft Dynamics 365. Office 365 was created to be accessed securely and reliably via the
Internet, so ExpressRoute requires Microsoft authorization.
You can connect to Microsoft in one of our peering locations and access regions within the geopolitical region.
For example, if you connect to Microsoft in Amsterdam through ExpressRoute, you'll have access to all
Microsoft cloud services hosted in Northern and Western Europe.
You can enable the ExpressRoute premium add-on feature to extend connectivity across geopolitical
boundaries. For example, if you connect to Microsoft in Amsterdam through ExpressRoute, you will have
access to all Microsoft cloud services hosted in all regions across the world (national clouds are excluded).
You can enable ExpressRoute Global Reach to exchange data across your on-premises sites by connecting your
ExpressRoute circuits. For example, if you have a private data center in California connected to ExpressRoute
in Silicon Valley, and another private data center in Texas connected to ExpressRoute in Dallas, with
ExpressRoute Global Reach, you can connect your private data centers together through two ExpressRoute
circuits. Your cross-data-center traffic will traverse through Microsoft's network.
Bandwidth options
You can purchase ExpressRoute circuits for a wide range of bandwidths from 50 Mbps to 10 Gbps. Be sure to
check with your connectivity provider to determine the bandwidths they support.
You can pick a billing model that works best for you. Choose between the billing models listed below.
Unlimited data. Billing is based on a monthly fee; all inbound and outbound data transfer is included
free of charge.
Metered data. Billing is based on a monthly fee; all inbound data transfer is free of charge. Outbound
data transfer is charged per GB of data transfer. Data transfer rates vary by region.
ExpressRoute premium add-on. This add-on includes increased routing table limits, increased number
of VNets, global connectivity, and connections to Office 365 and Dynamics 365. Read more in the FAQ
link.
Coexisting Site-to-Site and ExpressRoute
ExpressRoute is a direct, private connection from your WAN (not over the public Internet) to Microsoft
Services, including Azure. Site-to-Site VPN traffic travels encrypted over the public Internet. Being able to
configure Site-to-Site VPN and ExpressRoute connections for the same virtual network has several advantages.
You can configure a Site-to-Site VPN as a secure failover path for ExpressRoute or use Site-to-Site VPNs to
connect to sites that are not part of your network, but that are connected through ExpressRoute. Notice that this
configuration requires two virtual network gateways for the same virtual network, one using the gateway
type VPN, and the other using the gateway type ExpressRoute.
If you are co-located in a facility with a cloud exchange, you can order virtual cross-connections to the
Microsoft cloud through the co-location provider’s Ethernet exchange. Co-location providers can offer either
Layer 2 cross-connections, or managed Layer 3 cross-connections between your infrastructure in the co-location
facility and the Microsoft cloud.
You can connect your on-premises datacenters/offices to the Microsoft cloud through point-to-point Ethernet
links. Point-to-point Ethernet providers can offer Layer 2 connections, or managed Layer 3 connections
between your site and the Microsoft cloud.
You can integrate your WAN with the Microsoft cloud. IPVPN providers, typically Multiprotocol Label
Switching (MPLS) VPN, offer any-to-any connectivity between your branch offices and datacenters. The
Microsoft cloud can be interconnected to your WAN to make it appear just like any other branch office. WAN
providers typically offer managed Layer 3 connectivity.
✔️Currently, the deployment options for S2S and ExpressRoute coexisting connections are only possible
through PowerShell, and not the Azure portal.
Azure Services
Connection Bandwidths Protocols Typical Use Case
Supported
Virtual WANs
Azure Virtual WAN is a networking service that provides optimized and automated branch connectivity to, and
through, Azure. Azure regions serve as hubs that you can choose to connect your branches to. You can leverage
the Azure backbone to also connect branches and enjoy branch-to-VNet connectivity. There is a list of partners
that support connectivity automation with Azure Virtual WAN VPN.
Azure Virtual WAN brings together many Azure cloud connectivity services such as site-to-site VPN, User
VPN (point-to-site), and ExpressRoute into a single operational interface. Connectivity to Azure VNets is
established by using virtual network connections. It enables global transit network architecture based on a
classic hub-and-spoke connectivity model where the cloud hosted network ‘hub’ enables transitive connectivity
between endpoints that may be distributed across different types of 'spokes'.
✔️Consult with your instructor for how to access the lab instructions and lab environment (if provided).
Explanation
Peering is efficient as there is no downtime to resources in either virtual network when creating the peering, or
after the peering is created. Also, for security, Network traffic between peered virtual networks is private.
Traffic between the virtual networks is kept on the Microsoft backbone network. While virtual networks can
exist in any Azure public cloud region, they cannot exist in Azure national clouds. National clouds have very
specific customer requirements to their use and operation. These services are confined within the geographic
borders of specific countries and operated by local personnel. Gateway transit only applies to regional VNet
peering and not to global VNet peering.
Check Answers
Review Question 2
Your company is preparing to implement a Site-to-Site VPN to Microsoft Azure. You are selected to plan and
implement the VPN. Currently, you have an Azure subscription, an Azure virtual network, and an Azure
gateway subnet. You need to prepare the on-premises environment and Microsoft Azure to meet the
prerequisites of the Site-to-Site VPN. Later, you will create the VPN connection and test it. What should you
do? (Each answer presents part of the solution. Select three.
Create a virtual network gateway (VPN) and the local network gateway in Azure.
Obtain a public IPv4 IP address behind NAT for the VPN device.
Explanation
The prerequisites for a Site-to-Site VPN are having a compatible VPN device on-premises, having a public IPv4
IP without NAT on the on-premises VPN device, and creating a VPN gateway and local network gateway in
Azure. IPv6 is not supported for VPNs. ExpressRoute is a different setup and not part of a Site-to-Site VPN.
Check Answers
Review Question 3
Your company is preparing to implement persistent connectivity to Microsoft Azure. The company has a single
site, headquarters, which has an on-premises data center. The company establishes the following requirements
for the connectivity:
You need to implement a connectivity solution to meet the requirements. What should you do? Select one.
Explanation
In this scenario, only one of the answers provides persistent connectivity to Azure - the Site-to-Site VPN. A
VNet-to-VNet connects two Azure virtual networks together. A Point-to-Site VPN is used for individual
connections (such as for a developer). A VPC and VGW are relevant to Amazon AWS.
Check Answers
Review Question 4
You are configuring VNet Peering across two Azure two virtual networks, VNET1 and VNET2. You are
configuring the VPN Gateways. You want VNET2 to be able to use to VNET1's gateway to get to resources
outside the peering. What should you do? Select one.
Select allow gateway transit on VNET1 and use remote gateways on VNET2.
Select allow gateway transit on VNET2 and use remote gateways on VNET1.
Select allow gateway transit and use remote gateways on both VNET1 and VNET2.
Do not select allow gateway transit or use remote gateways on either VNET1 or VNET2.
Explanation
Select allow gateway transit on VNET1 and use remote gateways on VNET2. VNET1 will allow VNET2 to
transit external resources, and VNET2 will expect to use a remote gateway.
Check Answers
Review Question 5
You are configuring a site-to-site VPN connection between your on-premises network and your Azure network.
The on-premises network uses a Cisco ASA VPN device. You have checked to ensure the device is on the
validated list of VPN devices. Before you proceed to configure the device what two pieces of information
should you ensure you have? Select two.
The shared access signature key from the recovery services vault.
The shared key you provided when you created your site-to-site VPN connection.
The gateway routing method provided when you created your site-to-site VPN connection.
Explanation
You will need two things: shared key and the public IP address of your virtual network gateway. The shared key
was provided when you created the site-to-site VPN connection.
Check Answers
Review Question 6
You manage a large datacenter that is running out of space. You propose extending the datacenter to Azure
using a Multi-Protocol Label Switching virtual private network. Which connectivity option would you select?
Select one.
Point-to-Site
VPN Peering
Multi-site
Site-to-Site
ExpressRoute
VNet-to-VNet
Explanation
ExpressRoute is the best choice for extending the datacenter, as it can use an any-to-any (IPVPN) connectivity
model. An MPLS VPN, as typically provided by an IPVPN network, enables connectivity between the
Microsoft cloud and your branch offices and datacenters.
Check Answers
Review Question 7
You are creating a connection between two virtual networks. Peformance is a key concern. Which of the
following will most influence performance? Select one.
Explanation
The Gateway SKU selection directly affects performance. Gateway SKUs control the number of tunnels and
connections that are available. This affects the overall aggregate throughput of the connection.
Check Answers
Review Question 8
Your manager asks you to verify some information about Azure Virtual WANs. Which of the following
statements are true? Select three.
You must use a VPN device that provides IKEv2/IKEv1 IPsec support.
You can switch between the Basic and Standard plans at any time.
Explanation
Virtual WAN supports ExpressRoute and any VPN device that is IKEv2/IKEv1 IPSec compliant.
Check Answers
Additional Study
Microsoft Learn provides self-paced skills training on a variety of topics. These Learn modules cover the
content you have just learned. You can search for additional modules by product, role, or level.
Distribute your services across Azure virtual networks and integrate them by using virtual network
peering
Connect your on-premises network to Azure with VPN Gateway
Connect your on-premises network to the Microsoft global network by using ExpressRoute