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

 Decimal Binary 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 ..... 245 11110101 246 11110110 247 11110111 248 11111000 249 11111001 250 11111010 251 11111011 252 11111100 253 11111101 254 11111110 255 11111111