Skip to main content
Definition Website Computer and Technology

Subnet Mask

Subject: Computer and Technology noun /ˈsʌb.nɛt mæsk/ 1 definition

  1. Definition (noun)

    Entry #168 · Updated

    A Subnet Mask is a 32-bit bitmask used in IPv4 networking to split an IP address into its network prefix and host identifier. Structured as a contiguous sequence of binary 1 bits (network bits) followed by contiguous 0 bits (host bits), it is usually written in dotted-decimal notation such as 255.255.255.0 or as a CIDR prefix length such as /24, and combined with an IP address via a bitwise AND operation to compute the network address. This boundary lets hosts and routers determine whether a destination belongs to the local subnetwork for direct delivery or must be forwarded through a default gateway to a remote network, enabling efficient address allocation and broadcast isolation.

    Common Types

    • Classful Default Masks: Fixed masks assigned by legacy IPv4 address classes—255.0.0.0 (/8) for Class A, 255.255.0.0 (/16) for Class B, and 255.255.255.0 (/24) for Class C—establishing baseline network boundaries without borrowing host bits.

    • Variable Length Subnet Masks (VLSM): Custom masks of differing bit lengths (such as 255.255.255.192 or /26 for 62 usable hosts, and /30 for point-to-point links) applied within the same address block to tailor subnet sizes and minimize wasted IP space.

    • Host Route Mask (/32): The all-ones mask (255.255.255.255) that identifies a single specific IPv4 address rather than a multi-host segment, commonly configured on loopback interfaces, firewall rules, and host-specific routing entries.

    • Default Route Mask (/0): The all-zeros mask (0.0.0.0) that matches every possible IPv4 address, used in routing tables to forward traffic to a default gateway when no more specific prefix applies.

    Example

    A workstation configured with IP address 192.168.10.45 and subnet mask 255.255.255.0 (/24) performs a bitwise AND to determine its local network prefix (192.168.10.0/24). When sending traffic to a printer at 192.168.10.120, the matching prefix tells the workstation to deliver packets directly on the local LAN, whereas traffic bound for 192.168.20.5 yields a different prefix and is forwarded to the default gateway.