432 views
1 vote
Why is the subnet mask so important when analyzing an ipv4 address?

User Laxer
by
6.4k points

2 Answers

0 votes

Answer: Please see below as the answer is self-explanatory

Step-by-step explanation:

The subnet mask, allows to understand, in a IPv4 32-bit IP address, which portion represents the network part, and which part is devoted to the host id.

This is important for instance in type B addresses, which normally have 16 bits for the network part, and 16 for the host part.

Sometimes, it is possible to use some of the host bits, for the network part, even though they are within the host part.

The way that the IP protocol "knows" which bits are part of the network ID, and which are for host ID, are defined by the subnet mask.

Basically, all bits in the 32-bits address, set to "1"in the subnet mask, must be interpreted as part of the network ID.

For instance, we could have the following subnet mask:

255.255.240.0

Expressed in binary notation, we have:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0

So, in this example the first 20 bits represent the network part of the address, while the remaining 12 bits represent possible hosts for any of the networks which range is given by the 20 bits of the address, starting from the type B range.

User Sysyphus
by
8.5k points
3 votes
Understanding subnet mask is very important in network infrastructure. It is important because it will tell all the information needed to configure the machine, information such as hostname, port address, the number of ports and broadcast address.  Subnet mask tells you everything.
User Boudewijn Aasman
by
7.2k points