Term of the Moment

Dart


Look Up Another Term


Redirected from: netmask

Definition: subnet mask


(SUBNETwork mask) The technique used by the TCP/IP communications protocol that identifies which network segment a packet belongs to. The subnet mask is a binary pattern, and the default mask found in countless small local networks indicates that all the machines are in the same network (see below). See subnet, IP address and TCP/IP.

A Tradeoff Between Hosts and Subnets
The bits in the mask identify both hosts and subnets. The more hosts, the fewer subnets; the more subnets, the fewer hosts can be individually addressed. These bits become a tradeoff based on the network class (A, B or C).

Class C Subnet Mask Examples
Subnet masks for a Class C network (small network) use the first 24 bits for subnet ID and the last 8 for host ID. These last 8 are divided between hosts and subnets (for more on network classes, see subnet mask tables).

In Example #1 below, the 255.255.255 are the numeric values of three sets of eight 1 bits. The 0 means eight 0 bits. There are "no" subnets, and up to 254 hosts can be addressed in this network (255 minus 1).

 Example #1
 Class C Default Mask (No Subnets)

 255.255.255.0
 11111111.11111111.11111111.00000000


 Example #2
 Class C Mask for Six Subnets

 255.255.255.224
 11111111.11111111.11111111.11100000
                            ssshhhhh

In Example #2 above, the 224 reserves the three high-order bits of that byte for subnets (sss), leaving the remaining five bits for hosts (hhhhh). The 224 creates six subnets from 001 to 110 (000 and 111 are reserved), and each subnet can have 30 hosts from 00001 to 11110. Likewise, 00000 and 11111 are reserved: 00000 means "this" node, and 11111 means "all" nodes (see broadcast address). This is why calculations for maximum hosts and subnets are always minus 2.