The Subnet Mask
In any case, the netmask is used to identify the portion of the IP address corresponding to the network and the part corresponding to the host. Indeed, the address of the network is calculated simply by a logical AND between IP address and netmask. For this, we must translate the address decimal to binary, then do the logical according to the following table:
0 and 0 = 0
0 and 1 = 0
1 and 0 = 0
1 and 1 = 1
The default mask for a Class A address is 255.0.0.0, so if one makes the logical AND: Translate decimal network address = 12.0.0.0. In fact, the network mask, the bits set to 1 are associated with the network number, while those set to 0 correspond to the party guests. This is important since this is how we will find the number of machines belonging to a network. Example with a class C address: 200.13.13.26 mask: 255.255.255.0. If we put the mask in binary 11111111.11111111.11111111.00000000 & we see that the host part is coded on 8 bits, so February 8 to 2 = 254 machines max. The netmask can therefore find the network address and the maximum number of machines on a given network. This might seem unnecessary since we know that a network with a Class A address, for example going to be up to 16 million machines and we know also quickly find its network address (first byte code identifier network ).
Bookmarks