Read the last host bit
02A slash prefix says how many leading address bits are fixed. IPv4 has 32 bits; a /31 leaves one host bit, which can be 0 or 1.
192.0.2.2 AND 255.255.255.254 is 192.0.2.2, so it belongs to the next pair, not the .0/.1 link.
Source for this drawing: RFC 3021 · Read RFC section 2.1 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
The all-zero and all-one host values are both hosts on this kind of link.
- With a 31-bit mask, the two possible addresses MUST be interpreted as host addresses on the point-to-point link (§2.1). The exception is about the host part, not every address ending in .0 or .1.
- The /31 mask is 255.255.255.254. In 192.0.2.0/31, the last octet is 00000000 or 00000001; only its final bit varies.
- Pairs are aligned on even values: .0/.1, then .2/.3. An arbitrary adjacent pair such as .1/.2 does not share one /31 prefix. Section 2 assumes classless routing; it says the host part SHOULD have at least one bit, not that this guide defines /32 link behavior.
Bitwise AND keeps the address bits selected by the mask and clears the other bits. Bit-strip widths represent 31 fixed bits and one variable bit proportionally. The final-octet example expands that last byte for readability. This is subnet-mask arithmetic, not an IPv4 header field layout or permission to use a shared LAN as point-to-point.
Read the RFC section ↗