In the digital world, many processes run in the background – one of them is so-called subnetting. What initially sounds technical is, at its core, based on solid mathematical principles such as binary systems, set theory, and exponentiation.
In this article, we take a look behind the scenes of networks and discover how mathematics helps bring order to digital chaos.
A computer network consists of many devices (called hosts) that are connected to each other. Each of these devices has a unique address – the IP address. In the commonly used IPv4 format, this address consists of 32 bits and is represented in four blocks, e.g. E.g.:
CopyEdit
192.168.1.0
In reality, this is a binary number:
CopyEdit
11000000.10101000.00000001.00000000
A subnet is a logical part of a network. Instead of accommodating all devices in one large address range, this range is divided into smaller, manageable units. This division is based on the idea of partitioning a set: The total set of all IP addresses is divided into disjoint subsets – i.e., without overlap.
In this way, for example, a large network can be divided into departments, locations, or functional areas.
The subnet mask determines how many bits of an IP address are used for the network and how many for hosts (i.e., individual devices). Let's take the following combination:
IP address: 192.168.1.0
Subnet mask: 255.255.255.0
In binary format, this means:
CopyEdit
11111111.11111111.11111111.00000000
The first 24 bits (three of the four blocks) describe the network, while the remaining 8 bits are reserved for hosts. This results in:
28 = 256 possible IP addresses
28 = 256 possible IP addresses
Of these, 254 addresses are usually usable, since one is reserved for the network address and one for broadcast.
The core of subnetting is power calculation. Each address in a subnet is defined by a specific number of bits, where each bit can have two states: 0 or 1. This results in:
Number of possible addresses = 2n
where nnn is the number of variable bits (host bits).
Example:
A /26 network means: 26 bits are reserved for the network, 6 bits for hosts.
There are therefore:
26 = 64 possible addresses
Imagine you are given the address range 192.168.1.0/24
. You want to create four equally sized subnets from it.
A /24 network has 256 addresses.
Four equally sized subnets result in:
256÷4 = 64 addresses per subnet
/26
The resulting subnets would be:
192.168.1.0/26
(addresses 0–63)
192.168.1.64/26
(addresses 64–127)
192.168.1.128/26
(addresses 128–191)
192.168.1.192/26
(addresses 192–255)
Subnetting is more than just address allocation – it's efficient network design. Logical subdivision allows networks to be:
better organized (e.g., by department)
more secure (control access)
more scalable (optimal use of address spaces)
Here we answer questions about server monitoring from Livewatch. If you have a question that we have not yet answered here, please contact us.
Calculating a subnet can seem complex at first, but with a clear step-by-step explanation, it becomes understandable. Here I'll explain how to easily calculate a subnet.
To calculate a subnet, you need:
An IP address (e.g. 192.168.1.0
)
A subnet mask (e.g. 255.255.255.0
)
The subnet mask splits the IP address into two parts: the network part and the host part.
A subnet mask like 255.255.255.0
is represented in binary form (i.e., just ones and zeros) like this:
255
= 11111111
(8 ones)255
= 11111111
(8 ones)255
= 11111111
(8 ones)0
= 00000000
(8 zeros)So if you look at the subnet mask as a binary number, you have:
CopyEdit
1111111.11111111.11111111.00000000
The ones indicate the network part and the zeros indicate the host part.
The number of subnets depends on the free bits (i.e. the zeros in the subnet mask).
Suppose you have the subnet mask 255.255.255.0
(i.e. 24 ones and 8 zeros). If you want to divide this subnet mask into smaller subnets, you can calculate 2^n.
Assuming you use 2 extra bits (so n = 2), you get:
CopyEdit
2^2 = 4 subnets
This means you can create 4 subnets using the original subnet mask and 2 extra bits.
IP address: 192.168.1.0
Subnet mask: 255.255.255.0
(or /24
in CIDR notation)
255.255.255.0
becomes 11111111.11111111.11111111.00000000
.If you use 2 extra bits (e.g. a subnet mask of 255.255.255.192
or /26
), you have 2 free bits:
2^2 = 4 subnets.
The new subnet mask 255.255.255.192
has 2 bits for the subnets. This means you split the host range (the last 6 bits) into 4 subnets.
Each subnet has a size of 64
IP addresses (so 2^6 = 64
).
The subnets would then be:
192.168.1.0
to 192.168.1.63
192.168.1.64
to 192.168.1.127
192.168.1.128
to 192.168.1.191
192.168.1.192
to 192.168.1.255
Each of these subnets can now accommodate its own devices, with the first and last IP addresses reserved for the network and broadcast.
Subnet calculation can be done quickly and easily with a little practice. It requires that you familiarize yourself with the binary representation of IP addresses and subnet masks, but with the right method and the steps described above, you can easily calculate subnets. If you need further help with network configurations, you can find useful tools and solutions on Livewatch.de to help you manage your network optimally.
A subnetwork is a subset of a larger IP network that serves to divide the IP address space into logically isolated sections. Dividing a network into subnets provides several benefits, including more efficient address usage, better security, and improved network organization.
Here are the basic components of a subnet and how it works:
IP Addresses: A subnet consists of a range of IP addresses. These addresses are selected from the network's entire IP address space. For example, a network might have the IP address range 192.168.1.0 to 192.168.1.255.
Subnet mask: The subnet mask is a sequence of numbers that indicates which parts of the IP address represent the network portion and the host portion. For example, the subnet mask could be 255.255.255.0, meaning that the first three octets (192.168.1) represent the network portion and the last octet is reserved for the individual devices on the network.
Logical Isolation: A subnet allows the IP address space to be logically isolated. Devices within the same subnet can communicate directly with each other as if they were on the same physical network. Devices on different subnets typically need to use a router to communicate with each other.
Efficient Address Usage: Using subnets allows the available IP address space to be used more efficiently. Instead of using all IP addresses in one large range, smaller ranges can be reserved for specific parts of the network.
Security: Subnets allow security policies to be applied at the subnet level. Traffic between subnets can be controlled through firewalls and other security mechanisms, improving the security of the network.
For example, a company might have one subnet for office equipment, another subnet for servers, and a third subnet for guest WiFi. This division helps organize network traffic, increase security, and optimize resource utilization.
A subnet is a way of dividing a larger network into smaller, logically isolated subnets. This is to manage network resources more efficiently, increase security and organize data traffic within the network.
A subnet consists of a group of IP addresses that are logically separated from each other. Within a subnet, devices can communicate with each other as if they were on the same physical network. Dividing a larger network into subnets has several advantages:
Efficient address usage: By assigning subnets, IP addresses can be used more efficiently. Each subnet can have its own address range, which optimizes the allocation of IP addresses.
Security: Subnets allow implementation of security policies at the subnet level. Traffic between subnets can be controlled through firewalls and other security measures.
Network Traffic Organization: Subnets allow for better organization of network traffic. Limiting traffic to specific subnets can improve network performance.
Scalability: Subnets facilitate network scalability. As a network grows, new subnets can be added without reconfiguring the entire network.
The IP addresses in a subnet usually share a common network prefix (subnet mask) that defines the range of IP addresses for that subnet. For example, a subnet could have the IP addresses in the range 192.168.1.1 to 192.168.1.255, and the subnet mask could be 255.255.255.0, meaning the first three octets (192.168.1) represent the network portion and the last octet the host share.
The subnet mask is used to divide an IP network into smaller subnets. It consists of a series of 32 bits divided into four octets of 8 bits each. The subnet mask is usually represented in decimal form, with each octet separated by a period (for example, 255.255.255.0).
Here are the steps to calculate a subnet mask:
Decide how many subnets you need:
Consider how many networks or subnets you want to create from your overall network. The number of subnets determines the number of bits required for network division. Determine the number of bits for network sharing:
Count the number of bits needed to represent the number of subnets. These bits are later added to the subnet mask. Calculate the subnet mask in binary form:
Set the required bits in the subnet mask to 1 and pad the remaining bits with 0. Note that the subnet mask always starts with the left bits. For example, if you need 3 bits for network sharing, the binary form of the subnet mask is: 11100000 (for the first octet). Convert binary form to decimal form:
Convert each octet of binary form to the corresponding decimal number to represent the subnet mask in common decimal form. Here is an example: Suppose you want to divide a network into 8 subnets. You need 3 bits for network sharing.
Number of bits for network sharing: 3 bits Binary form of subnet mask: 11100000 (for the first octet) Decimal form of subnet mask: 224 (for the first octet) The full subnet mask for this example would then be 224.0.0.0.
It is important to note that the subnet mask always begins with a series of 1 bits followed by a series of 0 bits. The network and broadcast address bits are always set to 0 and 1, respectively.