in Computer Networks recategorized by
429 views
0 votes
0 votes

 What is the correct subnet mask to use for a class-$B$ address to support $30$ Networks and also have the most hosts possible ?

  1. $255.255.255.0$
  2. $255.255.192.0$
  3. $255.255.240.0$
  4. $255.255.248.0$
in Computer Networks recategorized by
429 views

1 Answer

0 votes
0 votes
To have  $30$ networks(sub-networks actually), we have to borrow  $\left \lceil log_{2}(30) \right \rceil=5$ bits from the  host id part of the subnet mask.

In class B addressing, $16$ bits each are reserved for network and host id part. Out of the $16$ host id bits, borrowing $5$ bits would result into a total of  $(8+8+5=21)$  $1's$ and $11$  $0's$ in the subnet mask.

Subnet mask would be:  $11111111.11111111.11111000.00000000$ i.e.  $255.255.248.0$  with total of  $2^{11}$  hosts, which is maximum because if more number of bits are chosen for subnet id part, less would the number of bits availalbe for host id part.

Option D is correct.

Related questions