Reference
Subnet masks
A subnet mask identifies network bits and usually corresponds to a contiguous prefix length.
Meaning and purpose
A subnet mask identifies network bits and usually corresponds to a contiguous prefix length.
How it works in context
For 192.0.2.0/24, the first 24 bits identify the network and the remaining eight bits vary. Conventional multi-access subnets reserve network and broadcast addresses, but /31 point-to-point links and /32 host routes follow different rules. Routers choose the most specific matching destination prefix, subject to available forwarding entries.
Operational checks and security
Check the address, prefix length, gateway and actual route together. A gateway normally must be reachable on the local link unless special routing is configured. Do not apply the familiar “minus two addresses” formula indiscriminately to every prefix length.
Read-only example
These commands inspect the surrounding system or protocol. They do not automatically change its configuration or establish every property of this term. Replace example targets only with destinations you are authorized to inspect.
ip -4 address show
ip -4 route get 192.0.2.10
Sources and further reading
These explanations are educational. Implementations, policies and standards evolve; check the current specification and software version before changing a system.