Subnet

November 29, 2022
Update date: July 10, 2026
A subnet is a logically isolated part of a computer network that divides the overall IP address space into smaller segments.

What a subnet is for

Subnetting simplifies routing, improves the security and manageability of a large network, and helps optimally distribute load among devices.

In large companies or with providers, segmentation is essential for:

  • isolating services (for example, corporate departments, guest Wi-Fi),
  • limiting the spread of failures or attacks,
  • implementing different QoS policies and traffic filtering.

How subnet organization works

Subnetting is based on dividing an IP range according to a given mask or prefix length. Each segment receives its own address range that does not overlap with other subnets in that network. The boundary between the network and the “hosts” within the subnet is defined by the mask.

One purpose of subnets is to divide a large network into a group of smaller interconnected networks in order to optimize traffic.

For example, the network 192.168.1.0/24 can be divided into four subnets with a /26 prefix:

  • 192.168.1.0/26
  • 192.168.1.64/26
  • 192.168.1.128/26
  • 192.168.1.192/26

This is convenient for isolating subscribers of different departments or services.

Advantages of network segmentation

Dividing a network into subnets offers several advantages at once:

  • Security: isolating groups of devices reduces the attack surface.
  • Scalability: it is easier to count and allocate addresses as the company grows.
  • Reduced broadcast traffic: parasitic load is decreased.

This is why subnetting is considered one of the fundamental technologies in designing corporate, cloud, and carrier networks.

Each organization is responsible for determining the number and size of the subnets it creates within the address space available for its use.

Where subnets are used

  • Separating office departments, guest networks, and server rooms within companies.
  • Separating B2B and B2C traffic at a provider.
  • Isolating IoT networks to improve security.
  • In large infrastructures (based on DPI), subnet automation allows flexible management of rules and filtering.

Technical FAQ

What is a subnet mask?

A subnet mask is a value that determines which part of an IP address belongs to the network and which part belongs to devices (hosts).

In IPv4, the mask can be written in the familiar format, for example 255.255.255.0, or in CIDR format — /24.

It is the mask that allows devices to determine whether they are on the same subnet or whether a router must be used to transmit data.

How do you calculate the number of hosts in a subnet?

The number of available addresses in a subnet depends on the prefix length. For IPv4, the total number of addresses is calculated using the formula 2^(32−N), where N is the prefix length. For example, a /24 subnet contains 256 addresses, of which 254 are typically available for devices, since one address is reserved for the network identifier and another for the broadcast address. Longer prefixes, such as /28 or /29, are used for smaller segments, while shorter ones are used for larger ones.

What is the difference between a subnet and a network prefix?

A subnet is a specific range of IP addresses united by common routing and addressing rules. The network prefix shows which part of the IP address defines that subnet. For example, in the notation 192.168.10.0/24, the address 192.168.10.0 denotes the network, and /24 is the length of its prefix. In other words, the prefix describes the size and boundaries of the subnet, while the subnet itself is the address range.

What is the difference between subnetting and supernetting?

Subnetting is the division of one large network into several smaller subnets. This approach makes infrastructure management easier, reduces broadcast traffic, and improves security.

Supernetting, on the other hand, combines several neighboring networks into one larger route. This mechanism is used for route aggregation, reducing the size of routing tables, and increasing the efficiency of backbone and carrier networks.