Subnet Mask:The term subnet is used in place of the word subnetwork.Subnet Mask is used to determine the class to which a particular IP address belongs.As all we know that an IP address has two parts Network part and host part.A subnet mask separates the IP address into the network and host addresses (
Applying a subnet mask to an IP address separates network address from host address. The network bits are represented by the 1's in the mask, and the host bits are represented by 0's. Performing a bitwise logical AND operation on the IP address with the subnet mask produces the network address. For example, applying the Class C subnet mask to our IP address 216.3.128.12 produces the following network address:
IP: 1101 1000 . 0000 0011 . 1000 0000 . 0000 1100 (216.003.128.012)
Mask: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 (255.255.255.000)
---------------------------------------------
1101 1000 . 0000 0011 . 1000 0000 . 0000 0000 (216.003.128.000)
In general different class IP address has different subnet mask:
Class Mask Binary Format
A 255.0.0.0 11111111.00000000.0000000.00000000
C 255.0.0.0 11111111.11111111.11111111.00000000