Netmask: Where Does the Local Network End?
Before sending data, a computer needs to know whether the destination belongs to its local network or needs to be reached through a router. An IP address alone doesn't answer that question. The netmask tells the computer where the network part of the address ends.
A netmask, also called a subnet mask, marks which beginning part of an address is shared by a network. That shared part is called its prefix; the remaining part distinguishes addresses inside the block. This explanation uses IPv4, the version of Internet Protocol whose addresses appear as four numbers separated by dots.
A computer uses this boundary to work out which addresses belong to its local subnet, a division of a network.
- Give every phone, laptop and TV a steadier connection with Wi-Fi 6.
- Stop the buffering at busy hours, with room for many devices at once.
- Replace an aging router and get stronger coverage across more of your home.
Start with one computer's address
Suppose a computer has the address 192.168.10.37 and the mask 255.255.255.0.
With this mask, the first three numbers—192.168.10—form the shared network part. The last number varies within the block. The block runs from 192.168.10.0 through 192.168.10.255 and is identified as 192.168.10.0.
If the computer wants to reach 192.168.10.200, both addresses fall inside that block. In this simplified setup, it treats the destination as local.
A destination outside the local subnet needs a route through a router. The default gateway is the next stop used when there isn't a more specific route. The gateway helps traffic leave the local network; the mask helps establish which destinations are outside it.
Subnetting Starts Making Sense Right Here
Microsoft's addressing and subnetting guide explains this local-versus-remote decision.
Why the same mask can be written /24
The dotted address is a human-readable form of 32 bits, each a zero or one. Each dotted number represents eight bits.
The mask 255.255.255.0 sets the first 24 bits aside for the network prefix. The remaining eight bits provide the possible addresses within it. That is why the same boundary can be written /24, as in 192.168.10.37/24.
This slash notation comes from Classless Inter-domain Routing, or CIDR. The CIDR specification describes address blocks by the number of leading bits they share.
Eight remaining bits have 256 possible combinations, so a /24 contains 256 total addresses. The mask's job is to draw the boundary in those bits. That boundary doesn't have to fall at a dot.
- Get five gigabit ports and a fast ARM processor for the price of a basic home router.
- Practice real routing at your desk on gear that network pros also deploy.
- Tuck it beside your modem: it takes up almost no room.
One extra bit splits the block
Change the example's prefix from /24 to /25, and one more bit becomes part of the network prefix. That leaves seven bits for addresses within each block: 128 possibilities instead of 256.
The dotted mask is now 255.255.255.128. The former block divides into two:
192.168.10.0/25covers addresses ending in.0through.127.192.168.10.128/25covers addresses ending in.128through.255.
The computer at .37 belongs to the first block. The destination at .200 belongs to the second. Although their first three dotted numbers match, these addresses are now on opposite sides of the subnet boundary.
This is why a larger slash number describes a smaller block. More bits are fixed as the prefix, leaving fewer possible combinations for the addresses inside it.
Why the Internet Is Running Out of Addresses
An address count isn't always a device count
On a conventional /24 subnet, the first address identifies the network and the last is the broadcast address, used to reach hosts on that subnet. That leaves 254 ordinary host addresses out of the 256 total.
The familiar “subtract two” rule has exceptions. On a point-to-point link using /31, both addresses can identify its two endpoints. A /32 identifies one address. The prefix gives the block size; how the addresses can be used also depends on the arrangement.
When only some connections fail
Suppose the network is designed around /25, but the computer at .37 incorrectly uses /24. It will treat .200 as local and try the wrong delivery path. Meanwhile, connections to addresses that really are local may keep working.
This is why an incorrect mask can cause selective failures rather than a complete loss of connectivity. The address, mask and gateway need to match the network's intended design; enlarging the block isn't an internet-speed setting.
The mask also doesn't decide who is allowed to communicate. Keeping one department out of another's systems requires access rules as well as an addressing plan.
Subnet: Where an Address Group Ends and Routing Begins

IP Forwarding: How a Packet Finds Its Next Stop

Private Addressing: Why Separate Networks Can Reuse IP Numbers

QUOTE:
"Amateurs hack systems, professionals hack people."

