Introduction: 
Slash notation, also known as CIDR notation, is a simple way to express an IP address along with its subnet mask. This article will guide you through the process of determining the slash notation for an IP address, even if you don’t have the subnet mask.


Step 1: Determine the subnet mask

If you don’t have the subnet mask, you can use the default subnet mask based on the IP address class:

Class A (first number 1-126): 255.0.0.0

Class B (first number 128-191): 255.255.0.0

Class C (first number 192-223): 255.255.255.0

Remember, this method assumes the default subnet mask. In some cases, the subnet mask might be different, but this is a good starting point.


Step 2: Convert the subnet mask to binary

Convert each octet of the subnet mask (the numbers separated by periods) to its 8-bit binary representation. To do this, use the decimal-to-binary conversion method:

For example, if the subnet mask is 255.255.255.0, the binary conversion would look like this:

255 in decimal is 11111111 in binary

255 in decimal is 11111111 in binary

255 in decimal is 11111111 in binary

0 in decimal is 00000000 in binary

So, the binary representation of the subnet mask 255.255.255.0 would be:

11111111.11111111.11111111.00000000


Step 3: Count the continuous ’1’s

Count the total number of continuous ’1’s in the binary representation of the subnet mask, starting from the left.


Step 4: Determine the slash notation

Write the count of continuous ’1’s after a forward slash (/) following the IP address. For example, if the IP address is 192.168.1.10 and you counted 24 continuous ’1’s, the slash notation would be:

192.168.1.10/24


DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
.....
24511110101
24611110110
24711110111
24811111000
24911111001
25011111010
25111111011
25211111100
25311111101
25411111110
25511111111