How to find the Subnet Mask in Computer Networks

## How to find the Subnet Mask in Computer Networks

### How to find the Subnet Mask ?

Subnet Mask is a 32 bit binary number.The subnet mask contains all 1's in the network and subnet portion of the address and all zeros in the host potion of the address.

Example.

200.129.41.0  is a Class C address . We need to create 14 subnet on this network. Find the Subnet Mask?

The default mask for this address is 255.255.255.0.To perform subnetting we need to borrow bits from the host part. So we represent the host part of 200.129.41.0 in binary form.

200.129.41.00000000

If we borrow 4 bits from the host part can create 14 subnets.

That is 2n - 2  = 24 - 2 = 16 - 2 = 14

So from the host part of 200.129.41.00000000 we borrow 4 bits.

200.129.41          |   0000          |     0000
Network Address    Subnet Bits     Host bits

The 32 bit Subnet Mask is given by all 1's  in the network and subnetwork portion and all 0's in the host portion.

11111111.11111111.11111111.11110000

255          .255         .255         .240

So the subnet mask is given by 255.255.255.240