Chapters

3 How Packets Find a Next Hop — Part 2

routing
networking
iot
Listen
Uses your device's voice. Tap ▶ beside any paragraph to hear just that one.
  • Podcast audio coming soon
  • Character narration audio coming soon
Lecture
Video lecture coming soon. The slides are the lecture for now.
Ask AI
Pick a prompt. We copy it for you and open an AI service; paste it there. Nothing is sent to IoTClass.

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 before uses the learned 2001:db8:42::/64 row via relay A on mesh0. The capture at G sees before with a Hop Limit of 3.
  • After relay A is removed and the route table updates, at 10 s marker after uses the learned 2001:db8:42::/64 row via relay B on mesh0. The capture at G sees after with 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.

Record field
Question
Evidence to keep
Failure it prevents
Traffic scope
Which source and destination matter?
Endpoint, prefix, application path, local-vs-uplink boundary, and expected return path.
Testing a happy path that is not the path the system actually depends on.
Route entry
Which table row wins?
Destination prefix, next hop, outgoing interface, metric or preference, and default-route fallback.
Assuming the visible route order is the selection rule.
Loop guard
What limits circulation?
TTL or Hop Limit behavior, unreachable response where relevant, and observed failure when the limit is exhausted.
Hidden loops that look like intermittent packet loss.
Failure behavior
What happens when the next hop changes?
Neighbor loss, gateway failover, mesh parent change, stale-route handling, and retest trigger.
Trusting a route that only works while one preferred neighbor is healthy.
Constrained fit
Can the protocol fit the devices?
Memory, sleep behavior, link quality, control-message budget, and convergence expectations.
Choosing a routing approach designed for better-powered and more stable networks.
Operations evidence
Can the team debug the path?
Route snapshot, neighbor or parent state, packet trace, diagnostic response, and change owner.
Being unable to distinguish route failure from application failure.

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.

Router forwarding decision process checking TTL or Hop Limit, longest-prefix match, next-hop resolution, default route fallback, and drop when no route is available.
Figure 3.1: A forwarding check should expose the loop guard, prefix match, next-hop resolution, default-route fallback, and no-route drop 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.

BoundaryIGP inside an autonomous systemBGP between autonomous systems
Primary evidenceTopology, link cost, area or level, convergencePrefix advertisements, path attributes, import/export policy
Typical decisionWhich internal next hop reaches a destination at acceptable cost?Which external route is acceptable under organizational policy?
Failure reviewAdjacency loss, metric change, reconvergence, loop containmentWithdrawals, policy error, route leak, path selection, filtering
IoT endpoint roleUsually none; the endpoint uses a parent or default routeNone; 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.

3.6 See Also

The outbound packet crosses the RPL mesh, site autonomous system and provider on its way to a cloud service. A routed reply crosses the boundary types in reverse and needs a usable route to the IoT prefix. Individual hops can differ. A translation design needs a verified address mapping. A proxy ends the cloud flow and starts a separate flow toward IoT.
Figure 3.2: An outbound packet crosses routing domains. Verify the path or the boundary function that will handle replies.

In Figure 3.2, start at the sensor and follow the solid path through its RPL parent toward the border router. At that boundary, find the non-mesh forwarding decision. Inside the site, compare the packet arrow with the IGP reachability evidence. Check the enterprise and provider edges for any BGP prefix exchange and policy, then trace onward to the cloud service. Follow the dashed lane back through the boundary types and verify a usable route to the IoT prefix. Individual routers and links can differ. If the deployment uses translation, check the address mapping at its actual boundary. If it uses a proxy, identify where the incoming flow ends and where the proxy starts a separate flow toward IoT. Finish by checking permitted prefixes, the owner for filtering and aggregation, withdrawal propagation, and a return-path test.

Hi, I’m Packet Pete. What do you need?

Find help

Let’s find what you need

Find a lesson or return to your module guide.

Give feedback

Help improve this chapter

Tell us what helped or what needs fixing.

Tips

Try a small next step

A few ways to get more from this chapter.

Ask AI

Continue the conversation

Take the conversation further with your preferred assistant.

AI help is available in supported modules when enabled in Settings.

No live person answers on independent study. Feedback does not promise a personal reply.

For welfare or safety concerns, follow your school’s procedures outside IoTClass.