Skip To Main Content | Accessibility

Begin Main Content

The slash after an IP Address - CIDR Notation []

A simple explanation:

The /<number> is how a computer can quickly calculate what is part of its network and what is not. It represents the bit length of the subnet mask, as indicated above. The subnet mask is like masking when painting. You place a mask over what you DO NOT want to paint on. The subnet mask is a way to calculate the network portion of the address space and the host address space. The network address space is assigned to you, the host address space you define which device receives what address in the host space.

A computer performs binary math of ANDing the IP address and the network mask.

IP Address

Step 1) Translate the IP address 4 octets into binary: 00001010.00001010.00001111.00001010

Step 2) Translate the Subnet mask 4 octets into binary, which is easy using CIDR: 11111111.11111111.00000000.00000000

Step 3) Perform the ANDing operation on the two addresses. This will give you the Network Address for the subnet.

ANDing rules are as follows:

  • 1 AND 1 = 1
  • 0 AND 1 = 0
  • 0 AND 0 = 0
  • 1 AND 0 = 0
     AND 11111111.11111111.00000000.00000000

Step 4) Convert it back to decimal:

So now a computer knows that any address from to is part of its network and any other address is not.

It's like a binary network gang thing, you are in or you are not.


The slash and the number following it is just a shorthand way to write a subnet mask. It's called CIDR (Classless Inter-Domain Routing) notation. It's also commonly referred to as the prefix length.

The number after the slash represents the number of consecutive 1's in the subnet mask. For example, is equal to the network with a subnet mask. If you convert to binary, you end up with 24 consecutive 1's:


Another example could be 8 consecutive 1's in the subnet mask gives you 11111111.00000000.00000000.00000000 or

For more information, see RFC 4632, Section 3.1.


12:51 PM, 26 Nov 2019 by Iuri Sampaio Permalink

Add comment