- Tech know how online

subnetmask (SNM)

Subnet masks are addressing masks with which IP addresses are transformed into the address spaces of subnets. The formation of subnets, or subnetting, is about providing self-sufficient networks with their own address space. For this purpose, one separates the IP address space and the address space for the subnets and divides the newly created subnet address space among the subnets.

This division of the IP address space has the advantage that each subnet can be addressed via the IP address. This procedure is used in Classless Interdomain Routing( CIDR), which in turn is used in the formation of IPv4 addresses and IPv6 addresses.

The division of the IP address space

IP addresses consist of the network identifier and host identifier addresses and are divided into address classes. Depending on the address class, the network identifier or the host identifier is larger. The subnet mask determines at which point the 32- digit IP address is divided for the subnets and thus assigns a more or less large address space for the workstations to the subnets. The assigned subnet address space can have a fixed or variable length. This is referred to as the Fixed Length Subnet Mask( FLSM) and the Variable Length Subnet Mask( VLSM). Like the IP address, the subnet address consists of a more or less extensive network part and a host part. These subnet addresses can be used to address the hosts and workstations within a subnet.

Subnets with subnet addresses

Subnets with subnet addresses

The subnet mask looks very similar to the IP address. Like the IP address, it consists of 32 bits, divided into 4 times 8 bits. The notation can be dual or decimal. In order to be able to use the IP address for the subnets, the net address part of the subnet mask is set to 1 in all bits. In the case of a class C address, the first 24 bits are thus set to 1 and are therefore not variable, and the following 8 bits for the stations are set to 0 and are therefore variable. The standard subnet mask in binary notation would look like this:

11111111.111111.111111.00000000, and decimal:

The variable address portion in this example includes 256 addressable station addresses. The first address 0000 0000 (network) and the last address 1111 1111 ( broadcast) are assigned. This leaves 254 station addresses. Standard subnet masks can be created in the same way for the other IP address classes.

Creating the subnet masks

Standard subnet masks in decimal notation

Standard subnet masks in decimal notation

Subnet masks can be created not only for the IP classes, but for all 24-bit combinations of host addresses. With the subnet masks you have the addressing masks for the creation of the subnet addresses. The example of the standard subnet mask for class C is used to illustrate this. The subnet mask for four subnets is to be divided. Since only the host portion of the standard subnet mask is variable, this is used for the subnet addressing. With four subnets, two bits must be used for addressing. That means, from the 0000 0000 the two bits with the highest valence are used, the host portion of the subnet mask looks thus as follows: 1100 0000.

Example for the IP address range for four subnets with a given subnet mask

Example for the IP address range for four subnets with a given subnet mask

The complete subnet mask looks as follows in decimal notation: 6 bits remain for the host addresses, with which 64 stations can be addressed in each case. The four subnets share the former address range of 254 host addresses by assigning 64 addresses to each subnet. In this example, with subnet mask, the first subnet would be assigned the host range of .0 and .63, the second that of .64 to .127, the third that of .128 to .191, and the fourth that between .192 and .255. In each case related to the host address, without taking into account the network addresses, since these remain unchanged.

Mathematically, the subnet addresses are determined via logical operations. The network part can be determined via an AND operation between the IP address and the subnet mask. The host part is determined by negating the subnet mask and subsequent AND operation.

Englisch: subnetmask - SNM
Updated at: 24.07.2018
#Words: 658
Links: addressing, intelligent peripheral (IP), address (A), address space (AS), IP address
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2023