Glossary Networking

Subnet mask

A subnet mask is a 32-bit value that marks which part of an IPv4 address identifies the network and which part identifies the host.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

The mask is a run of one-bits followed by zero-bits. A device applies a bitwise AND of the mask with an address to find the network. Writing the number of one-bits after a slash gives the shorter CIDR form, so 255.255.255.0 is /24.

Example

With the mask 255.255.255.0, the addresses 192.168.1.10 and 192.168.1.200 share the network 192.168.1.0. See How Subnetting Works for the full method.

Try these tools

See also

  • Glossary CIDR
    CIDR (Classless Inter-Domain Routing) is the notation that writes an IP network as an address plus a prefix length, such as 192.168.1.0/24.
  • Glossary IP address
    An IP address is the number that identifies a device on a network so that data can be sent to it.
  • Guide How Subnetting Works
    How an IP address splits into network and host parts, how to find a network and broadcast address.
  • Cheat sheet CIDR and Subnet Mask Cheat Sheet
    Every IPv4 prefix from /8 to /32 with its subnet mask, wildcard mask, address count and usable hosts.
AdSense Placeholder
Slot: footer_leaderboard