Glossary

What Is a Subnet Mask?

a Subnet Mask — a 32-bit value that divides an IP address into its network and host portions — it tells devices which part identifies the network and which part identifies the specific device.

How it works

Written like 255.255.255.0 or as a slash (/24), the mask's binary 1s mark the network portion and 0s mark the host portion. A device uses its own IP and mask to determine if a destination is on the same local network (send directly) or a different one (send to the gateway).

Why it matters

The subnet mask is inseparable from subnetting — get comfortable converting between dotted-decimal (255.255.255.192) and CIDR (/26) notation, since both appear constantly in configuration and exams. Practise with the subnet calculator.

Frequently asked questions

What does a subnet mask do?

It defines which portion of an IP address is the network and which is the host, letting devices determine if a destination is local or remote.

What is the subnet mask for a /24?

255.255.255.0 — the first three octets are the network portion, the last octet is for hosts.

How does a device use the subnet mask?

It compares its own network portion (IP AND mask) to the destination's — if they match, the destination is local; if not, traffic goes to the default gateway.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.