What is a Subnet Mask?

What is a Subnet Mask? Subnet mask is a unique bitmask identified which part of IP address is referred to network location and which is belong to network node.

Mask is used for subnet settings and designed to define net address independently of network class. In other words, subnet mask defines the largest possible number of computers (hosts).

How does a Subnet Mask look like?

The record format is similar to IP address: it’s four binary octets or four fields separated by dots.

Example:

  • all bits, set to 1, correspond to net identifier;
  • bits, set to 0, correspond to node identifier.

Network class

Subnet mask bits

Subnet mask

A

11111111 00000000 00000000 00000000

255.0.0.0

B

11111111 11111111 00000000 00000000

255.255.0.0

C

11111111 11111111 11111111 00000000

255.255.255.0

Different forms are inacceptable for subnet mask. Instead of IP address, 0 and 1 do not alternate, there are always 1 at the left, and all 0 are at the right.

Example of correct and inappropriate subnet masks:

Permitted masks

Decimal form

Binary form

1st octet

2nd octet

3rd octet

4th octet

255.255.255.0

1

1

1

1

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

255.255.0.0

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

0

0

0

0

255.255.255.192

1

1

1

1

1

1

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

Unresolved masks

255.0.255.0

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0

255.243.0.0

1

1

1

1

1

1

1

1

1

1

1

1

0

0

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

Every node in the network necessitates a subnet mask. It’s not an IP address, it just describes subnet address area. If computers with different masks operate in one physical network, they are not able to see each other.

As an example, let’s examine following situation.

An Umbrella Corporation has 10 computers and wants to hook up Internet connection. Due to the small number of gadgets, they will receive one C-class network ranging 254 addresses as the net with minimum possible nodes numbers. Difficulty is very obvious: 244 addresses will be non-used because they can’t be parceled out between computers and organizations situated in another physical network. If our company operates with 20 machines located in 2 physical networks, it should allocate 2 C-class networks for each physical network, with that number of free and unnecessary addresses will double.

In such a manner, if Umbrella Corporation resolves the problem and implement a subnet, its network will have the following contact information:

  • Addresses range of C-class network varies from 192.168.0.0 to 192.168.255.255.
  • Therefore, possible IP addresses can look like 192.168.1.0 or 192.168.1.255 (this one is the last assigned number). In this case, subnet mask will be 255.255.255.0 or 255.255.255.255.
  • If our company operates on 10 computers, we calculate the subnet mask by doing further numeric evaluations.
    • Choose a power of 2 equal or greater than 10.
    • 24=16. It’s a 4th power.
    • Therefore, the last 4 bits come to 0 -> 11111111.11111111.11111111.11110000
  • The subnet mask will look like 255.255.255.240.

More knowledge