A 32-bit bit mask which shows how an Internet address is to be divided into network, subnet and host parts. The netmask has ones in the bit positions in the 32-bit address which are to be used for the network and subnet parts, and zeros for the host part. The mask should contain at least the standard network portion (as determined by the address's class), and the subnet field should be contiguous with the network portion.

If a `+' (plus sign) is given for the netmask value, then the network number is looked up in the NIS netmasks.byaddr map (or in the /etc/netmasks) file if not running the NIS service.

Unix manual page: ifconfig(8).
This article is provided by FOLDOC - Free Online Dictionary of Computing (

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 #1Class C Default Mask (No Subnets)

 Example #2Class C Mask for Six Subnets255.255.255.224

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.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
(iii) targets is the list of targets (IP address and netmask) of the attack.
"route add -net netmask gw"
If the user has set the screening criteria, proceed to compile and install the screening program; pcap_compile(p, &fcode, filter.string, 0, netmask): pcap_setfilter(p, &fcode): Step 4.
Every route is added to the firewall by hand and the smallest netmask possible is used so traffic will not reach unintended devices if the firewall has no policy.
Administrators can check IP address on netmask, gateway/routers and domain servers, and access DHCP hosts to obtain network information.
Often referred to as a "netmask" or "subnet mask," this is what tells your computer which IP addresses correspond to machines on its own network.
Each IP interface in the terminal is characterized by its IP address and netmask and parameters associated with the routing of IP packets across the network.