← TCP/IP: fundamentals and diagnosis
01 / 6 · 40 MIN

Addresses, prefixes, and scope

Interpret subnets, bindings, and context before testing a service.

Concept and mechanism

An IP address and prefix length distinguish the network portion from the remaining bits. Do not compare octets only by appearance: for 192.0.2.130/26, the block starts at 128 and ends at 191. Two addresses sharing the first three octets can belong to different /25 networks. Operational decisions also depend on effective routes, including explicit on-link routes. Ports identify transport endpoints and do not change the mask. To correlate a connection, retain protocol, source, destination, and ports in the correct network context. A service bind address defines where that socket accepts traffic; listening only on loopback does not mean listening on remote interfaces.

Guided application

In a fictional case, a host retains /24 after the network was split into two /25 networks. It starts directly looking for a destination it should reach through the router. Compare the approved plan, address, prefix, and route before changing timeouts. In IPv6, a link-local address can recur on different links: zone or interface disambiguates the destination when needed. Do not turn a scoped address into a global one by omitting context. This course IPv4 examples use documentation-reserved blocks such as 192.0.2.0/24 and 198.51.100.0/24; they are not instructions to advertise those blocks in a real network. Validation should respect the design and authorization of the environment where you work.

IN PRACTICE

192.0.2.20/25 and 192.0.2.150/25 belong to different prefixes despite matching first three octets.

Common pitfalls

Comparing only octets; confusing port with prefix; forgetting binding and IPv6 zone.

Related topics: Routes and next-hop resolution · Transport, acknowledgement, and messages · States, queues, and flow control

Take this idea with you

Define address, prefix, port, and context before interpreting the test.

Create account

Reference: CIDR and longest-prefix routing: RFC4632 · DR TCP/IP 2026-09; TCP RFC 9293; IPv6 RFC 8200 with RFC 9673 update; Linux socket and iproute2 guidance