Lets create a private network of size 10000 devices
2^n ~= 10000
number of zeros = 14
number of ones = 32-14 = 18
subnet mask : 11111111.11111111.11000000.00000000
subnet mask: 255.255.192.0
My private network can be from any of the cidr ranges
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
So the private network will be
192.168.0.0/18
or
10.0.0.0/18
or
172.16.0.0/18
Lets create a private network of size 100000 devices
2^n ~= 100000
number of zeros => 17
number of ones => 32-17 = 15
to choose a range
10.0.0.0/15
or
172.16.0.0/15
Now since we know how to create a network, we should also look into how to break the network into smaller networks called as subnets
Scenario-1: So lets start with the following scenario
network
network range
2^n ~= 1000
number of zeros = 10
number of ones = 32-10 =22
since this is private network
ip: 192.168.0.0/22
sm: 11111111.11111111.11111100.00000000
sm: 255.255.252.0
Now we need to create subnets in this network. Each subnet size is 250 devices
2^n ~= 250
number of zeros = 8
number of ones = 32-8 = 24
sm: 11111111.11111111.11111111.00000000
sm: 255.255.255.0
subnet sm : 11111111.11111111.11111111.00000000
network sm: 11111111.11111111.11111100.00000000
for subnets we have two bits
xx
00
01
10
11
subnet1
00 => 192.168.0.0/24
subnet 2 =>
01 => 192.168.1.0/24
subnet 3 =>
10 => 192.168.2.0/24
subnet 4 =>
11 => 192.168.3.0/24
Scenario 2
Network requirements
network size is 4000
2^n ~= 4000
number of zeros (n) = 12
number of ones => 32-12 => 20
sm: 11111111.11111111.11110000.00000000
sm: 255.255.240.0
Each subnet should have 1000 devices
2^n ~=1000
number of zeros (n) = 10
number of ones => 32-10 = 22
sm: 11111111.11111111.11111100.00000000
Lets compare subnet mask of subnet and network
subnet: 11111111.11111111.11111100.00000000
network: 11111111.11111111.11110000.00000000
so positons
xx00
Lets choose a private range for network
10.10.0.0/20
Now lets try to come up with cidr ranges for the subnets