What's 24 in "192.168.15.0/24"?

It is the short way of representing a subnet mask.

As Steffen Opel points out in his answer, this is called CIDR notation and the number simply indicates the prefix size used to construct the subnet mask.

So /n means that the first n bits (out of 32 for IPv4) are set to 1, the rest are set to 0. To convert this to a decimal subnet mask you write it in to four octet's and convert to decimal.

So /24 produces 255.255.255.0 because you have twenty four 1 bits and then eigth 0 bits:

Binary:   11111111 11111111 11111111 00000000
Decimal:    255      255      255       0

The short value doesn't have to be a multiple of 8 (ie, it doesn't have to end of the octet boundaries), for example you can take /20 to get 255.255.240.0 as so:

Binary:   11111111 11111111 11110000 00000000
Decimal:    255      255      240       0

Usage with IPv6

The same notation can be appiled to IPv6 as well. Since IPv6 uses 128 bits, instead of 32, the addresses are much larger. I won't go in to the full semantics here, because it's not relevant to the question, but will provide a quick example:

The subnet given in the question is represented by 192.168.15.0/24 and includes all the IPv4 addresses from 192.168.15.0 to 192.168.15.255

An IPv6 subnet can be represented in the same way, for example 2001:DB8::/48 contains all IPv6 addresses in the range 2001:DB8:0:0:0:0:0:0 to 2001:DB8:0:FFFF:FFFF:FFFF:FFFF:FFFF.

Note: IPv6 example shamelessly ripped from the Wikipedia CIDR article.


For more info on Subnet masks themselves, what they mean and how the are used, I would recommend you see the question What are the essentials of a Subnet mask?
Or look at the extensive answer to How does Subnetting Work? over at Server Fault.


DMA57361s answer of this representing a subnet mask is correct and sufficient already (+1) - I'd still like to offer a different approach in explaining this to provide some background regarding the history/motivation for this notation:

"192.168.15.0/24" is the compact specification of an IP address and its associated routing prefix, expressed in CIDR notation:

CIDR notation is constructed from the IP address and the prefix size, the latter being the number of leading 1 bits of the routing prefix. [emphasis mine]

The referenced short Wikipedia article already explains the topic at hand nicely; for a more thorough explanation of many related aspects you might consult the respective parent topic Classless Inter-Domain Routing - in particular you'll find there information about the historical Background for the change from subnet masks to prefix length/size.

Finally, for a good and intuitive representation on how to interpret these notations when you encounter them in practice you might look at the tables within IPv4 subnetting reference as well.