[Medium] Packet Loss During Rapid Topology Changes #21

Open
opened 2026-02-11 19:31:44 +00:00 by thabeta · 0 comments
Owner

Issue

The hello/IHU (I Heard You) sequence tracking logic is overly sensitive to out-of-order packets during rapid network topology changes, resulting in artificial packet loss metrics.

Location

mycelium/src/babel/hello.rs, mycelium/src/babel/ihu.rs

Problem Description

Babel uses sequence numbers to track link quality. If sequence numbers arrive out of order (due to multiple paths or network jitter), the current implementation treats the gap as loss rather than reordering. During rapid neighbor churn, this causes the link cost to spike artificially high, causing redundant routing recalculations (flapping).

Impact

  • Severity: MEDIUM (Performance/Stability)
  • Frequency: Common in dynamic wireless or mobile meshes
  • User Impact: Frequent routing route switching, lower throughput

Remediation

  1. Implement a reordering window (sliding window) for sequence number tracking
  2. Only count link loss if a sequence number is definitively missing after the window expires
  3. Smooth the metric calculation with a low-pass filter (Exponential Moving Average)

Testing

  • Simulate 5% packet reordering with netem/tc
  • Verify metric stability compared to a baseline node
## Issue The hello/IHU (I Heard You) sequence tracking logic is overly sensitive to out-of-order packets during rapid network topology changes, resulting in artificial packet loss metrics. ## Location `mycelium/src/babel/hello.rs`, `mycelium/src/babel/ihu.rs` ## Problem Description Babel uses sequence numbers to track link quality. If sequence numbers arrive out of order (due to multiple paths or network jitter), the current implementation treats the gap as loss rather than reordering. During rapid neighbor churn, this causes the link cost to spike artificially high, causing redundant routing recalculations (flapping). ## Impact - **Severity**: MEDIUM (Performance/Stability) - **Frequency**: Common in dynamic wireless or mobile meshes - **User Impact**: Frequent routing route switching, lower throughput ## Remediation 1. Implement a reordering window (sliding window) for sequence number tracking 2. Only count link loss if a sequence number is definitively missing after the window expires 3. Smooth the metric calculation with a low-pass filter (Exponential Moving Average) ## Testing - Simulate 5% packet reordering with netem/tc - Verify metric stability compared to a baseline node
Sign in to join this conversation.
No labels
Urgent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/mycelium_network#21
No description provided.