Systems and protocols · Intermediate

IPv4: addressing, routing and TTL

Trace a packet using prefixes, longest-prefix matching and a bounded hop lifetime.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Addresses and prefixes
  2. Choose the most specific route
  3. TTL and fragmentation
  4. The delivery boundary
  5. Ask Logeia about this articleCheck your understanding

Addresses and prefixes

An IPv4 address is 32 bits long. In 192.0.2.10/24, the first 24 bits describe the network prefix. Prefixes help determine whether an endpoint is directly reachable on a link or whether traffic should be forwarded toward a router.

An address alone is not a physical location or a user identity. Interface assignment, routing and address translation affect what an observer sees. Addressing identifies a destination in a network context; the routing table separately supplies a direction in which to send traffic.

Choose the most specific route

Suppose a table has both a default route and a 192.0.2.0/24 route. A packet addressed to 192.0.2.50 matches both, but the more specific /24 route normally wins under longest-prefix matching. This is not selection by insertion order or by the textual length of the route description.

A router generally chooses a next hop rather than placing a complete list of future routers inside the packet. End-to-end forwarding emerges from these local decisions. A route that looks sensible at one host does not prove that every later hop has a usable return path.

TTL and fragmentation

Routers decrement TTL during forwarding, preventing packets from circulating indefinitely in a routing loop. Despite its name, its common operational role is a hop bound. Expiry notifications can help infer a path, although filtering means an absent response is not conclusive evidence of a broken router.

IPv4 packets can be fragmented under appropriate conditions. Losing a required fragment prevents reassembly of the original datagram. Message sizing and path MTU therefore matter even when a packet fits the sender’s local interface. Fragmentation is not a substitute for application-aware sizing.

The delivery boundary

IPv4 provides best-effort packet delivery, not a promise that each packet arrives once and in order. Applications requiring stronger semantics rely on an upper layer such as TCP. Successful ICMP echo also does not establish that a TCP port or HTTPS application is working.

Investigate local address configuration, route selection, next-hop reachability and the return path separately. Where ICMP is filtered, test the actual service protocol as well. Avoid interpreting one successful or failed probe as a complete description of all traffic to the destination.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 9

Choose a learning path