{
    "id": "1f060d7c-394a-4457-a1ae-89b80231be61",
    "name": "Configure Virtual Network Routing",
    "slug": "configure-virtual-network-routing",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "26f9ad91-c452-41bd-87ea-284a1e3de3f3",
            "9d8d4179-9915-4895-95e6-178f7ca69436",
            "6ebab230-9dc9-4ce8-b913-9d0272210bbe"
        ],
        "pta_sdn": "416",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-10-07T17:39:53.003276Z",
    "modified": "2023-10-03T18:58:31.132523Z",
    "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 establish transitive routing across three existing virtual networks.\n\nThe task includes provisioning a network virtual appliance router in the hub network and configuring it to route requests between the internal virtual network and the public virtual network. The task also includes provisioning and configuring route tables to implement the desired routing.",
    "description_html": "<p>The goal of this task is to establish transitive routing across three existing virtual networks.</p>\n<p>The task includes provisioning a network virtual appliance router in the hub network and configuring it to route requests between the internal virtual network and the public virtual network. The task also includes provisioning and configuring route tables to implement the desired routing.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-12-10T21:09:05Z",
    "solutions": "# Provision and configure a network virtual appliance router\n\nWhen you will login to the azure with the provided credentials, you will find some predeployed resources. This is all you will need for this lab. Click on **Create** as highlighted below to create some resource.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/1.png)\n\nSearch for **Netgate pfSense\u00ae Firewall/VPN/Router** and click on create, then pfSense TAC Lite VM.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/2.png)\n\nConfigure the virtual machine as below:\n\n* Use the assigned resource group\n\n* Give a name to the virtual machine as **router-vm**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/3.png)\n\n* Select a basic size of VM\n\n* Use admin name as **student**\n\n* Provide a strong password for the VM\n\nClick on **Next** to configure the disks.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/4.png)\n\nSelect **Standard HDD** type of OS disk and click on **Next** to configure the networking.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/5.png)\n\nMake sure to select the virtual network as **hub-vnet** and the **default** subnet.\n\nThen click on **Review + Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/6.png)\n\nAzure will verify the configuration and it will show **Validation passed**. Click on **Create** to provision the virtual machine.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/7.png)\n\nYou will see *Your deployment is complete* which means virtual machine is provisioned. You can click on **Go to resource** to check the resource.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/8.png)\n\nCopy the public IP address of your router-vm.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/9.png)\n\nOpen this IP address in a new browser tab. Click on **Advance** and then **Proceed to IP** to access the pfSense.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/10.png)\n\nLogin with the username and password you used while creating the virtual machine.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/11.png)\n\nClick on **Next** to start the pfSense Plus setup.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/12.png)\n\nClick on **Next** after reading the information.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/13.png)\n\nLet the general information as it is and click on **Next**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/14.png)\n\nLeave the time server information to default also and head to **Next**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/15.png)\n\nClick on **Next** on the next step also to configure the admin password.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/16.png)\n\nSet a strong password for **pfSense admin**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/17.png)\n\nTo save the changes click on **Reload**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/18.png)\n\nAfter the setup is complete you can click on **Finish** to close the setup.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/19.png)\n\nAccept the terms and conditions.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/20.png)\n\nClose the thank you qoute to start configuring the pfSense machine.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/21.png)\n\nHere open the **Rules** under **Firewall** option.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/22.png)\n\nClick on the edit logo as highlighted below to edit the ICMP rule.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/23.png)\n\nSet the destination to **any** and save the rule.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/24.png)\n\nIn the same manner edit the rule for port 80 traffic.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/25.png)\n\nSet the destination to **any** and save the rule.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/26.png)\n\nClick on **Apply Changes** to actually apply these updated rules.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/27.png)\n\n# Configure Azure networking\n\nOpen the network interface card of you pfSense virtual machine, you can find it from your resource group.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/28.png)\n\nOpen the IP configuration of this NIC and enable the IP forwarding. Click on **Save** to save the changes. \n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/29.png)\n\nNavigate to the internal vnet and open the **Peerings** for this vnet. Here open the peering with hub-vnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/30.png)\n\nHere allow the forwarded traffic and click on **Save**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/31.png)\n\nIn the same manner navigate to the peerings of public-vnet. Open the peering with hub-vnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/32.png)\n\nHere also allow the forwarded traffic and click on **Save** to save the changes.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/32a.png)\n\n# Implement custom routes\n\nSearch for *route tables* and open the **Route tables** service as highlighted below.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/33.png)\n\nClick on **Create** to create a new route table.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/34.png)\n\nName this route table as **internal-rt** and use the assigned resource group.\n\nClick on **Review + Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/35.png)\n\nAzure will verify the configuration and it will show **Validation passed**. Click on **Create** to provision the route table.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/36.png)\n\nYou will see *Your deployment is complete* which means route table is provisioned. You can click on **Go to resource** to check the resource.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/37.png)\n\nHere navigate to the **Routes** and click on **Add** to add new route.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/38.png)\n\nFor adding the route we will need the address space for **public-vnet**. Navigate to public-vnet and copy the address space which is **10.2.0.0/16**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/39.png)\n\nWe will also need the private IP address of our router VM. Navigate to the networking of the router VM and copy the private IP address. Which in this case is **10.1.0.4**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/40.png)\n\nNow add the route with below configs.\n\n* Give the route a name as **toPublic**\n\n* Set the address prefix destination as **IP address**\n\n* Set the CIDR range as **10.2.0.0/16** which is address space of public vnet.\n\n* Set the next hop type as **Virtual appliance**\n\n* Set the hop address as the private IP address of router VM, which is **10.1.0.4**\n\nClick on **Add** to add the route.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/41.png)\n\nNow go to the subnets of this route table and click on **Associate** to associate it with a subnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/42.png)\n\nChoose the virtual network as **internal-vnet** and the subnet as **backoffice**. Click on **OK** to associate route table with subnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/43.png)\n\nNow create one more route table with below config\n\n* Name this route table as **public-rt** \n\n* Use the assigned resource group.\n\nClick on **Review + Create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/44.png)\n\nAzure will verify the configuration and it will show **Validation passed**. Click on **Create** to provision the route table.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/45.png)\n\nYou will see *Your deployment is complete* which means route table is provisioned. You can click on **Go to resource** to check the resource.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/46.png)\n\nHere also navigate to the **Routes** and click on **Add** to add new route.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/47.png)\n\nConfigure the route as below:\n\n* Give the route a name as **toInternal**\n\n* Set the address prefix destination as **IP address**\n\n* Set the CIDR range as **10.0.0.0/16** which is address space of internal vnet.\n\n* Set the next hop type as **Virtual appliance**\n\n* Set the hop address as the private IP address of router VM, which is **10.1.0.4**\n\nClick on **Add** to add the route.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/48.png)\n\nNow go to the subnets of this route table and click on **Associate** to associate it with a subnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/49.png)\n\nChoose the virtual network as **public-vnet** and the subnet as **edge**. Click on **OK** to associate route table with subnet.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/50.png)\n\n# Test routing\n\nNavigate to the deployments of your resource group and open the **Vnet-Routing** deployment. This deployment was for pre-requisites.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/51.png)\n\nOpen the outputs of this deployment and copy the password. This is the password for the pre deployed VMs.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/52.png)\n\nGo to the internal VM and click on **Connect**. Choose the **Bastion** option.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/53.png)\n\nUse the username as **student** and password you copied earlier. Click on **Connect**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/54.png)\n\nA new browser tab will open, where you will have a SSH connection to internal VM.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/55.png)\n\nGo back to the portal and check the networking for **public-vm**. Here copy the private IP address of the VM.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/56.png)\n\nGo back to the SSH connection and run the below command to check if you can ping the public VM from internal VM.\n\n```\nping -c 3 10.2.0.4\n```\n\nYou will see that, we are getting response from public VM.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/57.png)\n\nAlso curl the webserver running on the public VM using below command.\n\n```\ncurl http://10.2.0.4\n```\n\nIt will revert back to you with name of the VM.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/58.png)\n\nOur lab is now complete.",
    "solutions_html": "<h1>Provision and configure a network virtual appliance router</h1>\n<p>When you will login to the azure with the provided credentials, you will find some predeployed resources. This is all you will need for this lab. Click on <strong>Create</strong> as highlighted below to create some resource.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/1.png\" /></p>\n<p>Search for <strong>Netgate pfSense\u00ae Firewall/VPN/Router</strong> and click on create, then pfSense TAC Lite VM.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/2.png\" /></p>\n<p>Configure the virtual machine as below:</p>\n<ul>\n<li>\n<p>Use the assigned resource group</p>\n</li>\n<li>\n<p>Give a name to the virtual machine as <strong>router-vm</strong></p>\n</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/3.png\" /></p>\n<ul>\n<li>\n<p>Select a basic size of VM</p>\n</li>\n<li>\n<p>Use admin name as <strong>student</strong></p>\n</li>\n<li>\n<p>Provide a strong password for the VM</p>\n</li>\n</ul>\n<p>Click on <strong>Next</strong> to configure the disks.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/4.png\" /></p>\n<p>Select <strong>Standard HDD</strong> type of OS disk and click on <strong>Next</strong> to configure the networking.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/5.png\" /></p>\n<p>Make sure to select the virtual network as <strong>hub-vnet</strong> and the <strong>default</strong> subnet.</p>\n<p>Then click on <strong>Review + Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/6.png\" /></p>\n<p>Azure will verify the configuration and it will show <strong>Validation passed</strong>. Click on <strong>Create</strong> to provision the virtual machine.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/7.png\" /></p>\n<p>You will see <em>Your deployment is complete</em> which means virtual machine is provisioned. You can click on <strong>Go to resource</strong> to check the resource.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/8.png\" /></p>\n<p>Copy the public IP address of your router-vm.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/9.png\" /></p>\n<p>Open this IP address in a new browser tab. Click on <strong>Advance</strong> and then <strong>Proceed to IP</strong> to access the pfSense.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/10.png\" /></p>\n<p>Login with the username and password you used while creating the virtual machine.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/11.png\" /></p>\n<p>Click on <strong>Next</strong> to start the pfSense Plus setup.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/12.png\" /></p>\n<p>Click on <strong>Next</strong> after reading the information.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/13.png\" /></p>\n<p>Let the general information as it is and click on <strong>Next</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/14.png\" /></p>\n<p>Leave the time server information to default also and head to <strong>Next</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/15.png\" /></p>\n<p>Click on <strong>Next</strong> on the next step also to configure the admin password.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/16.png\" /></p>\n<p>Set a strong password for <strong>pfSense admin</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/17.png\" /></p>\n<p>To save the changes click on <strong>Reload</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/18.png\" /></p>\n<p>After the setup is complete you can click on <strong>Finish</strong> to close the setup.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/19.png\" /></p>\n<p>Accept the terms and conditions.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/20.png\" /></p>\n<p>Close the thank you qoute to start configuring the pfSense machine.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/21.png\" /></p>\n<p>Here open the <strong>Rules</strong> under <strong>Firewall</strong> option.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/22.png\" /></p>\n<p>Click on the edit logo as highlighted below to edit the ICMP rule.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/23.png\" /></p>\n<p>Set the destination to <strong>any</strong> and save the rule.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/24.png\" /></p>\n<p>In the same manner edit the rule for port 80 traffic.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/25.png\" /></p>\n<p>Set the destination to <strong>any</strong> and save the rule.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/26.png\" /></p>\n<p>Click on <strong>Apply Changes</strong> to actually apply these updated rules.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/27.png\" /></p>\n<h1>Configure Azure networking</h1>\n<p>Open the network interface card of you pfSense virtual machine, you can find it from your resource group.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/28.png\" /></p>\n<p>Open the IP configuration of this NIC and enable the IP forwarding. Click on <strong>Save</strong> to save the changes. </p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/29.png\" /></p>\n<p>Navigate to the internal vnet and open the <strong>Peerings</strong> for this vnet. Here open the peering with hub-vnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/30.png\" /></p>\n<p>Here allow the forwarded traffic and click on <strong>Save</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/31.png\" /></p>\n<p>In the same manner navigate to the peerings of public-vnet. Open the peering with hub-vnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/32.png\" /></p>\n<p>Here also allow the forwarded traffic and click on <strong>Save</strong> to save the changes.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/32a.png\" /></p>\n<h1>Implement custom routes</h1>\n<p>Search for <em>route tables</em> and open the <strong>Route tables</strong> service as highlighted below.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/33.png\" /></p>\n<p>Click on <strong>Create</strong> to create a new route table.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/34.png\" /></p>\n<p>Name this route table as <strong>internal-rt</strong> and use the assigned resource group.</p>\n<p>Click on <strong>Review + Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/35.png\" /></p>\n<p>Azure will verify the configuration and it will show <strong>Validation passed</strong>. Click on <strong>Create</strong> to provision the route table.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/36.png\" /></p>\n<p>You will see <em>Your deployment is complete</em> which means route table is provisioned. You can click on <strong>Go to resource</strong> to check the resource.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/37.png\" /></p>\n<p>Here navigate to the <strong>Routes</strong> and click on <strong>Add</strong> to add new route.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/38.png\" /></p>\n<p>For adding the route we will need the address space for <strong>public-vnet</strong>. Navigate to public-vnet and copy the address space which is <strong>10.2.0.0/16</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/39.png\" /></p>\n<p>We will also need the private IP address of our router VM. Navigate to the networking of the router VM and copy the private IP address. Which in this case is <strong>10.1.0.4</strong></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/40.png\" /></p>\n<p>Now add the route with below configs.</p>\n<ul>\n<li>\n<p>Give the route a name as <strong>toPublic</strong></p>\n</li>\n<li>\n<p>Set the address prefix destination as <strong>IP address</strong></p>\n</li>\n<li>\n<p>Set the CIDR range as <strong>10.2.0.0/16</strong> which is address space of public vnet.</p>\n</li>\n<li>\n<p>Set the next hop type as <strong>Virtual appliance</strong></p>\n</li>\n<li>\n<p>Set the hop address as the private IP address of router VM, which is <strong>10.1.0.4</strong></p>\n</li>\n</ul>\n<p>Click on <strong>Add</strong> to add the route.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/41.png\" /></p>\n<p>Now go to the subnets of this route table and click on <strong>Associate</strong> to associate it with a subnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/42.png\" /></p>\n<p>Choose the virtual network as <strong>internal-vnet</strong> and the subnet as <strong>backoffice</strong>. Click on <strong>OK</strong> to associate route table with subnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/43.png\" /></p>\n<p>Now create one more route table with below config</p>\n<ul>\n<li>\n<p>Name this route table as <strong>public-rt</strong> </p>\n</li>\n<li>\n<p>Use the assigned resource group.</p>\n</li>\n</ul>\n<p>Click on <strong>Review + Create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/44.png\" /></p>\n<p>Azure will verify the configuration and it will show <strong>Validation passed</strong>. Click on <strong>Create</strong> to provision the route table.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/45.png\" /></p>\n<p>You will see <em>Your deployment is complete</em> which means route table is provisioned. You can click on <strong>Go to resource</strong> to check the resource.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/46.png\" /></p>\n<p>Here also navigate to the <strong>Routes</strong> and click on <strong>Add</strong> to add new route.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/47.png\" /></p>\n<p>Configure the route as below:</p>\n<ul>\n<li>\n<p>Give the route a name as <strong>toInternal</strong></p>\n</li>\n<li>\n<p>Set the address prefix destination as <strong>IP address</strong></p>\n</li>\n<li>\n<p>Set the CIDR range as <strong>10.0.0.0/16</strong> which is address space of internal vnet.</p>\n</li>\n<li>\n<p>Set the next hop type as <strong>Virtual appliance</strong></p>\n</li>\n<li>\n<p>Set the hop address as the private IP address of router VM, which is <strong>10.1.0.4</strong></p>\n</li>\n</ul>\n<p>Click on <strong>Add</strong> to add the route.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/48.png\" /></p>\n<p>Now go to the subnets of this route table and click on <strong>Associate</strong> to associate it with a subnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/49.png\" /></p>\n<p>Choose the virtual network as <strong>public-vnet</strong> and the subnet as <strong>edge</strong>. Click on <strong>OK</strong> to associate route table with subnet.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/50.png\" /></p>\n<h1>Test routing</h1>\n<p>Navigate to the deployments of your resource group and open the <strong>Vnet-Routing</strong> deployment. This deployment was for pre-requisites.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/51.png\" /></p>\n<p>Open the outputs of this deployment and copy the password. This is the password for the pre deployed VMs.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/52.png\" /></p>\n<p>Go to the internal VM and click on <strong>Connect</strong>. Choose the <strong>Bastion</strong> option.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/53.png\" /></p>\n<p>Use the username as <strong>student</strong> and password you copied earlier. Click on <strong>Connect</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/54.png\" /></p>\n<p>A new browser tab will open, where you will have a SSH connection to internal VM.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/55.png\" /></p>\n<p>Go back to the portal and check the networking for <strong>public-vm</strong>. Here copy the private IP address of the VM.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/56.png\" /></p>\n<p>Go back to the SSH connection and run the below command to check if you can ping the public VM from internal VM.</p>\n<pre class=\"codehilite\"><code>ping -c 3 10.2.0.4</code></pre>\n\n<p>You will see that, we are getting response from public VM.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/57.png\" /></p>\n<p>Also curl the webserver running on the public VM using below command.</p>\n<pre class=\"codehilite\"><code>curl http://10.2.0.4</code></pre>\n\n<p>It will revert back to you with name of the VM.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-virtual-network-routing/58.png\" /></p>\n<p>Our lab is now complete.</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
}