A) 72 hosts, so if we steal 1 bit from the host ,then there will be 7 bits remaining for the host ,
so 128 - 2 = 126 maximum hosts can be served and we have to serve only 72 hosts , so this can be done .
hence masking address = 255.255.255.128 and network address will be 200.1.1.0 .
Next 35 hosts, so if we steal 2 bits now from the host, then there will be 6 bits remaining for the host , so 64 - 2 = 62 maximum hosts can be served and we have to serve only 35 hosts , so this also can be done .
but now our network address will be 200.1.1.128 as we are serving maximum 126 hosts in department A ,so, this will be our new network address with masking address = 255.255.255.192 ...
20 hosts can be provided by 5 host bits as 5 host bits can provide maximum 32 - 2 = 30 hosts
and we only need 20 from them.
Hence , network address for this = 200.1.1.192 with masking address = 255.255.255.224
18 hosts this time , can be provided by 5 host bits as 5 host bits can provide maximum 32 - 2 = 30 hosts and we only need 18 from them.
Hence , network address for this = 200.1.1.224 with masking address = 255.255.255.224
We did all of this , as there were only 145 hosts to serve and maximum hosts we can get from 8 bits are 254 so they can be easily served.
B). Now, see carefully for serving 72 hosts , we have maximum 126 addresses to serve them ,out of which many are currently wasted as we are not using them now .
Here comes the application of subnetting in a more small network .
Like , we split in part A) 254 hosts in 4 different networks and same thing now , we will make subnets for department which wants 72 hosts so that extra not used host addresses can now be given to department D , as now it wants 34 hosts.
Now , if we store our department A host addresses into 3 subnets like 200.1.1.0 , 200.1.1.32 and 200.1.1.64, then we can avoid wastage of 32 hosts which can now be given to department D easily.
Now, we can provide new subnet addresses to departments B,C, and D like using the same procedure as we did in part A.
For part B).
A will be divided into 3 subnets ==> 200.1.1.0 to 200.1.1.31 , 200.1.1.32 to 200.1.1.63 , 200.1.1.64 to 200.1.1.95
B will have subnet ==> 200.1.1.96 to 200.1.1 .159
C will have subnet ==> 200.1.1.160 to 200.1.1.191
D will have subnet ==> 200.1.1.192 to 200.1.1.255