Introduction
In this article we will understand the basic of Azure VNet. What is the purpose and why do we need it.
Scenario
Before diving into the core concept first lets try to understand what are the different connectivity we use during work, also how differently our application/resources connect to each other for secure communication.
1. Working from Home to connect Office Network.
![](https://static.wixstatic.com/media/33586b_75b4cee77fcb4b778484816ef7e20345~mv2.png/v1/fill/w_710,h_271,al_c,q_85,enc_auto/33586b_75b4cee77fcb4b778484816ef7e20345~mv2.png)
2. Connecting to Azure Resources
![](https://static.wixstatic.com/media/33586b_1532d16d2e3c40868b9263a82981b5e1~mv2.png/v1/fill/w_848,h_284,al_c,q_85,enc_auto/33586b_1532d16d2e3c40868b9263a82981b5e1~mv2.png)
3. Azure Resources communication to each Other.
![](https://static.wixstatic.com/media/33586b_c05c872013964e46a35fa0042ed58750~mv2.png/v1/fill/w_980,h_283,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/33586b_c05c872013964e46a35fa0042ed58750~mv2.png)
4. Connecting on-premise private Network to Cloud Network
![](https://static.wixstatic.com/media/33586b_476674e2c65449fc84ac1888f187dc17~mv2.png/v1/fill/w_840,h_252,al_c,q_85,enc_auto/33586b_476674e2c65449fc84ac1888f187dc17~mv2.png)
5. Connecting to On Premise Network and then Azure Network
![](https://static.wixstatic.com/media/33586b_f663c026b4b54ca18e9dd7c23e26f826~mv2.png/v1/fill/w_829,h_663,al_c,q_90,enc_auto/33586b_f663c026b4b54ca18e9dd7c23e26f826~mv2.png)
6. Azure Service Communication to the Internet
![](https://static.wixstatic.com/media/33586b_3ef3471824344184ab990c2c0320c2e8~mv2.png/v1/fill/w_828,h_420,al_c,q_85,enc_auto/33586b_3ef3471824344184ab990c2c0320c2e8~mv2.png)
Azure VNet
Azure VNet provides option to create private network which further helps to establish secure communication from any Azure Resource to Internet, on premise Network and between different Azure Resource.
Communication Types
1. Communication with Internet
By default all the resource under the VNet can Outbound to the Internet but no inbound access to the Azure Resource. Outbound meaning the Azure Resource can send the Request to the Internet and get the response.
You can inbound to the Azure Resource after assigning the Public IP or Configuring the Load Balancer. Inbound access meaning the Azure resource can accept the request and send the Response from Internet.
Further with the help of VNet we can control all the request coming or outgoing with Azure Resources.
![](https://static.wixstatic.com/media/33586b_935198d4feec41e19a101a69fe583802~mv2.png/v1/fill/w_822,h_415,al_c,q_85,enc_auto/33586b_935198d4feec41e19a101a69fe583802~mv2.png)
Options to enable the Azure Resource communication to Internet
Load Balancer
Public IP Address
2. Azure Resources Communication to each other
If you are working with Azure Resources then it might be required that azure resources will be communicating to each other. Now lets discuss what are the different option we have to achieve the communication between azure resources.
![](https://static.wixstatic.com/media/33586b_6917e80f2bbe4881a8e769e77ff91ad4~mv2.png/v1/fill/w_980,h_290,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/33586b_6917e80f2bbe4881a8e769e77ff91ad4~mv2.png)
2.1 Communicate through Virtual network
If we want azure resources to communication to each other. We can deploy and create Azure resources under the single Virtual Network which enable the communication within the azure resources.
We have list of Azure services can be deployed under the Virtual Network. AzureResourcesList
![](https://static.wixstatic.com/media/33586b_7ab95ab97a894a0ca86e411a83aebfec~mv2.png/v1/fill/w_980,h_362,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/33586b_7ab95ab97a894a0ca86e411a83aebfec~mv2.png)
2.2 Through a Virtual Network Service Endpoint
Assume we have Azure Services like Azure Database, Azure Storage Account and we do not want to expose them over the Internet. In this case how we can secure communication.
Service Endpoint allow the communication to the Azure service resources privately through Virtual Network.
Service Endpoints enables private IP addresses in the VNet to reach the endpoint of an Azure service without needing a public IP address on the VNet.
![](https://static.wixstatic.com/media/33586b_4639e8d8901145ff99f240002974a0d2~mv2.png/v1/fill/w_980,h_582,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/33586b_4639e8d8901145ff99f240002974a0d2~mv2.png)
2.3 VNet Peering
Assume if you have Azure resources created under the different VNet and you want to enable the communication between azure resources which exist in the different VNet. In this case with the help of VNet peering we can enable the communication.
![](https://static.wixstatic.com/media/33586b_e362291b558849d88a99ea6db8d3a7a8~mv2.png/v1/fill/w_980,h_688,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/33586b_e362291b558849d88a99ea6db8d3a7a8~mv2.png)
3. How to Communicate with on-premises resources
This is common for every working professional where at some point you might need to connect to your On Premise Network. Sometime we need to connect to Azure Network from our system/on premise Network.
Now Lets discuss the different option available to achieve this.
3.1 Point to Site Virtual Private Network (VPN)
This is very common for every working professional. When we try to access on premise Virtual Machine/ Application, in that case either computer should be in office network or connect to VPN.
Point to Site Virtual Private Network helps to establish connection between Virtual Network and single computer. The communication between your computer and a virtual network is sent through an encrypted tunnel over the internet.
![](https://static.wixstatic.com/media/33586b_809439dec4884943aa06f82dfe3e019f~mv2.png/v1/fill/w_918,h_466,al_c,q_90,enc_auto/33586b_809439dec4884943aa06f82dfe3e019f~mv2.png)
3.2 Site-to-site VPN
Assume if you want to enable the communication with on premise network to Virtual Network then we use Site-to-Site VPN. This communication established through the on-premises VPN device and an Azure VPN Gateway that is deployed in a virtual network.
The communication between your on-premises VPN device and an Azure VPN gateway is sent through an encrypted tunnel over the internet.
![](https://static.wixstatic.com/media/33586b_65884e2ae3364c74b504c14a659787f3~mv2.png/v1/fill/w_980,h_702,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/33586b_65884e2ae3364c74b504c14a659787f3~mv2.png)
3.3 Azure ExpressRoute
Since the other options are available where communication happening over the internet. Assume you want to make the private communication from on premise network to Azure. In this case we have ExpressRoute Option.
ExpressRoute helps to create private connection which further Establish communication between your network and Azure.
![](https://static.wixstatic.com/media/33586b_a9cd243285cc4fc286b24f83b226b5a3~mv2.png/v1/fill/w_980,h_709,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/33586b_a9cd243285cc4fc286b24f83b226b5a3~mv2.png)
Filter network traffic
This option helps to filter the network traffic between subnets. To achieve this we have two option.
Network security groups:
NSG helps to apply traffic filter for all the incoming and outgoing traffic using the Inbound and Outbound security rule, with the help of source and destination IP address, port, and protocol.
![](https://static.wixstatic.com/media/33586b_cc02e22d6cf145c88ee453b445a78b34~mv2.png/v1/fill/w_980,h_414,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/33586b_cc02e22d6cf145c88ee453b445a78b34~mv2.png)
Network Virtual Appliance:
Network Virtual Appliance is VM that perform a network function such as Firewall, inbound outbound rule.
Route network traffic
By Default Azure can route the traffic to subnets, connected network, on premise and on internet.
Now lets discuss how we can override the default and create custom Route which further can help to route the traffic.
We have below to options to route the traffic.
1. Route tables:
Azure provide option to write custom route table for incoming traffic and through which traffic will be routed to for each subnet. More Info: route tables.
![](https://static.wixstatic.com/media/33586b_bbdc7724b3be48d3bcae50d74b4936fe~mv2.png/v1/fill/w_702,h_718,al_c,q_90,enc_auto/33586b_bbdc7724b3be48d3bcae50d74b4936fe~mv2.png)
Opmerkingen