A network administrator requires to set up a number of networks on the IP range at any point in time. For doing this, he needs to create various subnets. A subnet is a medium that ensures the flow of network traffic between the hosts, which need to be segregated on the basis of network configuration. Subnetting helps in improving the network security and performance.
A TCP-IP subnet mask is the most distinguishable and recognizable part of subnetting. It is similar to IP address and comprises four bytes (32 bits). It is writing in the similar way, using the dotted-decimal notation, which is read in the binary notation as: 11111111 11111111 11111111 00000000 and in readable form as 255.255.255.0. This is the most common form of the subnet mask.
Calculating the subnets is necessary for proper network creation. 255.255.255.0. is the default range of the subnet, which provides one network with 255 addresses ranging from 1 to 255. In order to calculate the subnet, one needs to remember the formula. Basics tell that the number 255 is made up of 8 bits in the binary notation, and all the 8 bits need to be set to 1 in order to get 255. The numbers need to be added in the decimal sequence (1,2,4,8,16,32,64,128). The sum of this sequence is 255.
For creating an appropriate subnet mask, one needs to take a certain number of bits from the host address. This address would be the last number in the group of four, which helps making the subnet. Hence 0 is the host address in the subnet 255.255.255.0.
The formula (2^n – 2) can be used to figure out how many networks can be made by borrowing certain number of bits. Post calculating the subnet, the range of new networks need to be worked out.
The ranges of new networks need to be worked out post calculating the subnet. In this procedure, the lowest number in the bits taken from the host address leads and completes the procedure of calculating the TCP-IP Subnet Mask.