Your IP: Unknown · Your Status: ProtectedUnprotectedUnknown

What is a subnet mask? A comprehensive guide

At first glance, your IP address might look like a bunch of random numbers. However, there is a hidden logic behind this combination, and you don’t need to be a tech expert to crack it. It’s called a subnet mask, and if you’re wondering what a subnet mask is and how to find it, you’re in the right place.

Karolis Bareckas

Karolis Bareckas

What is a subnet mask? A comprehensive guide

What is a subnet?

Subnet definition

A subnet (also known as a subnetwork) is a small network within a large one. Large networks are generally difficult to maintain. Furthermore, traffic must travel a longer distance and pass through unnecessary routers to reach its destination. Subnetting –– or dividing the network into smaller pieces –– is used to make the network easier to maintain. While it has many benefits, subnetting requires additional hardware (e.g., routers), potentially costing extra to implement.

Benefits of subnetting:

Here are the ways in which subnetting can improve your networking experience:

  • Easier maintenance
  • Advanced network security so that one subnet can’t access the other one
  • Reduced network traffic
  • When you can subnet your network, you don’t need to acquire additional IP addresses from ISPs (internet service providers)

However, subnetting often requires additional hardware such as routers, so it also comes with a cost.

Subnet mask explained: How does subnetting really work?

IP address explained

Just like every address is defined by a street name and a house number, an IP address consists of a network component and a host component. Let’s take 192.168.123.132 as an example. The first three octets (192.168.123.) represent the network and the last octet identifies a machine on your network.

IP addresses consist of 32 binary bits (4 x 8), but since they are long and complex, we use a dot decimal system.

192.168.123.132 = 11000000.10101000.01111011.10000100

The subnet mask reflects the network portion in an IP address. It might look look something this:

255.255.255.0 = 11111111.11111111.11111111.00000000

When you combine them, you get:

11000000.10101000.01111011.00000000 (network address: 192.168.123.0) 00000000.00000000.00000000.10000100 (host address: 000.000.000.132)

192.168.123.0 is your subnet, while 192.168.123.132 is a destination address (a device in your subnet). However, if you’re using a VPN, your IP will change depending on the server you’re connected to.

What are the different classes of IP addresses?

IP addresses are divided into three classes: A, B, and C. Classes D and E also exist, but they are not used by end users. Each class has a different default subnet mask, and you identify the class by looking at the first octet of an IP address. However, there are also different types of IP addresses: static, dynamic, public, and private.

Class A IP address

Class A networks use a subnet mask of 255.0.0.0 and have 0-127 as their first octet. It allows 126 networks and almost 17 million hosts per network.

Class B IP address

Class B uses a subnet mask of 255.255.0.0 and has 128-191 as its first octet. It is used by medium and large networks. Class B allows around 16,000 networks and 65,000 hosts per network.

Class C IP address

Class C is used for local area networks (LAN) and allows 2 million networks with 254 hosts each. Class C uses a subnet mask of 255.255.255.0 and has 192-223 as its first octet.

Class D IP address

Class D is reserved for multicasting (transmitting streaming media and other data for multiple users). It ranges from 224 to 239 and doesn’t have a subnet mask as multicasting is not destined for a particular host.

Class E IP address

Class E ranges from 240 to 255 and also doesn’t have a subnet mask. It is used for experimental and study purposes.

It’s worth noting, however, that the classful IP addressing is outdated. Classless Inter-Domain Routing, or CIDR, is a much more efficient way of allocating IP addresses.

Does a subnet mask matter?

A subnet mask helps keep traffic within its designated subnets. Subnet masks mean data packets don’t need to travel as far, thus improving network performance.

What is Classless Inter-Domain Routing?

Classless Inter-Domain Routing, or CIDR, was introduced in 1993 as a way to get rid of the classful network structure and significantly improve the method of allocating different IP addresses. It also aimed to reduce the stress across routing tables.

A routing table is a table of rules and designations that tell a data packet which route it needs to take in a network to reach the desired location. As IPv4 addresses spiraled out of control, routing tables needed to grow with them.

While originally planned as a temporary fix to stop the rapid exhaustion of IPv4 addresses, CIDR is still being used over 20 years later.

CIDR is based on variable-length subnet masking, or VLSM. Rather than using a mask to denote which IP address a network belongs to, a specific suffix can be combined with the IP address. This suffix contains the variable number of bits. This shortening of the display allows CIDR to create even more precise and numerous network divisions.

For example, here is a CIDR IP address:

192.168.123.132/12

The prefix is a standard IP address. The suffix (12) tells us how many bits the address has altogether.

The most important feature of CIDR is the ability to create supernets. This is done by combining CIDR blocks, groups of IP addresses with the same bits and network prefixes. By creating a supernet, an organization can reduce the stress on routing devices, while simultaneously saving address space.

CIDR slowed the usage of IPv4 addresses down until the advent of IPv6 addresses, which would take a much longer time to deplete, if at all.

