{"id":14468,"date":"2020-07-31T06:56:29","date_gmt":"2020-07-31T06:56:29","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=14468"},"modified":"2022-03-14T05:13:29","modified_gmt":"2022-03-14T05:13:29","slug":"configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/","title":{"rendered":"Configuring a VNet-to-VNet VPN gateway connection using PowerShell"},"content":{"rendered":"\n<p>The VNet-to-VNet connection type is for linking virtual networks. Virtual networks might be from the same or distinct subscriptions, and they can be in the same or other areas. The subscriptions do not have to connect with the same Active Directory tenancy when joining VNets from various subscriptions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vnet-to-vnet\"><strong>VNet-to-VNet<\/strong><\/h3>\n\n\n\n<p>Setting up a VNet-to-VNet link is a simple approach to connect VNets. Using the VNet-to-VNet connection type (VNet2VNet) to link a virtual network to another virtual network is analogous to setting up a Site-to-Site IPsec connection to an on-premises site. Both methods of connectivity employ a VPN gateway to establish a secure tunnel using IPsec\/IKE, and they communicate in the same way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"site-to-site-ipsec\"><strong>Site-to-Site (IPsec)<\/strong><\/h3>\n\n\n\n<p>If your network setup is sophisticated, you may opt to link your VNets using the Site-to-Site procedures rather than the VNet-to-VNet stages. The local network gateways are manually created and configured when you utilize the Site-to-Site procedures.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vnet-peering\"><strong>VNet peering<\/strong><\/h3>\n\n\n\n<p>You might want to consider utilizing VNet Peering to link your VNets. VNet peering is distinct from VPN peering in that it does not employ a VPN gateway and has different limits.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"steps\"><strong>Which VNet-to-VNet steps to use?<\/strong><\/h3>\n\n\n\n<p>In this article, you see two different sets of steps.<\/p>\n\n\n\n<p>VNets that are part of the same subscription include: TestVNet1 and TestVNet4 are used in the configuration procedures.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"140\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vrmps.png\" alt=\"Configuring a VNet-to-VNet VPN gateway connection using PowerShell\" class=\"wp-image-14473\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vrmps.png 763w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vrmps-750x138.png 750w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><figcaption>Image Source &#8211; Microsoft<\/figcaption><\/figure><\/div>\n\n\n\n<p>VNets that are part of different subscriptions include: TestVNet1 and TestVNet5 are used in this setup.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"140\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vdiffsub.png\" alt=\"Configuring a VNet-to-VNet VPN gateway connection using PowerShell\" class=\"wp-image-14474\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vdiffsub.png 763w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vdiffsub-750x138.png 750w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><figcaption>Image Source &#8211; Microsoft<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to connect VNets that are in the same subscription?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly,Plan your IP address ranges<\/li><li> Create and configure TestVNet1 <\/li><li>Also, Create and configure TestVNet4<\/li><li> Furthermore, Create the connection<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to connect VNets that are in different subscriptions?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li> Subsequently, Create and configure TestVNet1<\/li><li> Verify the IP address ranges<\/li><li>Also, Create and configure TestVNet5<\/li><li> Finally, Create the connections<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Verify a connection<\/strong><\/h3>\n\n\n\n<p>Use the cmdlet example below, changing the settings to suit your needs. If asked, choose &#8216;A&#8217; to run &#8216;All&#8217;. The name of the connection you wish to test is referred to as &#8216;-Name&#8217; in the example.<\/p>\n\n\n\n<p>Get-AzVirtualNetworkGatewayConnection -Name VNet1toSite1 -ResourceGroupName TestRG1<\/p>\n\n\n\n<p>After the cmdlet has finished, view the values. In the example below, the connection status shows as &#8216;Connected&#8217; and you can see ingress and egress bytes.<\/p>\n\n\n\n<p>&#8220;connectionStatus&#8221;: &#8220;Connected&#8221;,<br>&#8220;ingressBytesTransferred&#8221;: 33509044,<br>&#8220;egressBytesTransferred&#8221;: 4142431<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-architect-technologies-az-303-free-practice-test\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"150\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Untitled-design-5.png\" alt=\"free practice test for AZ- 303\" class=\"wp-image-13928\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Untitled-design-5.png 960w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/Untitled-design-5-750x117.png 750w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-303-microsoft-azure-architect-technologies\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Go back to home page <\/strong><\/a><\/p>\n\n\n\n<p class=\"has-text-align-right\"><strong>Reference documentation &#8211; <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/vpn-gateway\/vpn-gateway-vnet-vnet-rm-ps\" target=\"_blank\" rel=\"noreferrer noopener\">Configure a VNet-to-VNet VPN gateway connection using PowerShell<\/a> <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The VNet-to-VNet connection type is for linking virtual networks. Virtual networks might be from the same or distinct subscriptions, and they can be in the same or other areas. The subscriptions do not have to connect with the same Active Directory tenancy when joining VNets from various subscriptions. VNet-to-VNet Setting up a VNet-to-VNet link is&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-14468","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Configuring a VNet-to-VNet VPN gateway connection using PowerShell<\/title>\n<meta name=\"description\" content=\"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configuring a VNet-to-VNet VPN gateway connection using PowerShell\" \/>\n<meta property=\"og:description\" content=\"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-14T05:13:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vrmps.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/\",\"name\":\"Configuring a VNet-to-VNet VPN gateway connection using PowerShell\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-07-31T06:56:29+00:00\",\"dateModified\":\"2022-03-14T05:13:29+00:00\",\"description\":\"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuring a VNet-to-VNet VPN gateway connection using PowerShell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configuring a VNet-to-VNet VPN gateway connection using PowerShell","description":"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Configuring a VNet-to-VNet VPN gateway connection using PowerShell","og_description":"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-14T05:13:29+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/v2vrmps.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/","name":"Configuring a VNet-to-VNet VPN gateway connection using PowerShell","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-07-31T06:56:29+00:00","dateModified":"2022-03-14T05:13:29+00:00","description":"Enhance and upgrade your Azure Architect skills by preparing from tutorial - Configuring a VNet-to-VNet VPN gateway connection using PowerShell!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/configuring-a-vnet-to-vnet-vpn-gateway-connection-using-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Configuring a VNet-to-VNet VPN gateway connection using PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=14468"}],"version-history":[{"count":6,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14468\/revisions"}],"predecessor-version":[{"id":52740,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/14468\/revisions\/52740"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=14468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=14468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=14468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}