{"id":4770,"date":"2016-05-20T13:31:59","date_gmt":"2016-05-20T13:31:59","guid":{"rendered":"http:\/\/blog.cloudthat.com\/?p=4770"},"modified":"2024-06-25T11:12:37","modified_gmt":"2024-06-25T11:12:37","slug":"multi-site-azure","status":"publish","type":"blog","link":"https:\/\/www.cloudthat.com\/resources\/blog\/establishing-multi-site-connectivity-with-azure-virtual-networks","title":{"rendered":"Establishing multi-site connectivity with Azure Virtual Networks"},"content":{"rendered":"<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Multi-Site.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4781 aligncenter\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/Multi-Site.png\" alt=\"Multi-Site architecture\" width=\"515\" height=\"350\" \/><\/a>Recently, I designed an architecture for client application where we used Azure\u2019s VNet-to-VNet connectivity for geo-redundancy. The requirement was such that they wanted to continue with their on-premises infrastructure, so we thought of it as DR (disaster recovery) solution. In the design we proposed Multi-Site connectivity as well, with VNet-to-VNet connectivity in Azure, you can connect two different VNets with each other. You can use this connectivity to connect two VNets across different regions or across different subscriptions.<\/p>\n<p><span style=\"color: #333399;\"><strong>The question that comes to mind is \u201cWhy connect VNets?\u201d<\/strong><\/span><\/p>\n<p>So, connecting VNet is especially useful when you want to setup multi-tier applications with multiple virtual networks connected together with a strong isolation boundary and secure inter-tier communication within same region. This can also help you set up geo-replication or synchronization over a secure connection without going out over the internet. Connecting one Virtual Network with another is almost similar to connecting an on-premises network to Azure\u2019s Virtual Network as both the connection uses a VPN gateway to provide a secure IPSec tunnel for data transfer.<\/p>\n<p><strong><span style=\"color: #333399;\">Are you new to VNet-to-VNet connectivity?<\/span><\/strong><br \/>\nIf yes, click <a title=\"Azure VNet-to-VNet\" href=\"https:\/\/azure.microsoft.com\/en-in\/documentation\/articles\/virtual-networks-configure-vnet-to-vnet-connection\/\" target=\"_blank\" rel=\"noopener\">here<\/a> to get more insight on VNet-to-VNet connectivity in Azure.<\/p>\n<p><strong><span style=\"color: #333399;\">Now, where can we include VNet connectivity?<\/span><\/strong><br \/>\nLet\u2019s assume you want to deploy two Cloud Services in different regions across different Azure Data centres. As the service is geographically dispersed, I would suggest to use Traffic Manager with \u201cPerformance\u201d load-balancing method to make sure that clients connect to specific Cloud Service that performs best for their locations. Also, best practices includes database to be present in the same region as the cloud services to avoid latency and performance issues.<\/p>\n<p>One day, my \u201cnon-technical\u201d friend called up with a very strange scenario, totally different from the above one. So, the situation goes like this: He was having two frontend servers in two different regions both talking to a single database server (SQL Server on VM) hosted in the third region. He was stuck in establishing multi-site connectivity (multi-site VPN) between those three regions.<br \/>\nNow, let\u2019s work around with some basic pieces of information that are required to understand the scenario:<br \/>\nLet\u2019s assume the three regions are: <em><span style=\"text-decoration: underline;\">Southeast Asia, East Asia and Central US<\/span><\/em>. Mapping regions with my friend\u2019s scenario; two frontend servers in Southeast Asia and East Asia and database server in Central US (which practically will give you latency and database performance issues).<br \/>\nNomenclature and address spaces of VNets and Local Networks chosen by me are as follows:<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>VNet Name Address<\/strong><\/td>\n<td><strong>Address Space<\/strong><\/td>\n<td><strong>Local Network Name<\/strong><\/td>\n<td><strong>Address Space<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Default_SEAsia_VNet<\/td>\n<td>10.1.0.0\/16<\/td>\n<td>SEAsia_Local<\/td>\n<td>10.1.0.0\/16<\/td>\n<\/tr>\n<tr>\n<td>Default_EAsia_VNet<\/td>\n<td>10.2.0.0\/16<\/td>\n<td>EAsia_Local<\/td>\n<td>10.2.0.0\/16<\/td>\n<\/tr>\n<tr>\n<td>Default_CentralUS_VNet<\/td>\n<td>10.3.0.0\/16<\/td>\n<td>CentralUS_Local<\/td>\n<td>10.3.0.0\/16<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The database server has to be connected with both the frontend servers in Southeast Asia and East Asia. Avoid creating unnecessary number of gateways as it will create a hole in your pocket.<br \/>\nLet\u2019s start using Multi-site VPN:<\/p>\n<ol>\n<li>Establish site-to-site connectivity between Southeast Asia and Central US i.e. connect <strong>CentralUS_Local<\/strong> from <strong>Default_SEAsia_VNet<\/strong>. The link to create site-to-site connectivity is mentioned above.<\/li>\n<li>Establish site-to-site connectivity between East Asia and Central US i.e. connect <strong>CentralUS_Local<\/strong> from <strong>Default_EAsia_VNet<\/strong>.<\/li>\n<li>Make sure to create Dynamic Routing gateways.<\/li>\n<li>Now connect to <strong>SEAsia_Local<\/strong> from <strong>Default_CentralUS_VNet<\/strong>. We have to connect EAsia_Local also from Default_CentralUS_VNet. This is where the actual catch is. We cannot directly do this from management portal. So just export your Network Configuration file and make necessary changes.<\/li>\n<\/ol>\n<p>Open your \u201c<em>Network Configuration.xml<\/em>\u201d file and search for <em>&lt;ConnectionsToLocalNetwork&gt;<\/em> inside <em>&lt;VirtualNetworkSites&gt;<\/em>.<br \/>\nFor Default_CentralUS_VNet by default you will only see a connection with SEAsia_Local inside.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4773\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/single-local.png\" alt=\"configuration file\" width=\"527\" height=\"302\" \/><\/p>\n<p>As we need connection to EAsia_Local, we will add that part inside. After adding, it should look like this:<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/double-local.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4772\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/double-local.png\" alt=\"two local sites in config file\" width=\"526\" height=\"349\" \/><\/a><\/p>\n<p>Save the file and import the configuration file from management portal.<br \/>\nAfter import is successful, we are required to run the series of PowerShell cmdlets to set up shared key for VPN tunnel. Now, import your subscription into PowerShell by either using \u201c<em>Add-AzureAccount<\/em>\u201d or \u201c<em>Import-PublishSetiingsFile<\/em>\u201d cmdlet.<br \/>\nExecute the following cmdlets:<\/p>\n<ul>\n<li><em> Get-AzureVNetGatewayKey \u2013VNetName Default_CentralUS_VNet \u2013LocalNetworkSiteName SEAsia_Local \u2013SharedKey admin@123<\/em><\/li>\n<li><em> Get-AzureVNetGatewayKey \u2013VNetName Default_CentralUS_VNet \u2013LocalNetworkSiteName EAsia_Local \u2013SharedKey admin@123<\/em><\/li>\n<li><em> Get-AzureVNetGatewayKey \u2013VNetName Default_SoutheastAsia_VNet \u2013LocalNetworkSiteName CentralUS_Local \u2013SharedKey admin@123<\/em><\/li>\n<li><em> Get-AzureVNetGatewayKey \u2013VNetName Default_EastAsia_VNet \u2013LocalNetworkSiteName CentralUS_Local \u2013SharedKey admin@123<\/em><\/li>\n<\/ul>\n<p>After executing the above mentioned cmdlets, you can browse to Virtual Networks in the management portal and can verify the connection of all three VNets.<br \/>\nFor Default_CentralUS_VNet, the Dashboard will look similar as shown below.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/FinalConnected.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4774\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/FinalConnected.png\" alt=\"connection confirmation\" width=\"932\" height=\"456\" \/><\/a><\/p>\n<p>Multi-site VPN in Azure is especially useful for geo distribution or fault tolerance by deploying our service in more than two regions. It also helps the businesses that have multiple on-premises sites and would like to connect to same VNet on Azure.<\/p>\n<p>One fine case where you can make an effective use of multi-site connectivity is &#8211; DR solution. Suppose, you have a DR solution with on-premises network for AD replication, an Azure VNet for failing over machines using Azure Site Recovery and another VNet for RemoteApp. In this case, you require to connect three sites together i.e. establishing multi-site connectivity. Maximum 10 sites can be connected using multi-site connectivity in Azure.<\/p>\n<p>We also do professional consulting on strategizing multi-site or multi-cloud deployments. For more details kindly check\u00a0our <a title=\"Cloud Strategy\" href=\"https:\/\/cloudthat.com\/cloud-strategy\/?utm_source=blog&amp;utm_medium=arman_koradia&amp;utm_content=establishing_multi_site_connectivity_with_azure_virtual_networks&amp;utm_campaign=cloud_strategy\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\"><strong>Cloud<\/strong><\/span><strong>\u00a0<\/strong><span style=\"text-decoration: underline;\"><strong>Strategy<\/strong><\/span><strong>\u00a0<\/strong><span style=\"text-decoration: underline;\"><strong>Services<\/strong><\/span><\/a>. We also have <a title=\"Managed Services\" href=\"https:\/\/cloudthat.com\/managed-services-packages\/?utm_source=blog&amp;utm_medium=arman_koradia&amp;utm_content=establishing_multi_site_connectivity_with_azure_virtual_networks&amp;utm_campaign=managed_services\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\"><strong>Managed<\/strong><\/span><strong>\u00a0<\/strong><span style=\"text-decoration: underline;\"><strong>Services<\/strong><\/span><\/a> for premium support on multi-cloud DR plans.<\/p>\n<p>&nbsp;<\/p>\n<p>Feel free to post your queries and stay tuned for more updates on Azure.<\/p>\n","protected":false},"author":219,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"open","template":"","blog_category":[3608,3607],"user_email":"prarthitm@cloudthat.com","published_by":"324","primary-authors":"","secondary-authors":"","acf":[],"_links":{"self":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/4770"}],"collection":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/users\/219"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/comments?post=4770"}],"version-history":[{"count":2,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/4770\/revisions"}],"predecessor-version":[{"id":43271,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/4770\/revisions\/43271"}],"wp:attachment":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/media?parent=4770"}],"wp:term":[{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog_category?post=4770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}