What Is a Subnet Mask?
A subnet mask identifies which bits of an IPv4 address represent the network portion and which represent the host portion. It helps a device decide whether a destination is local.
A prefix such as /24 means the first 24 bits identify the network. A device compares its own network prefix with the destination and sends non-local traffic to its default gateway.
Two practical examples
Example 1. A laptop at 192.168.10.25/24 treats 192.168.10.60 as local.
Example 2. It sends traffic for 192.168.20.10 to its router because that address is in another subnet.
What to check in practice
- Identify the exact device, software version or service involved before changing a setting.
- Record the current configuration so you can reverse a change that causes problems.
- Test one variable at a time and confirm the result using reliable measurements or logs.
- Use the official documentation for model-specific limits, compatibility and safety requirements.
An incorrect mask can make devices believe remote addresses are local or local addresses are remote. Verify the prefix and gateway together when diagnosing reachability.
Common question
What is the first thing to do? Start by identifying the exact use case and the system involved. Then verify the relevant settings or measurements before making changes. A general explanation is a starting point, not a substitute for checking your own environment.
TryHook publishes independent educational explainers. Product names and technical standards belong to their respective owners. Some pages may eventually contain clearly disclosed affiliate links; editorial explanations are not paid endorsements.
Explore more in Networking Basics
Continue with related beginner-friendly guides.