Network

What is a subnet mask?

What is a subnet mask?

Source

The subnet mask is a value to divide IP address to a network part and a host part.

In the above image, Subnet mask is “255.255.255.0”.

When converting binary number, it become “11111111.11111111.11111111.00000000”.

This value differ depending on the situation.

By the way, If you don’t know a subnet, you should read the following article.

What is a subnet?I want to summarize a subnet in this article. Let’s get straight ...

What is a network part?

A network part point a part to identify the network to which the IP address belongs.

“1” of the subnet mask is the network part.

In the above image, It point first 24 bits.

In IP address, It point “192.168.1”.

“192.168.1” of network part use to judge subnet to connect from router and switch.

What is a host part?

“0” of the subnet mask is the host part.

In the above image, It point backward 8 bits.

In IP address, It point “10”.

“10” of host part use to judge connecting device in subnet.

About CIDR

CIDR is flexibly method to assign IP address in subnet.

It’s written as “/n”, where “n” is the prefix‐length (an integer from 0 to 32).

Like the following image, By the prefix‐length, It differ IP addresses that you can assign.

For example, “255.255.255.0” of subnet mask is that the prefix‐length is “/24”.

Source

Total Address Count and Usable Host Count

By CIDR, It differ total address count and usable host count in the subnet.

By the way, total address count and usable host count in the subnet differs value.

How to calculate is the following table.

When 24 of the prefix‐length:

Way of calculating Value
Total Address Count 28 256
Usable Host Count 28 − 2 254

The total address count is IP addresses in the subnet.

The >usable host count is IP addresses that you can assign.