Subnet Mask

The 32-bit IP address contains information about the host and its network. It is very
necessary to distinguish both. For this, routers use Subnet Mask, which is as long as the
size of the network address in the IP address. Subnet Mask is also 32 bits long. If the IP
address in binary is ANDed with its Subnet Mask, the result yields the Network address.
For example, say the IP Address is 192.168.1.152 and the Subnet Mask is
255.255.255.0 then:
This way the Subnet Mask helps extract the Network ID and the Host from an IP
Address. It can be identified now that 192.168.1.0 is the Network number and
192.168.1.152 is the host on that network.

Comments