What is a Subnet Mask?
A subnet mask (in English: subnet mask) is information that tells you which part of an IP address represents the “network” and which part represents the “host.”
Let’s Dive Deeper
1. What is a Subnet Mask?
A subnet mask is like a “mask” that divides an IP address into two parts. It helps you identify which part of the IP address refers to the network and which part refers to the host.
2. Network Part and Host Part
An IP address shows both “which network it belongs to” and “which computer within that network.” The network part indicates “which network?” and the host part indicates “which computer in the network?”
3. How Subnet Masks Are Written
Subnet masks are written in the same format as IP addresses (e.g., 255.255.255.0), but converting them to binary makes them clearer. For example, 255.255.255.0 in binary is “11111111.11111111.11111111.00000000.”
- The “1” part: Indicates the network part.
- The “0” part: Indicates the host part.
4. Example
Consider an IP address “192.168.0.2” with a subnet mask “255.255.255.0”. Converting these to binary gives:
- IP Address: 11000000.10101000.00000000.00000010
- Subnet Mask: 11111111.11111111.11111111.00000000
The “1” parts of the subnet mask correspond to the network part of the IP address, while the “0” parts correspond to the host part.
- Network Part: 11000000.10101000.00000000
- Host Part: 00000010
So, the IP address “192.168.0.2” means “the 00000010th computer in the network.”
In Short?
When you see the term “subnet mask,” think of it as “information that shows which part of the IP address is for the network and which part is for the host.”