User:ToBeFree/CIDR

CIDR notation for IP addresses.

IPv4
The number after the slash is the number of bits that you are specifically referring to. For example, if you are specifically referring to one IP address, you can write "/32", as you are referring to all of the 32 bits an IPv4 address has. If you are referring to all IP addresses in the world, you can write "/0", as you are not referring to anything in specific.


 * "1.0.0.0/8" is every IP address that starts with "1."
 * "1.1.0.0/16" is every IP address that starts with "1.1."
 * "1.1.1.0/24" is every IP address that starts with "1.1.1.". That's 256 addresses.
 * "1.1.1.0/25" begins at "1.1.1.0" and ends at the half of the next block, "1.1.1.127". That's 128 addresses. You can halve that block further:
 * "1.1.1.0/26" begins at "1.1.1.0" and ends at "1.1.1.63". That's 64 addresses. And once more:
 * "1.1.1.0/27" begins at "1.1.1.0" and ends at "1.1.1.31". That's 32 addresses.

IPv6
The number after the slash says how much of the left side you refer to. Each block separated by colons has a size of 16 (bits). If you mean all addresses that start with "2601:342:c003:3f0", you mean four of these blocks. That's 16*4=64. Almost always, 64 is the highest meaningful number you'll see, as almost every internet connection is allowed to use an entire /64 for themselves. So if you want to calculate a range, you can use the IP range calculator (IPv6) but if your result has a larger number than "64" at the end, replace it by 64.