Home

Netmask

Netmask is a bitmask used in IP networking to delineate the network portion of an IP address from the host portion. In IPv4, a netmask is 32 bits long and is usually written in dotted decimal notation (for example, 255.255.255.0). In IPv6, the equivalent concept is a prefix length, written as a slash notation (for example, /64), since addresses are 128 bits long.

To determine the network address, the IP address is bitwise ANDed with the netmask. For example, with

There are standard masks used in practice, such as /8 (255.0.0.0), /16 (255.255.0.0), /24 (255.255.255.0), and /32

Netmasks are configured on devices to facilitate routing, subnetting, and address planning. They help determine whether

192.168.1.10
and
255.255.255.0,
the
network
address
is
192.168.1.0
and
the
host
portion
can
range
from
.1
to
.254,
while
the
broadcast
address
is
192.168.1.255
(in
networks
that
define
a
broadcast).
(255.255.255.255)
for
a
single
host.
Classful
addressing
historically
mapped
address
ranges
to
default
masks,
but
modern
networks
use
CIDR
and
variable-length
subnets.
Private
IPv4
ranges
commonly
cited
are
10.0.0.0/8,
172.16.0.0/12,
and
192.168.0.0/16.
a
destination
is
on
the
local
network
or
must
be
reached
via
a
gateway.
In
IPv6,
the
concept
persists
with
prefix
lengths
that
define
the
network
boundary,
typically
/64
for
standard
subnetting.