Solution to exercises
- CIDR Notations to solve
172.16.0.0/12
host addresses = 32-12 = 20 = 2^20 -2 = 1048576-2 = 1048574
IP: 10101100.00010000.00000000.00000000
SM: 11111111.11110000.00000000.00000000
: 255.240.0.0
IP: 10101100.0001xxxx.xxxxxxx.xxxxxxxx
range = 10101100.00010000.00000000.00000000 - 10101100.00011111.11111111.11111111
= 172.16.0.0 - 172.31.255.255
192.168.0.0/16
SM = 255.255.0.0
ip = 192.168.0.0 - 192.168.255.255
10.0.0.0/8
SM = 255.0.0.0
ip = 10.0.0.0 - 10.255.255.255
10.100.192.0/20
IP = 00001010.01100100.11000000.00000000
SM = 11111111.11111111.11110000.00000000
= 255.255.240.0
IP = 00001010.01100100.1100xxxx.xxxxxxxx
range = 00001010.01100100.11000000.00000000 to 00001010.01100100.11001111.11111111
= 10.100.192.0 to 10.100.207.255
10.10.0.0/21
IP = 00001010.00001010.00000000.00000000
SM = 11111111.11111111.11111000.00000000
= 255.255.248.0
IP = 00001010.00001010.00000000.00000000
= 00001010.00001010.00000111.11111111
= 10.10.0.0
= 10.10.7.255
Important Information
- When we create networks in cloud or on-premises we will be creating private networks, So in the IPv4 there are some ip address ranges which are reserved for private addresses
- So when you try to create a network we can choose from any of the three ranges reserved
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
Subnet
- Subnet (Sub network) is the part of the network
- Consider the following example
- In this case we need a total enterprise network for 1200 systems approximately
- We need to create 4 subnets
- Floor1
- Floor2
- Floor3
- Floor4
- Total device count = 1200
2^n - 2 ~= 1200
2^n ~= 1200
n = 11
- We need 11 bits for host id
- We have following private cidr ranges
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
- Lets start with 192.168 series and try to identify network cidr range
IP: 192.168.0.0/21
SM: 11111111.11111111.11111000.00000000 (255.255.248.0)
- Each subnet requires 300 devices
2^n ~= 300
n = 9
host id bits for subnet are 9
192.168.0.0/21
IP: 11000000.10101000.00000000.00000000
SM: 11111111.11111111.11111000.00000000
IP: 11000000.10101000.00000xxx.xxxxxxxx
Each subnet has 9 host ids
SM: 11111111.11111111.11111110.00000000
IP: 11000000.10101000.00000xxy.yyyyyyyy
Possibilities:
11000000.10101000.00000 xx y.yyyyyyyy
11000000.10101000.00000 00 y.yyyyyyyy => 192.168.0.0/23
11000000.10101000.00000 01 y.yyyyyyyy => 192.168.2.0/23
11000000.10101000.00000 10 y.yyyyyyyy => 192.168.4.0/23
11000000.10101000.00000 11 y.yyyyyyyy => 192.168.6.0/23
-
Floor 1: 192.168.0.0/23
-
Floor 2: 192.168.2.0/23
-
Floor 3: 192.168.4.0/23
-
Floor 4: 192.168.6.0/23
-
Total Network: 192.168.0.0/21
-
Exercise: Create a private network with 3 subnets
- Each subnet requires 25000 devices to be connected
