Skip to content
uencoder

Subnet

A subnet is a technique for dividing a large network into smaller ones, using the subnet mask to separate the network number from the host number, improving address utilization and isolation.

Purpose

It partitions the address space into logical subnets, keeping broadcast domains and routing tables manageable.

Mechanism

The subnet mask's leading run of 1s marks the network bits. For example, 255.255.255.0 means the first 24 bits are the network number and the last 8 the host part (256 addresses, 254 usable). In CIDR notation this is 192.168.1.0/24. Subnetting balances host count against subnet count.

Use cases

  • VLANs and network isolation
  • IP address planning
  • Firewall segmentation
  • Cloud VPC subnets

Examples

  • Input
    192.168.1.0/24
    Output
    256 addresses, 254 usable

    Network and broadcast addresses are reserved

Common errors

A non-contiguous subnet mask (e.g., 255.255.0.255)
Masks must be a contiguous leading run of 1s

Related terms

Related tools

References