# The slash after an IP Address - CIDR Notation

What does `/16` mean in `192.168.0.0/16` ?

## 6 Answers

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 10.10.15.10/16

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
```         00001010.00001010.00001111.00001010
AND 11111111.11111111.00000000.00000000
———————————————————————————————————
00001010.00001010.00000000.00000000
```

Step 4) Convert it back to decimal: 10.10.0.0

So now a computer knows that any address from 10.10.0.0 to 10.10.255.255 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.

• I love the visualization of painting masking tape Commented Feb 14, 2017 at 15:33
• 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? Commented Oct 16, 2017 at 21:05
• @CoryKlein it's used to determine if the transmitting node will either 1) ARP for the destination address, or 2) ARP for the address of its default gateway in order to send the packet there. 1 presumes that the destination address is local, or "inside" - and 2 presumes that the destination address is non-local or "outside". Commented Jan 2, 2019 at 11:15
• Stay at 127.0.0.1 and wear a /16 Commented Oct 7, 2020 at 6:09

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, `192.168.10.0/24` is equal to the network `192.168.10.0` with a `255.255.255.0` subnet mask. If you convert `255.255.255.0` to binary, you end up with 24 consecutive `1`'s:

``````11111111.11111111.11111111.00000000
``````

Another example could be `10.0.0.0/8`. 8 consecutive `1`'s in the subnet mask gives you `11111111.00000000.00000000.00000000` or `255.0.0.0`.

For more information, see RFC 4632, Section 3.1.

• THIS is the perfect complement to that first answer. I finally understand what that number actually represents. Commented Dec 18, 2018 at 19:37
• While the top voted answer isn't necessarily bad, the OP didn't ask about how a subnet mask worked or how a node determines whether or not a destination address is on its local subnet, so IMO the top voted answer is over-explaining. Commented Jan 2, 2019 at 11:09
• Does this mean that `192.168.1.1/24` is the same range as `192.168.1.25/24` ? Commented Feb 9, 2022 at 4:27
• Yes. Both of those IP's have host bits set; used in conjunction with the mask bits, you can make a determination as to which subnet an IP with host bits set is a member of. Commented Jun 23, 2022 at 21:34

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

A /9 subnet mask would be 11111111.10000000.00000000.00000000, or 255.128.0.0.

A /30 subnet mask would be 11111111.11111111.11111111.11111100, or 255.255.255.252 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.

• Please be aware that this page still talks about Classful addresses, which have been replaced by Classless Inter-Domain Routing (RFC1519/RFC4632) in 1993. Commented Oct 23, 2013 at 18:54
• 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. Commented Oct 23, 2013 at 19:07
• @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" Commented Oct 23, 2013 at 19:15

192.168.0.0 is private IP address starting range address (192.168.0.0 up to 192.168.255.255 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.

• So if i understood correctly it goes like this: 192.168.0.0/24 means hosts with IP addresses within the range of 192.168.0.1 and 192.168.0.254; another example would be: 192.168.0.0/16 means hosts with IP addresses within the range of 192.168.0.1 and 192.168.254.254 Commented Jul 1, 2018 at 1:49
• Right. You understood the point. Commented Jul 1, 2018 at 2:51
• @FernandoGabrieli actually the interval ranges from `192.168.0.0` to `192.168.0.255`, but the first and last are special. The former is called Network IP and the latter Broadcast IP Commented Nov 2, 2021 at 22:20

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 10.10.0.0/x 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 10.10.0.0 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 255.255.0.0

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 255.255.192.0 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 255.255.255.0 and if we had /8 this means 8/8 = 1 one block is fixed. so 255.0.0.0

It represents the subnet (subnetwork) mask.

1) Re-write the IP address as computers read it.

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