Monday, April 20, 2020

Azure Networking - Part 2 (Creation of Vnets and Subnets)

In our earlier article i.e., Part-1 of Azure Networking Series here we understood the basics of Azure Networking, VNETs , and Subnets to an extent. Let us look at how to create a VNets and Subnets.

Before we start deploying a Vnets and Subnets we need to make sure that we design our Vnets with a number of IPs required,  of course keeping future requirements in mind.

VNET creation requires the following information

1)Name of the VNET
2)Resource Group
3)Subscription
4)Location
5)IP Address Space in CIDR format.
6)Subnet(s) (During the creation of VNET you need to create at least one Subnet)


A Subscription helps with billing and to set policies and control access using RBAC. VNETS creation is free, however, there will be charges for the traffic moving between the VNETS with in the same region or across the regions. We can have put 50 VNETS per Subscription.

Location specifies the Location/Region for which this VNETs IP Addr Space is available. VNET has region boundary which means VNETS are not visible to resources you deploy in other Locations/Regions.

IP Address Space provides the range of IP Address and the number of IPs that are available within the VNET for the Subnets that will be part of it.  CIDR notation looks like a.b.c.d/n, where the number of IP available can be calculated as 232-n .  Ex: If the IP range 10.0.0.0/24 here value of n is 24 then the number of IPs that we get are 232-24 which is 28 = 256.

                  Address Space for 10.0.0.0/24 is 10.0.0.0 to 10.0.0.255.

VNET will have at least one Subnet and we can have up to 1000 Subnets per VNET  based on your requirement.

Let us create a VNET  PROD with IP Address Space 10.0.0.0/16 in Central US with two Subnets WEB Subnet 10.0.0.0/24 and DB Subnet 10.0.1.0/24  as shown in the below diagram.

Go the Virtual Network service in the Azure portal (Select it from Favorites or Seach for Virtual Network in the Search bar).


As shown in the above screenshot select Add to take you to below blade to create Virtual Network.
Feed required information like Subscription, Resource GroupProvide the name of VNET as PROD as per the above diagram and choose Central US as a region. Select Next to move to the next blade.


Provide required IPv4 Address space in our case it is 10.0.0.0/16 as per the above scenario (diagram).
You will see IP Addr from 10.0.0.0 to 10.0.255.255 which is 65536 once we enter IP details.

If you got a IPv6  requirement then select Add IPv6 address space and feed required details of v6 IPs
VNET creation also creates a subnet with the name Default with the first range of IPs available in Vnet Address Space.  Our requirement is to create a subnet WEB with IP Addr Range 10.0.0.0/24, select Default subnet and modify accordingly

Once modify the Default Subnet name to WEB and update the subnet address range (here it is not required as IP picked is our required address space), click on Save.


Add our second Subnet DB with IP Address range 10.0.1.0/24 as shown below and click on Add.


When we move to the next blade, it populates settings relating to DDoS (Distributed Denial of Service) attacks by default it is Basic and there are Firewall Settings. We leave these as default.


Next blade you see Tags which are a logical categorization of resources that will help to extract reports like billing.



When we say next, If all is good Validation will pass and will allow us to Create VNET with the name PROD.


On successful creation, you will see PROD VNET under Virtual Network services as shown below.


No comments:

Post a Comment