What is a subnet mask, and how to find it?
A subnet mask resembles an ordinary Internet Protocol address, consisting of 32 bits separated into four octets. Another way of depicting these so-called masks is by referring to their structure.
It is a string of ones followed by zeros in binary. In the simplest sense, a subnet mask reveals the range of available IP addresses.
The mask shows the exact number of devices that can connect depending on the set rules.
What is a subnet?
A subnet represents smaller networks inside a larger network. Typically, people split them by using the IP address and subnet mask.
Network segmentation works as a solution to commonplace networking hurdles. For example, if criminals compromise one subnetwork, others remain safe from unauthorized access.
Furthermore, separated local networks are less likely to show signs of severe congestion. After dividing a network, subnets will handle fewer hosts. Hence, this split minimizes local traffic that a single network has to manage.
However, network segmentation should prioritize the usage criteria. In other words, the generated subnets should connect hosts with similar purposes.
Example of subnetworks at home
To illustrate this rule, let’s examine a relatively simple subnetwork collection. Users divide networks according to their purpose. One subnet could serve guests exclusively. Another could accept connections from smart home gadgets.
The final subnet could take care of computers and smartphones. In a way, this relates to a simple load balancing: distributing tasks to separate entities.
Difference in IPv6 and IPv4 addresses
IPv6 and IPv4 networks differently distinguish subnet masks. In IPv6 networks, they are prefix length, commonly known as a prefix.
For instance, here is how a prefix length looks for 65 subnetworks:
Understanding subnet masks
Default subnet masks follow a similar structure as regular IP addresses. The latter contains two components:
- Network ID, which uniquely identifies the network segment.
- Host ID, which relates to the individual connected devices.
In a sense, a subnet mask conceals the network portion of the address, preserving only the host address. Its primary purpose is to define the exact number of IP addresses available within the network.
For example, if a subnet mask indicates 256 available IP addresses, devices beyond that number will not connect.
The odds are most networks have a subnet mask 255.255.255.0. In this case, we take a look at the first three octets (or the network prefix) that cannot variate.
Only “0” can be anything from 0 to roughly 256. By manipulating the octets, we can increase or decrease the number of available IP addresses.
Example of subnet masks
For example, 255.255.0.0 will supply approximately 65,536 unique IP addresses, creating a Class B network. If we take things further and use a subnet mask of 255.0.0.0, we would craft a Class A network, facilitating over 16 million hosts.
IP addresses and subnet masks are initially, but they are simpler when expressed in dot decimal. We can quickly turn the subnet mask into their binary form:
- 255.255.255.0 = 11111111.11111111.11111111.00000000
- 255.255.0.0 = 11111111.11111111.00000000.00000000
- 255.255.255.128 = 11111111.11111111.1111111.10000000. In this case, only 128 IP addresses are available.
Usually, a network won’t have exactly 128 or 256 usable IP addresses. The first IP address is generally for the network subnet identifier. Additionally, there is a second reserved address referred to as the.
Subnet mask cheat sheet
Here is a simple cheat sheet for calculating subnet masks:
|Addresses||Hosts||Netmask||Amount of a Class C|
|/ 30||4||2||255.255.255.252||1 / 64|
|/ 29||8||6||255.255.255.248||1 / 32|
|/ 28||16||14||255.255.255.240||1 / 16|
|/ 27||32||30||255.255.255.224||1 / 8|
|/ 26||64||62||255.255.255.192||1 / 4|
|/ 25||128||126||255.255.255.128||1 / 2|
How to find the subnet mask in your device?
A subnet mask will help you determine the number of devices that can connect to your network.
- Open the Control Panel and select Network and Sharing Center.
- Select your network name (next to Wi-Fi).
- Click on Details.
- Your IP address and subnet mask will be visible in this window.
- Navigate to System Preferences and pick Network.
- Opt for the Advanced option to see more settings.
- Click on the TCP/IP tab, and you will see both your IP address and the applied subnet mask.
- An alternative is to open Terminal and type “ipconfig.” Press enter, and among the presented information, you will find the same information.
- Move to Settings and find the Wi-Fi section.
- Look for your network and click on the “i” icon.
- You will see all network-related details, including the subnet mask.
- Navigate to Settings, and select the Wi-Fi & network section.
- Click on your network name in the Wi-Fi section.
- Choose Advanced.
- All the network details will be visible to you.
Understanding the subnet mask principle is highly convenient. You can quickly learn the number of IP addresses available on your network.
Furthermore, you can determine the number of subnets as well. For instance, if you have a 255.255.0.0 subnet mask, you get 1 subnet.
However, this number shifts according to the subnet number of bits in the mask. If we consider 255.255.254.0 (11111111.11111111.11111110.00000000) as our new subnet mask, we get more networks but fewer hosts.
In the latter mask, the network number is 128, and they have only 510 available IP addresses.
Overall, managing your network is a huge plus. You can enhance its security and ensure smooth performance.
Protect your IP address and location details
However, your IP address is not always safe: many online entities need it to track you. When entering the digital world, you reveal personal data, starting with your location.
Hence, online services, hackers, government agencies, and marketers can always determine your approximate location.
Fortunately, this does not have to be the case for you. A VPN helps you pick a location you present across the digital landscape.
Atlas VPN offers a range of servers, all pinpointing to different regions. Such spoofing can assist in accessing geo-blocked content and concealing your online activities from your ISP.
So, get a VPN to take care of your digital privacy even when you connect to unsecured Wi-Fi.