3 How Packets Find a Next Hop — Part 2
More
Depth: Practitioner
Progress saves as you read. Mark sections complete as you go; your progress appears in the sidebar.
- Podcast audio coming soon
- Character narration audio coming soon
This is part 2 of 2. Begin with Part 1.
3.1 Practitioner: Build the Routing Evidence Record
A routing evidence record should name the traffic scope, route source, selected next hop, packet proof, and changed condition that would reopen the decision. Keep it small enough to maintain and specific enough to diagnose a changed link, parent, route, or gateway rule.
In this worked record, sensor S sends to gateway G at 2001:db8:42::33. Each send starts with a Hop Limit of 4. Each relay is one forwarding hop between S and G.
- At 0 s, marker
beforeuses the learned2001:db8:42::/64row via relay A onmesh0. The capture at G seesbeforewith a Hop Limit of 3. - After relay A is removed and the route table updates, at 10 s marker
afteruses the learned2001:db8:42::/64row via relay B onmesh0. The capture at G seesafterwith a Hop Limit of 3.
Retest if the relay, interface, or gateway route changes. For separate return-path evidence, send a marked response from G to S, record G’s selected route, and check for that response at S. The forward captures show delivery to G for these two sends. They leave delivery during route repair untested.
Use longest-prefix match as the first lookup rule. A prefix is the starting part of an address. In this example, /16 compares the first 16 bits, or the first two numbers (10.42), and /24 compares the first 24 bits, or the first three (10.42.18). Both routes match 10.42.18.33, so 10.42.18.0/24 wins over 10.42.0.0/16 because it matches more of the address. A default route such as 0.0.0.0/0 or ::/0 is useful for unknown destinations, but it is intentionally the least specific match.
Accept
The chosen route, next hop, return path, loop guard, and failure behavior match the traffic scope.
Constrain
Keep local prefixes local, route only cloud-bound traffic upstream, or limit a route to a named interface or gateway.
Retest
Reopen review when a prefix, default gateway, route metric, parent choice, border router, or sleep pattern changes.
Hold
Do not trust the design when next-hop choice, return path, loop behavior, or constrained-device fit is undocumented.
For a simple gateway, the record may be a short route table plus a packet trace to the local service and upstream service. For a mesh, the record also needs parent or neighbor state, because a packet may depend on intermediate constrained devices that sleep, move, or lose link quality.
3.2 Under the Hood: Forwarding, Loop Limits, and Why RPL Appears
A link-layer frame carries the IP packet across one link. At each hop, a router receives a link-layer frame, extracts the IP packet, decrements IPv4 TTL or IPv6 Hop Limit, applies a routing-table lookup, resolves the next-hop link-layer address when needed, and wraps the packet in a new frame for the next device on the outgoing link. The IP destination normally stays the same across the path even though the link-layer envelope changes at every hop.
The under-the-hood rule is practical: forwarding is local, loop prevention is mandatory, and route freshness matters. If the packet cannot be matched to a usable route, or if the loop limit reaches zero, the packet is dropped rather than forwarded blindly.
At this point, Under the Hood: Forwarding, Loop Limits, and Why RPL Appears needs a concrete reference model. Look at Figure 3.1, where a forwarding check should expose the loop guard, prefix match, next-hop resolution, default-route fallback, and no-route drop behavior; the pictured labels keep the later conclusion anchored to observable behavior.
Follow the diagram with destination 10.42.18.33. The /24 route from the earlier example wins over the /16 and default routes because it has the longest matching prefix. First check the loop limit. If it permits forwarding, resolve the selected next hop and send a new link-layer frame. A default route can be used if no more specific route matches. If no usable route exists, drop the packet: neighbor resolution cannot supply a missing route.
Lookup
The router uses destination prefix, preference, and metric rules to identify the outgoing interface and next hop.
Loop Limit
TTL or Hop Limit is reduced at each router so packets cannot circulate indefinitely.
Neighbor Resolution
Local delivery may need ARP for IPv4 Ethernet or Neighbor Discovery for IPv6 links before the next frame can be sent.
No Route
If no matching route and no default route exist, the router drops the packet and may report the destination as unreachable.
Constrained IoT meshes add another layer of difficulty. Devices may run on batteries, sleep to save energy, have small routing tables, and communicate over lossy wireless links. A stable enterprise routing design may assume more memory, bandwidth, and neighbor stability than those devices can offer.
RPL, the IPv6 Routing Protocol for Low-Power and Lossy Networks, addresses that environment by organizing nodes around a destination-oriented directed acyclic graph rooted near a border router. Nodes choose parents according to an objective function, the configured rule for comparing eligible parents against a routing goal and computing Rank, a node’s position relative to the root. For example, a rule that prefers more reliable links can choose a candidate with better measured delivery if that candidate also meets the graph and policy checks. Nodes maintain enough state to forward traffic without requiring every constrained node to know a full network map. See RPL Core Concepts.
The takeaway is not that every IoT network needs RPL. Star topologies, Ethernet gateways, and industrial networks may use other routing arrangements. The point is that low-power mesh routing needs evidence about parent choice, link quality, control-message budget, repair behavior, and return paths, not just a generic statement that routing exists.
3.3 IGP And BGP: The Gateway Boundary
A network under one administration is an autonomous system. Routing within it and routing between systems solve different problems. An interior gateway protocol (IGP) such as OSPF shares which destinations can be reached and their path costs within one system. BGP shares reachability between systems. It applies policy using attributes such as AS path and local preference. Neither term means “the Internet,” and small endpoints do not all need these protocols.
| Boundary | IGP inside an autonomous system | BGP between autonomous systems |
|---|---|---|
| Primary evidence | Topology, link cost, area or level, convergence | Prefix advertisements, path attributes, import/export policy |
| Typical decision | Which internal next hop reaches a destination at acceptable cost? | Which external route is acceptable under organizational policy? |
| Failure review | Adjacency loss, metric change, reconvergence, loop containment | Withdrawals, policy error, route leak, path selection, filtering |
| IoT endpoint role | Usually none; the endpoint uses a parent or default route | None; BGP belongs at a controlled network edge, not a sensor |
Trace a packet from a sensor through its RPL DODAG, the directed graph of routes toward a root. The RPL border router ends that constrained topology. It sends non-mesh traffic to a default or redistributed route. The site IGP carries the packet to the enterprise edge. There, a router may use BGP with a provider on the way to a cloud service. The return path needs valid reachability to the sensor and may cross different network boundaries. It needs a route to the IoT prefix, or a documented translation and proxy design.
Do not redistribute RPL, IGP, and BGP routes indiscriminately. Record which prefixes may cross each boundary, who owns filtering and aggregation, how a withdrawal propagates, and how the return path is tested. A working outbound ping does not prove that inbound replies, failover, or policy changes are safe.
3.4 Summary
Routing chooses where packets go next. Forwarding applies that choice to each packet. A router reads the destination address and uses longest-prefix match. It checks time to live (TTL) or Hop Limit, then sends toward a next hop, a directly connected destination, or a default route. If no usable route exists, it drops the packet.
For IoT, record the traffic scope, next hop, route source, return path, loop guard, and behavior after a failure. Low-power meshes have sleeping nodes, lossy links, and limited memory. Parents can change, and routes need repair. These limits help explain why this module covers RPL.
3.5 Key Takeaway
Check the next hop, fallback route, and loop limit for the traffic that matters. Show that the design fits small devices and say when to test it again.
Check the next hop, fallback route, and loop limit for the traffic that matters. Show that the design fits small devices and say when to test it again.




