In: Computer Science
Answer: A subnet is always a 32-bit number, with leading consecutive 1s followed by trailing consecutive 0s.
1. Class A address on a local network , will not need a subnet mask because there are no sub-networks i.e the network is not split into subnets.
-----------------------------------------------------------------------------
2. Yes we need a subnet mask in this case because we are splitting the network into sub-networks to accommodate 4000 host's in it.
Since it's a class B network, first two octates of it's subnet mask would be all ones. The number of host's in the network are given by the formula 2n- 2, where n = number of trailing zeros in the subnet mask. Hence 2n - 2 = 4000, or n = 12 .
Hence it's subnet mask would be
11111111.11111111.11110000.00000000
--------------------------------------------------------------------------------
3. Here number of hosts is 2n -2 = 254
hence n = 8 which is the number of traling zeros in the subnet mask. Since it's a class C network, it's first three octates are reserved for network address, hence will be all ones. Hence it's subnet mask in binary will be
11111111.11111111.11111111.00000000
4. Since it's a class A network, first octate of the subnet mask will all be ones. Number of subnets is given by the formula 2N , where N is the number of bits borrowed by the network part from the host part in a subnet mask. To split the network into 6 sub-networks, we need at least 3 ones, because 23 = 8 > 6. Hence the subnet mask in binary would be
11111111.11100000.00000000.00000000
------------------------------------------------------------------------------------------
5. Since it's class B address, the first two octates of it's subnet mask would be all ones. The number of ones to be taken from the host part to split it into 126 subnets can be found using the formula
Number of subnets = 2N , where N number of ones to be borrowed from host part.. Thus 2N = 126 or N = 7.
Hence the subnet mask in binary would be
11111111.11111111.11111110.00000000
-------------------------------------------------------------------------------
6. Since it's a class A network, first octates in it's subnet mask would be all ones. Since number of subnets after one year will be 65, hence number of ones to be borrowed from host part = 7. So total leading ones in the subnet mask will be 8+7 = 15. We are left with 32-15 = 17 zeros. Hence the total number of hosts it can support is 217 = 131072, which is far more than the maximum number of hosts per subnet, hence will easily accommodate 50,000 hosts per subnet.
-----------------------------------------------------------------------------------------
7. The network in 6 will provide growth upto 131072 hosts per subnet.
----------------------------------------------------------------------------------
8.