How do you find the subnet mask?

On macOS

  1. Go to “System Preferences” > “Network.”
  2. Select your network and click “Advanced.”
  3. Click on TCP/IP tab and you will find your IP address along with the subnet mask.

On Windows

  1. Go to “Control Panel” > “Network and Sharing Centre.”
  2. Click on your network name and then click “Details.”
  3. You will find the subnet mask along with other network details.

On iOS

  1. Go to “Settings” > “Wi-Fi.”
  2. Find the network you’re connected to and click the “i” icon.
  3. You will find the subnet mask along with other network details.

On Android

  1. Go to “Settings” > “Wireless & Networks” > “Wi-Fi.”
  2. Tap on the network you’re connected to.
  3. You will find the subnet mask along with other network details.

What is a subnet mask calculator?

Subnet calculators give users a range of information: a subnet mask, network addresses, an IP class, and usable host ranges. Different websites and apps are designed to manage your network and allocate IP addresses accordingly.

  • A subnet range calculator provides start and end addresses.
  • An IPv4 to IPv6 converter allows you to convert IP addresses from IPv4 to IPv6.
  • Subnet mask calculators provide users with available subnets and subnet masks.
  • An IPv4 CIDR calculator allows you to enter a subnet range and see IP address information in that range.

Subnet mask cheat sheet

CIDRSubnet maskNumber of IP addressesWildcard mask
/32255.255.255.25510.0.0.0
/31255.255.255.25420.0.0.1
/30255.255.255.25240.0.0.3
/29255.255.255.24880.0.0.7
/28255.255.255.240160.0.0.15
/27255.255.255.224320.0.0.31
/26255.255.255.192640.0.0.63
/29255.255.255.24880.0.0.7
/28255.255.255.240160.0.0.15
/27255.255.255.224320.0.0.31
/26255.255.255.192640.0.0.63
/25255.255.255.1281280.0.0.127
/24255.255.255.02560.0.0.255
/23255.255.254.05120.0.1.255
/22255.255.252.010240.0.3.255
/21255.255.248.020480.0.7.255
/20255.255.240.040960.0.15.255
/19255.255.224.081920.0.31.255
/18255.255.192.0163840.0.63.255
/17255.255.128.0327680.0.127.255
/16255.255.0.0655360.0.255.255
/15255.254.0.01310720.1.255.255
/14255.252.0.02621440.3.255.255
/13255.248.0.05242880.7.255.255
/12255.240.0.010485760.15.255.255
/11255.224.0.020971520.31.255.255
/10255.192.0.041943040.63.255.255
/9255.128.0.083886080.127.255.255
/8255.0.0.0167772160.255.255.255
/7254.0.0.0335544321.255.255.255
/6252.0.0.0671088643.255.255.255
/5248.0.0.01342177287.255.255.255
/4240.0.0.026843545615.255.255.255
/3224.0.0.053687091231.255.255.255
/2192.0.0.0107374182463.255.255.255
/1128.0.0.02147483648127.255.255.255
/00.0.0.0 4294967296255.255.255.255

Why should I hide my IP address?

Having your IP address publicly exposed is a risky business. It’s like driving around the city in a Ferrari with your home address written on the hood.

NordVPN masks your IP address and encrypts traffic, enhancing your security and privacy. The Threat Protection feature will even block website trackers and invasive ads. It’s an easy-to-use app, allowing you to secure up to six devices. It’s the perfect VPN for multiple devices because NordVPN is compatible with all major platforms.

NordVPN’s Meshnet also allows users to remotely access multiple devices across a single subnet, something that could come in use for anyone looking to alter their subnet settings. With a VPN turned on, your traffic is redirected through an encrypted tunnel, which is your safe harbor.

Here are some of the reasons as to why you may want to hide your IP address.

  • Hiding your internet activity from ISPs. Your provider could choose to indulge in bandwidth throttling during high-traffic hours. It can’t choose to throttle you if it can’t see what you’re up to.
  • To hide your physical address. Some hackers with enough tech savvy can determine your physical location based on your IP address.
  • Staying secure on public Wi-Fi. Public Wi-Fi can be notoriously patchy when it comes to security. By hiding your IP address before connecting to it, you remove yourself from the list of other potential victims on the network.

When it comes to cybersecurity, it’s always best to stay ahead of the curve. Having a proactive attitude towards your online security will keep you a step ahead of hackers and snoopers.

Online security starts with a click.

Stay safe with the world’s leading VPN


Karolis Bareckas
Karolis Bareckas Karolis Bareckas
Karolis is a tech geek who writes about cybersecurity, online privacy, and the latest gadgets. When not rattling his keyboard, he’s always eager to try a new burrito recipe or explore a new camping spot.

We value your privacy

This website uses cookies to provide you with a safer and more personalized experience. By accepting, you agree to the use of cookies for ads and analytics, in line with our Cookie Policy.