Your IP: Unknown · Your Status: Protected
Unprotected
Unknown
Blog In Depth

What is a subnet mask?

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.

Carlos Martinez

Carlos Martinez

Nov 27, 2020 · 4 min read

What is a subnet mask?

What is a subnet?

There are millions of networks around the world, and they all vary in size. However, the larger a network is, the harder it is to manage and maintain. When a network is divided into smaller pieces, those pieces are called subnets. A subnet is a small network.

Subnetting is beneficial in many ways:

  • 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.

What is a subnet mask?

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 (if you’re wondering what your IP is, this article will explain this in detail). 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.00000001.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 (check our “What is a VPN?” section for more information).

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.

What is the use of Class D and Class E in IP addresses?

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 ranges from 240 to 255 and also doesn’t have a subnet mask. It is used for experimental and study purposes.

İlgili yazılar

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, usable host ranges, and more. There are different types of websites and apps designed to help manage your network and to allocate IP addresses to certain teams.

  • 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

CIDR Subnet mask Number of IP addresses Wildcard mask
/32 255.255.255.255 1 0.0.0.0
/31 255.255.255.254 2 0.0.0.1
/30 255.255.255.252 4 0.0.0.3
/29 255.255.255.248 8 0.0.0.7
/28 255.255.255.240 16 0.0.0.15
/27 255.255.255.224 32 0.0.0.31
/26 255.255.255.192 64 0.0.0.63
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/29 255.255.255.248 8 0.0.0.7
/28 255.255.255.240 16 0.0.0.15
/27 255.255.255.224 32 0.0.0.31
/26 255.255.255.192 64 0.0.0.63
/25 255.255.255.128 128 0.0.0.127
/24 255.255.255.0 256 0.0.0.255
/23 255.255.254.0 512 0.0.1.255
/22 255.255.252.0 1024 0.0.3.255
/21 255.255.248.0 2048 0.0.7.255
/20 255.255.240.0 4096 0.0.15.255
/19 255.255.224.0 8192 0.0.31.255
/18 255.255.192.0 16384 0.0.63.255
/17 255.255.128.0 32768 0.0.127.255
/16 255.255.0.0 65536 0.0.255.255
/15 255.254.0.0 131072 0.1.255.255
/14 255.252.0.0 262144 0.3.255.255
/13 255.248.0.0 524288 0.7.255.255
/12 255.240.0.0 1048576 0.15.255.255
/11 255.224.0.0 2097152 0.31.255.255
/10 255.192.0.0 4194304 0.63.255.255
/9 255.128.0.0 8388608 0.127.255.255
/8 255.0.0.0 16777216 0.255.255.255
/7 254.0.0.0 33554432 1.255.255.255
/6 252.0.0.0 67108864 3.255.255.255
/5 248.0.0.0 134217728 7.255.255.255
/4 240.0.0.0 268435456 15.255.255.255
/3 224.0.0.0 536870912 31.255.255.255
/2 192.0.0.0 1073741824 63.255.255.255
/1 128.0.0.0 2147483648 127.255.255.255
/0 0.0.0.0 4294967296 255.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. Here’s why you should consider hiding your IP address:

  • Accessing geo-blocked content;
  • Hiding your internet activity from ISP;
  • Preventing yourself from falling prey to hackers;
  • Avoiding government surveillance;
  • Staying secure on public Wi-Fi.

NordVPN masks your IP address and encrypts traffic, thus enhancing your security and privacy. It’s an easy-to-use app, allowing you to secure up to 6 devices. With a VPN turned on, your traffic is redirected through an encrypted tunnel, which is your safe harbor.

Protect your online identity with a top-notch VPN. Try it free for 30 days.