00.000.000.00

What is a Subnet mask?

A subnet mask is a bitmask that determines which part of the IP address of the host belongs to the network address, and which one to the host address in that network. The mask is not transmitted in a data packet, unlike the IP address itself.

The subnet mask is also set by 32 bits. Unlike the IP address, in the subnet mask’s beginning there’s always a one, and the remaining cells are filled with zeros, meaning there can’t be a mask of a form such as 00110101.11100001.00011111.11110000 – but there can be a form such as 11111111.11111111.10000000.00000000

This form of recording is not very convenient, so most often it is replaced by a specification of a long mask, meaning the number of units in the mask is indicated after the IP-address. For example, 192.168.129.1/17

It is already known that the subnet mask serves to separate the network address from the host address on the network. Thus, by applying the subnet mask to the IP address, you can learn the network boundaries.

To do this, we perform bitwise multiplication (logical AND)
11000000.10101000.10000001.00000001
11111111.11111111.10000000.00000000
------------------------------------------------------------
11000000. 10101000.10000000.00000000

Meaning 192.168.128.0

This address is called the subnet address.

The subnet mask in the example above is 17, which allows us to create no more than 32,768 different nodes within the network (computers, servers, network printers, phones or tablets).