{
    "id": "f6548230-f614-420f-9cd2-81cd7066918a",
    "name": "Implement Virtual Network Gateways",
    "slug": "implement-virtual-network-gateways",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "26f9ad91-c452-41bd-87ea-284a1e3de3f3",
            "9d8d4179-9915-4895-95e6-178f7ca69436"
        ],
        "pta_sdn": "436",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-10-14T21:44:20.309003Z",
    "modified": "2023-10-03T18:58:29.441810Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": "d3f82c70-f4e7-428e-afd7-4b1d28988e18",
    "learning_areas": [
        {
            "id": "d3f82c70-f4e7-428e-afd7-4b1d28988e18",
            "name": "Cloud",
            "slug": "cloud"
        }
    ],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": true,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "is_trackable": false,
    "cpe_credits": null,
    "is_skill_check": false,
    "external_url": "",
    "solution_video": null,
    "explanation_video": null,
    "description": "The goal of this task is to complete a basic \"hub and spoke\" network topology. There are two virtual networks - hub-vnet and public-vnet - that have a pre-existing peering relationship. A third virtual network - op-vnet - will be connected via a VPN tunnel and changes will be made to the existing peering relationship to support full network connectivity.",
    "description_html": "<p>The goal of this task is to complete a basic \"hub and spoke\" network topology. There are two virtual networks - hub-vnet and public-vnet - that have a pre-existing peering relationship. A third virtual network - op-vnet - will be connected via a VPN tunnel and changes will be made to the existing peering relationship to support full network connectivity.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-04-07T18:00:00Z",
    "solutions": "# Provision network gateways\n\nWhen you log in to Azure with the provided credentials, you will find all the pre-requisite setups available in the resource group. Now click on **Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/1.png)\n\nSearch for **vnet gateway** and click on **Virtual network gateway**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/2.png)\n\nThis page will provide an overview of the virtual network gateway. Now click on **Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/3.png)\n\n\nConfigure the following settings and create a virtual network gateway.\n\n- Set name as **hub-vpn**.\n- Set region as **East US**.\n- Set gateway type as **VPN**.\n- Set VPN type as **Route-based**.\n- Set SKU as **Basic**.\n- Set Generation as **Generation1**.\n- Choose **hub-vnet** as virtual network.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/4.png)\n\nSelect **Create new** in public IP address. Set IP address name as **hub-vpn-pip**  and click on **Review + create**.\n\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/5.png)\n\nAfter the validation is passed, click on **Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/6.png)\n\nNow create the second virtual network gateway. Navigate back to the virtual network gateway in marketplace and click on **Create**.\n\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/7.png)\n\nConfigure the following settings and create a virtual network gateway.\n\n- Set name as **op-vpn**.\n- Set region as **East US**.\n- Set gateway type as **VPN**.\n- Set VPN type as **Route-based**.\n- Set SKU as **Basic**.\n- Set Generation as **Generation1**.\n- Choose **op-vnet** as virtual network.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/8.png)\n\nSelect **Create new** in public IP address. Set IP address name as **op-vpn-pip**  and click on **Review + create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/9.png)\n\nAfter the validation is passed, click on **Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/10.png)\n\n# Define gateway connections\n\nOnce the deployment is completed, navigate back to resouce group and click on **hub-vpn**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/11.png)\n\nNow click on **Connections**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/12.png)\n\nClick on **Add**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/13.png)\n\nConfigure the following settings and create a virtual network gateway connection and click on **OK**.\n\n- Set name as **Hub2OP**.\n- Set connection type as **VNet-to-VNet**.\n- Set second virtual network gateway as **op-vpn**.\n- Set any strong shared key.\n\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/14.png)\n\nNavigate back to resource group and click on **op-vpn**.\n\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/15.png)\n\nNow click on **Connections**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/16.png)\n\n\nClick on **Add**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/17.png)\n\nConfigure the following settings and create a virtual network gateway connection and click on **OK**.\n\n- Set name as **OP2Hub**.\n- Set connection type as **VNet-to-VNet**.\n- Set second virtual network gateway as **hub-vpn**.\n- Set the same strong shared key set for **Hub2OP** connection.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/18.png)\n\nWait for the Status of both connections to show Connected before proceeding to requirement 3. If it has been several minutes and the status has not changed to Connected try refreshing the browser.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/19.png)\n\n# Configure the peering relationship\n\nNavigate back to resource group and click on **hub-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/20.png)\n\nClick on **Peerings**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/21.png)\n\nClick on **peerWith-public-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/22.png)\n\nConfigure the peer settings as the following and click on **Save**.\n- **Allow** the traffic forwarded from remote virtual network.\n- Select **Use this virtual network's gateway or Route Server** for virtual network gateway or route server.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/23.png)\n\nNavigate back to resource group and click on **public-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/24.png)\n\nClick on **Peerings**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/25.png)\n\nclick on **peerWith-hub-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/26.png)\n\nConfigure the peer settings as the following and click on **Save**.\n- **Allow** the traffic forwarded from remote virtual network.\n- Select **Use the remote virtual network's gateway or Route Server** for virtual network gateway or route server.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/27.png)\n\nNavigate back to the resource group and click on **hub-vm**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/28.png)\n\nNotice the private IP address and virtual network connected. This VM is connected to **hub-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/29.png)\n\nNavigate back to the resource group and click on **webapp1-vm**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/30.png)\n\nNotice the private IP address and virtual network connected. This VM is connected to **public-vnet**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/31.png)\n\n# Verify gateway connections\n\nNavigate back to the resource group and click on **Deployments** from the left navigation.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/32.png)\n\nClick on **Network-Gateway-Virtual-Network-v1**. \n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/33.png)\n\nClick on **Outputs** and copy the password.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/34.png)\n\nNavigate back to the resource group and click on **op-vm**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/35.png)\n\nConnect with virtual machine. Click on **Connect** and select **Bastion**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/36.png)\n\nEnter the username as **student** and paste the copied password and click on **Connect**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/37.png)\n\nCheck the IP address using the following command.\n\n```\nip addr\n```\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/38.png)\n\nTest connectivity to a virtual machine on the hub-vnet virtual network with the following command.\n\n```\nping -c 3 <private IP address of VM connected to hub-vnet>\n```\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/39.png)\n\nTest connectivity to a virtual machine on the public-vnet virtual network with the following command.\n\n```\nping -c 3 <private IP address of VM connected to public-vnet>\n```\n\n![](https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/40.png)\n\n\nSuccessfully verified the connectivity across VPN tunnel.",
    "solutions_html": "<h1>Provision network gateways</h1>\n<p>When you log in to Azure with the provided credentials, you will find all the pre-requisite setups available in the resource group. Now click on <strong>Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/1.png\" /></p>\n<p>Search for <strong>vnet gateway</strong> and click on <strong>Virtual network gateway</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/2.png\" /></p>\n<p>This page will provide an overview of the virtual network gateway. Now click on <strong>Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/3.png\" /></p>\n<p>Configure the following settings and create a virtual network gateway.</p>\n<ul>\n<li>Set name as <strong>hub-vpn</strong>.</li>\n<li>Set region as <strong>East US</strong>.</li>\n<li>Set gateway type as <strong>VPN</strong>.</li>\n<li>Set VPN type as <strong>Route-based</strong>.</li>\n<li>Set SKU as <strong>Basic</strong>.</li>\n<li>Set Generation as <strong>Generation1</strong>.</li>\n<li>Choose <strong>hub-vnet</strong> as virtual network.</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/4.png\" /></p>\n<p>Select <strong>Create new</strong> in public IP address. Set IP address name as <strong>hub-vpn-pip</strong>  and click on <strong>Review + create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/5.png\" /></p>\n<p>After the validation is passed, click on <strong>Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/6.png\" /></p>\n<p>Now create the second virtual network gateway. Navigate back to the virtual network gateway in marketplace and click on <strong>Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/7.png\" /></p>\n<p>Configure the following settings and create a virtual network gateway.</p>\n<ul>\n<li>Set name as <strong>op-vpn</strong>.</li>\n<li>Set region as <strong>East US</strong>.</li>\n<li>Set gateway type as <strong>VPN</strong>.</li>\n<li>Set VPN type as <strong>Route-based</strong>.</li>\n<li>Set SKU as <strong>Basic</strong>.</li>\n<li>Set Generation as <strong>Generation1</strong>.</li>\n<li>Choose <strong>op-vnet</strong> as virtual network.</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/8.png\" /></p>\n<p>Select <strong>Create new</strong> in public IP address. Set IP address name as <strong>op-vpn-pip</strong>  and click on <strong>Review + create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/9.png\" /></p>\n<p>After the validation is passed, click on <strong>Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/10.png\" /></p>\n<h1>Define gateway connections</h1>\n<p>Once the deployment is completed, navigate back to resouce group and click on <strong>hub-vpn</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/11.png\" /></p>\n<p>Now click on <strong>Connections</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/12.png\" /></p>\n<p>Click on <strong>Add</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/13.png\" /></p>\n<p>Configure the following settings and create a virtual network gateway connection and click on <strong>OK</strong>.</p>\n<ul>\n<li>Set name as <strong>Hub2OP</strong>.</li>\n<li>Set connection type as <strong>VNet-to-VNet</strong>.</li>\n<li>Set second virtual network gateway as <strong>op-vpn</strong>.</li>\n<li>Set any strong shared key.</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/14.png\" /></p>\n<p>Navigate back to resource group and click on <strong>op-vpn</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/15.png\" /></p>\n<p>Now click on <strong>Connections</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/16.png\" /></p>\n<p>Click on <strong>Add</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/17.png\" /></p>\n<p>Configure the following settings and create a virtual network gateway connection and click on <strong>OK</strong>.</p>\n<ul>\n<li>Set name as <strong>OP2Hub</strong>.</li>\n<li>Set connection type as <strong>VNet-to-VNet</strong>.</li>\n<li>Set second virtual network gateway as <strong>hub-vpn</strong>.</li>\n<li>Set the same strong shared key set for <strong>Hub2OP</strong> connection.</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/18.png\" /></p>\n<p>Wait for the Status of both connections to show Connected before proceeding to requirement 3. If it has been several minutes and the status has not changed to Connected try refreshing the browser.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/19.png\" /></p>\n<h1>Configure the peering relationship</h1>\n<p>Navigate back to resource group and click on <strong>hub-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/20.png\" /></p>\n<p>Click on <strong>Peerings</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/21.png\" /></p>\n<p>Click on <strong>peerWith-public-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/22.png\" /></p>\n<p>Configure the peer settings as the following and click on <strong>Save</strong>.\n- <strong>Allow</strong> the traffic forwarded from remote virtual network.\n- Select <strong>Use this virtual network's gateway or Route Server</strong> for virtual network gateway or route server.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/23.png\" /></p>\n<p>Navigate back to resource group and click on <strong>public-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/24.png\" /></p>\n<p>Click on <strong>Peerings</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/25.png\" /></p>\n<p>click on <strong>peerWith-hub-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/26.png\" /></p>\n<p>Configure the peer settings as the following and click on <strong>Save</strong>.\n- <strong>Allow</strong> the traffic forwarded from remote virtual network.\n- Select <strong>Use the remote virtual network's gateway or Route Server</strong> for virtual network gateway or route server.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/27.png\" /></p>\n<p>Navigate back to the resource group and click on <strong>hub-vm</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/28.png\" /></p>\n<p>Notice the private IP address and virtual network connected. This VM is connected to <strong>hub-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/29.png\" /></p>\n<p>Navigate back to the resource group and click on <strong>webapp1-vm</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/30.png\" /></p>\n<p>Notice the private IP address and virtual network connected. This VM is connected to <strong>public-vnet</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/31.png\" /></p>\n<h1>Verify gateway connections</h1>\n<p>Navigate back to the resource group and click on <strong>Deployments</strong> from the left navigation.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/32.png\" /></p>\n<p>Click on <strong>Network-Gateway-Virtual-Network-v1</strong>. </p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/33.png\" /></p>\n<p>Click on <strong>Outputs</strong> and copy the password.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/34.png\" /></p>\n<p>Navigate back to the resource group and click on <strong>op-vm</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/35.png\" /></p>\n<p>Connect with virtual machine. Click on <strong>Connect</strong> and select <strong>Bastion</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/36.png\" /></p>\n<p>Enter the username as <strong>student</strong> and paste the copied password and click on <strong>Connect</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/37.png\" /></p>\n<p>Check the IP address using the following command.</p>\n<pre class=\"codehilite\"><code>ip addr</code></pre>\n\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/38.png\" /></p>\n<p>Test connectivity to a virtual machine on the hub-vnet virtual network with the following command.</p>\n<pre class=\"codehilite\"><code>ping -c 3 &lt;private IP address of VM connected to hub-vnet&gt;</code></pre>\n\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/39.png\" /></p>\n<p>Test connectivity to a virtual machine on the public-vnet virtual network with the following command.</p>\n<pre class=\"codehilite\"><code>ping -c 3 &lt;private IP address of VM connected to public-vnet&gt;</code></pre>\n\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/implement-virtual-network-gateways/40.png\" /></p>\n<p>Successfully verified the connectivity across VPN tunnel.</p>",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "web",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": [],
    "global_running_session": null
}