The cart is empty

In today's digital world, dividing IP addresses into subnets is a key element for managing networks and ensuring their efficient and secure operation. The subnet mask, prefix, and the number of IP addresses in each prefix are fundamental concepts that help understand how networks are organized and how the address space can be divided for various needs.

The Purpose of the Subnet Mask

A subnet mask is a combination of bits that specifies how many addresses in the network are reserved for the network address and how many for host addresses. The mask is typically expressed in two formats: decimal (e.g., 255.255.255.0) and prefix (e.g., /24). This mask allows devices in the network to differentiate which part of the IP address represents the network they are in and which part identifies a specific device (host) in this network.

The Significance of the Prefix

The prefix indicates the length of the common part of the address for all devices in a given subnet, expressed by the number of fixed bits at the beginning of the IP address. The prefix is most commonly presented as a slash and a number (e.g., /24), indicating that the first 24 bits of the address are fixed and define the network, while the rest of the address is designated for individual hosts.

The Number of IP Addresses in Each Prefix

The number of available IP addresses for hosts within a subnet depends on the length of the prefix. The shorter the prefix (i.e., the number after the slash is smaller), the more addresses are available for hosts. For example:

  • /24 (mask 255.255.255.0) provides 256 IP addresses, of which one is reserved for the network address and one for the broadcast, leaving 254 addresses for hosts.
  • /25 (mask 255.255.255.128) divides a /24 network into two subnets, each with 128 addresses, of which 126 can be used for hosts.
  • /30 (mask 255.255.255.252) is often used for point-to-point connections, where only 4 IP addresses are available, two of which can be used for devices (one for each end of the connection), one is the network address, and one is the broadcast.

 

 

Prefix      Number of IP addresses
/8 16,777,216
/9 8,388,608
/10 4,194,304
/11 2,097,152
/12 1,048,576
/13 524,288
/14 262,144
/15 131,072
/16 65,536
/17 32,768
/18 16,384
/19 8,192
/20 4,096
/21 2,048
/22 1,024
/23 512
/24 256
/25 128
/26 64
/27 32
/28 16
/29 8

 

Understanding the principles of subnet masks, prefixes, and the distribution of IP addresses is the foundation for effective network design and management. This knowledge allows network administrators to optimize the use of address space, increase network security, and improve its performance. Proper planning and division of the IP address space are essential for building robust and flexible networks that can meet the requirements of modern organizations.