askvity

Understanding the /24 Network

Published in Network Hosts 2 mins read

How many hosts in 24?

According to the provided reference, a /24 network has 254 hosts.

The number '24' in network addressing, often written as /24 (pronounced "slash 24"), refers to the subnet mask. It indicates that the first 24 bits of an IP address are used for the network portion, leaving the remaining bits for host addresses within that network.

What the /24 Subnet Mask Means

A /24 subnet mask corresponds to 255.255.255.0.

  • The first three octets (255.255.255) represent the 24 network bits (8 bits + 8 bits + 8 bits = 24 bits).
  • The last octet (0) represents the host portion, which consists of 8 bits (32 total bits - 24 network bits = 8 host bits).

Calculating Available Hosts

With 8 bits available for hosts, there are 2^8 possible addresses within the network.

  • 2^8 = 256 possible addresses.

However, two addresses are reserved and cannot be assigned to individual devices (hosts):

  1. Network Address: The first address in the range (all host bits are 0).
  2. Broadcast Address: The last address in the range (all host bits are 1).

Therefore, the number of usable host addresses is the total possible addresses minus the two reserved addresses:

  • 256 - 2 = 254 usable host addresses.

Subnet Mask Reference Table

The reference "Subnet Masks Reference Table - CloudAccess" confirms these values:

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

As shown in the table, the /24 network size provides 254 usable IP addresses for hosts.

Related Articles