askvity

How many hosts in /24?

Published in Network Subnetting 1 min read

A /24 network has 254 usable hosts.

According to the provided reference, a /24 subnet mask (255.255.255.0) allows for 254 usable host addresses. This is because, in any subnet, the first address is reserved for the network address and the last address is reserved for the broadcast address.

Here's a breakdown:

Network Bits Subnet Mask Number of Hosts
/24 255.255.255.0 254
/25 255.255.255.128 126
/26 255.255.255.192 62
/27 255.255.255.224 30
  • What is a /24? The "/24" notation, also known as CIDR notation, indicates that the first 24 bits of the IP address are used for the network address, while the remaining 8 bits are used for host addresses.

  • Why 254 and not 256? Although 8 bits can represent 256 combinations (2^8 = 256), the first IP address is the network address itself and the last IP address is the broadcast address. These are not usable by hosts. Therefore, only 254 are available for host addresses.

  • Example: In a network with IP addresses ranging from 192.168.1.0 to 192.168.1.255 and a /24 subnet mask:

    • 192.168.1.0 is the network address.
    • 192.168.1.255 is the broadcast address.
    • 192.168.1.1 to 192.168.1.254 are available for hosts.

Related Articles