Networking contd..
- Lets create a network for an application deployment with 5 subnets

- Each subnet should have capacity to accomodate 500 devices so we have 5 subnets total of 2500 devices
- Create a private network with cidr ranges specified for network and subnets
- We need a total of 2500 devices
2^n ~= 2500 n = 12
number of zeros = 12
number of ones = 32-12 => 20
the network range i have chosen
172.16.0.0/20
- Now since network is fixed lets try to look at subnet mask of the network
ip: 172.16.0.0
sm: 11111111.11111111.11110000.00000000
sm: 255.255.240.0
- Now lets try to create subnets each subnet requires 500 devices
2^n ~= 500
number of zeros = 9
number of ones = 23
subnet 1
sm: 11111111.11111111.11111110.00000000
000x => 0000 => 0
cidr: 172.16.0.0/23
subnet 2
001x => 0010 => 2
cidr: 172.16.2.0/23
subnet 3
010x => 0100 => 4
cidr: 172.16.4.0/23
subnet 4:
011x => 0110 => 6
cidr: 172.16.6.0/23
subnet 5:
100x => 1000 => 8
cidr: 172.16.8.0/23
Azure Virtual Network
- Azure VNet is a fundamental block for create private network in Azure which enables connectivity b/w many types of Azure resources.
- VNet is similar to traditional n/w that you operate in datacenters but it brings additional benifits of Azure infrastructure such as scale, avaliability and isolation
- VNet Conceps:
- Address Space: you need to specify your private ip range using cidr and this is referred as address space
- Subnets
- Region
- Subscription
- In Azure We can create a virtual network, so lets try to create the virtual network as designed above

- Communication with Internet in Azure Vnet
- All resources in Vnet can communicate outbound to the internet by default
- Communication b/w resources in the same virtual network in different subnets can be done by using private network ip addresses
- Exercise: Create a network with subnets in Azure

- Each subnet should be able to connect to 100 devices
- Total number of devices are 400
2^n ~= 400
number of zeros = 9
number of ones => 32-9 => 23
network range: 10.0.0.0/23
subnet mask: 11111111.11111111.11111110.00000000
subnet mask: 255.255.254.0
each subnet: 100 devices
2^n ~=100
number of zeros: 7
number of ones: 32-7 : 25
0.0xxxxxxx
0.0xxxxxxx => 0.0000000
web subnet: 10.0.0.0/25
subnet mask: 11111111.11111111.11111111.10000000
app subnet:
0.1xxxxxxx => 0.10000000 =
app subnet: 10.0.0.128/25
db subnet
1.0xxxxxxx => 1.0000000
10.0.1.0/25
active directory
1.1xxxxxxx => 1.1000000
10.0.1.128/25
- so let create vnet in azure

