Sobes.tech
Junior

Mis on alamside mask?

sobes.tech AI

Vastus AI-lt

The subnet mask is a 32-bit number (for IPv4) or a 128-bit number (for IPv6) that determines which part of the IP address belongs to the network address and which part belongs to the host within that network. It is used to divide the IP address into network and host parts.

The bits of the mask set to '1' correspond to the network part of the address, and the bits set to '0' correspond to the host part. Applying the logical AND operation between the IP address and the subnet mask yields the network address.

Example (IPv4):

  • IP address: 192.168.1.10 (in binary: 11000000.10101000.00000001.00001010)
  • Subnet mask: 255.255.255.0 (in binary: 11111111.11111111.11111111.00000000)

Applying the AND operation:

11000000.10101000.00000001.00001010 (IP address)
AND
11111111.11111111.11111111.00000000 (subnet mask)
------------------------------------
11000000.10101000.00000001.00000000 (network address: 192.168.1.0)

The subnet mask can be represented in decimal dotted format (e.g., 255.255.255.0) or in CIDR format (e.g., /24, where 24 is the number of ones in the mask).