Subnetting — Mask & Range Trainer

drag the line — steal a host bit for the network, or give one back
/26255.255.255.192
octet 1
1
1
1
1
1
1
1
1
128
64
32
16
8
4
2
1
octet 2
1
1
1
1
1
1
1
1
128
64
32
16
8
4
2
1
octet 3
1
1
1
1
1
1
1
1
128
64
32
16
8
4
2
1
octet 4
1
1
0
0
0
0
0
0
128
64
32
16
8
4
2
1
network bits
26
the mask — left of the line
host bits
6
32 − prefix — right of the line
subnets
4
2^2 (borrowed past /24)
usable hosts
62
2^6 − 2
The see-saw

The 32 bits are split into exactly two piles by the line — every bit is either network or host, never both. Move the line one step right: the network pile gains a bit (subnets double), the host pile loses one (each subnet halves). That's why subnets × size stays constant — you're re-partitioning a fixed pool, not creating address space.

The −2 on usable hosts is charged per subnet: the all-host-bits-0 pattern is the network ID (the subnet's name), all-host-bits-1 is the broadcast. Neither is assignable to a machine.

Security lens

The line is a trust boundary. Two hosts in the same subnet talk L2-direct — no router, no ACL, no firewall between them. Same subnet = same broadcast domain = same blast radius for ARP spoofing, sniffing, lateral movement. Subnetting isn't addressing hygiene, it's segmentation: carving a /24 into /27s forces cross-group traffic through a router where policy can live. A flat /16 hands an attacker the whole L2 neighborhood.