
What is Subnet mask? And its Usage with examples in general & on cloud implications.
A subnet mask is a 32-bit number that divides an IPv4 address into network and host portions. Devices use it via bitwise AND operations to identify local traffic versus packets needing a router. Definition It consists of contiguous 1s (network bits) followed by 0s (host bits) in binary, often written in dotted decimal like 255.255.255.0 (/24 in CIDR notation). This enables subnetting to split large networks into smaller, efficient segments. Common Examples Class A: 255.0.0.0 (/8) – Supports ~16 million hosts per network. Class B: 255.255.0.0 (/16) – Supports ~65,000 hosts. Class C: 255.255.255.0 (/24) – Supports 254 hosts (limits broadcast traffic). How It Works For IP 192.168.1.10 with mask 255.255.255.0, the network ID is 192.168.1.0; hosts range from .1 to .254. Routers compare masks to forward traffic correctly, reducing congestion and enhancing security. Notation Dotted Decimal Binary (key part) Usable Hosts /24 255.255.255.0 11111111.00000000 254 /25 255.255.255.128 11111111.1000
Continue reading on Dev.to
Opens in a new tab


