if you are going to build Virtual machine in azure, the virtual machine requires IP address to communicate with internet or with on premises or within azure.
To assign IP to virtual machine
Virtual network
Firstly we need to create virtual network inAzure.
When we create virtual network in Azure we need to create something called Address space.
Address Space: Range of ip addresses for entire virtual network.
For example: If you want to deploy 200 virtual machines in azure then you need 200 Ip addresses.
To create 200 IP addresses we need to have /24 address space.
10.0.0.0/24
IPv4 IP address contains total 32 bits
8. 8. 8. 8
N:N:N:H
here 24 represent network bits and 8 bits represent host bits
2^8=256 IP addresses

Address space is /24
Address Space: complete range of IP addresses you are going to deploy for your virtual network.
Address space we have to plan as per our requirement.
Another Example:
for example if you are going to deploy 1000 virtual machines then you need 1000 ip addresses so you can use /22.
SUBNET
Now you want to deploy 200 virtual machines so you need 200 IP address so address space you are using is /24.
but in your enterprise environment out of these 200 machines
suppose 100 machines are Finance
and
100 machines are Sales department
so technically Sales and Finance should not deploy in same address space, because it may against the compliance because if they are part of same address space Sales can access finance and vice versa.
So from original address space 10.0.0.0/24 which has total 255 IP addresses
we want to create two networks
Below we have divided 10.0.0.0/24 into two networks where each subnetwork contains 128 IP addresses.
