The slash after an IP Address - CIDR Notation



What does the "/16" means in here : "", for example.


Posted 2013-10-23T15:57:09.410

Reputation: 875

You might find this cheat sheet useful: Also this subnet calculator:

– CellPointNetworks – 2018-09-24T08:15:09.353



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.


Posted 2013-10-23T15:57:09.410

Reputation: 1 726

5I love the visualization of painting masking tape – El Guapo – 2017-02-14T15:33:19.713

What does being "part of its network" mean? What is accomplished when you take a segment of IPs and call them the inside and the rest the outside? – Cory Klein – 2017-10-16T21:05:46.127


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.

John Jensen

Posted 2013-10-23T15:57:09.410

Reputation: 7 584

4The best answer. Thanks for sharing. – Soundararajan – 2016-09-28T11:56:21.373


The slash following the IP address is the abbreviation for the subnet mask.

The binary version of a subnet mask is going to be comprised of ones and zeros just as the binary verison of an IP address would be, however, the ones in a subnet mask are all consecutive. The amount of ones in the subnet mask is equal to the number of the abbreviation.

For example, the /16 subnet mask you asked about would have 16 ones in a row, the rest of the numbers being zeros. 11111111.11111111.00000000.00000000. When converted from the base 2 number system of binary into the base 10 number system of the decimal version of the IP address, it therefore equals

A /9 subnet mask would be 11111111.10000000.00000000.00000000, or

A /30 subnet mask would be 11111111.11111111.11111111.11111100, or which is great for creating a network that only accounts for 2 routers or layer 3 switches because there are only 4 total IP addresses and only 2 of those are usable host IP addresses.

A lot can be done with subnetting, but subnetting is a whole new monster to tackle if you are just getting started.


Posted 2013-10-23T15:57:09.410

Reputation: 557


Please be aware that this page still talks about Classful addresses, which have been replaced by Classless Inter-Domain Routing (RFC1519/RFC4632) in 1993.

– Sander Steffann – 2013-10-23T18:54:10.990

Mistake on my part. I grabbed the first diagram I could find that spelled out exactly what each of them meant in the simplest fashion. – MooseBalm – 2013-10-23T19:07:17.740


@4m1nh4j1 It's a bit short on pretty pictures, but check out the subnetting explanation over on Server Fault. The /x style is discussed about halfway down, under "More Terminology"

– voretaq7 – 2013-10-23T19:15:56.630


one another simple explanation can be, how many address you can have in one range.

ex: you have an ip a.b.c.d/x. So a,b,c,d individually can have values 0-255 so which gives us 2^3(max length is 3) = 8. so one part of ip can have 8 bits.

So now if we write ip like so now x/8 = total number fixed blocks we have.

ex: if we have /16 so 16/8 = 2 this means we have 2 blocks free so now ip would be so here first two blocks are fixed and we can have 0-255 in each last two blocks so 256*256 = 65536(address we can have) and in netmask would be

now lets say we had /18 which is not completely divisible by 8, so 18/8 = 2(fixed blocks) and 2 is left so now divide 256 twice which is 256/2 = 128, 128/2 = 64 so we got 64 now 256-64 = 192. so now our netmask would be which means we can have 64*256 address.

further, if it was /24 this means 24/8 = 3 three blocks are fixed and one is variable. netmask is and if we had /8 this means 8/8 = 1 one block is fixed. so

Umesh Kaushik

Posted 2013-10-23T15:57:09.410

Reputation: 149

3 is private IP address starting range address ( up to Small network). It means you have used sixteen bits for network address out of thirty two bits and bits are remaining for host addressing. for these remaining sixteen bits can be used for sub netting based on your network design and other sub netting steps illustrate in above posts.

Jatinder Brar

Posted 2013-10-23T15:57:09.410

Reputation: 137

So if i understood correctly it goes like this: means hosts with IP addresses within the range of and; another example would be: means hosts with IP addresses within the range of and – Fernando Gabrieli – 2018-07-01T01:49:35.567

Right. You understood the point. – Jatinder Brar – 2018-07-01T02:51:27.790


It represents the subnet (subnetwork) mask.

1) Re-write the IP address as computers read it. converts to binary/base2/'bits' as 11000000.10101000.00000000.00000000

2) The number of bits (from left to right) that represent the subnet address is specified as 16 ('/16').

16 bits, or 11000000.10101000 (192.168) is the network address and 0.0, or 00000000.00000000, is the host address - in this case a broadcast address.

It's referred to a mask because you are telling the computer to ignore that number of bits when calculating the host address, or perhaps that the network wears those number of bits as it's identifier, or mask.

Ron Royston

Posted 2013-10-23T15:57:09.410

Reputation: 3 237