Skip to content

DSDV: implement IPv4 host routing with settling and recovery - #1444

Open
mgonzalezlopezudc wants to merge 12 commits into
inet-framework:masterfrom
mgonzalezlopezudc:pr/dsdv-routing
Open

mgonzalezlopezudc wants to merge 12 commits into
inet-framework:masterfrom
mgonzalezlopezudc:pr/dsdv-routing

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The existing Hello-based DSDV model lacks full-table updates and adaptive route settling. This PR implements an IPv4 host-routing profile based on Perkins and Bhagwat (1994), with full/incremental updates, route expiry, and recovery after interface loss or restart.

Forwarding changes take effect immediately. A separate advertised view lets ordinary changes settle, with a configurable 10 ms minimum for new deferred deadlines:

flowchart LR
    A[Accepted route change] --> B[Update IPv4 forwarding]
    A --> C{Urgent?}
    C -->|Yes| D[Advertise eligible routes over UDP]
    C -->|No| E[Keep the deadline or start a bounded wait]
    E --> D
    F[Periodic full dump] --> D
Loading

The profile supports one ad hoc IPv4 interface. Configuration, UDP attachment and the wire format change. The obsolete Hello message and serializer are removed, together with their serializer-test references. See the migration guide.

The self-contained checks and topology guide explains all eight correctness fixtures. The protocol-test guide indexes the forwarding and mobile reviewer guides, with diagrams, assertions and limits.

Earlier validation (through 238b176049): debug and release builds passed, along with all 8 DSDV correctness tests and all 13 registered nonvisual fingerprint comparisons. The cleanup source passed fresh debug and release builds and the debug serializer-test support build. The folded migration-guide update changes documentation only. Correctness and fingerprint tests were not rerun for the cleanup.

The prerequisite series now ends at ab395478ab and is shared by feat/dsdv-routing, this PR’s pr/dsdv-routing branch, and the base of #1455. The corrected series includes reviewer guides with their responsible behavior commits, clearer commit explanations, documentation corrections, and a forwarding-observer display icon. Production source, feature descriptors and fingerprint baselines are identical to the former dc594f8b2e tip. The branch alignment reuses existing commits and adds no source changes or new runtime validation.

Commit-by-commit review guide
Commit Contribution
adf3200c1e Adds independent route state and wire encoding, with selection, graph and serialization checks.
68e8cf2dba Connects the controller through UDP and installs IPv4 host routes. Forwarding checks a four-node path and a routing-disabled control.
0e2fd14fe1 Adds expiry, interface and restart coverage.
5366d99931 Checks dissemination deadlines, payload submission and paper-table examples.
e0b555b029 Adds the mobile example. Mobile checks delivery before a partition, loss during it, and delivery after rejoining.
9e09556f65 Archives the completed implementation plan.
79b245e590 Updates the MANET documentation and control-packet visualization.
8e7a09d983 Refreshes MANET routes more often for the moving topology.
d56b3a6d00 Exposes routing state to inspectors.
238b176049 Adds the settling minimum, preserving urgent updates and existing deadlines.
d0beed9276 Removes the obsolete Hello message, serializer and serializer-test references, and updates the migration guide for custom code and tooling. The current controller uses DsdvHeader.
ab395478ab Documents the eight test fixtures and their topologies, and indexes the reviewer guides delivered with the forwarding and mobile commits. Documentation only.

The forwarding fixture requires the new UDP attachment, so an unchanged-fixture runtime comparison with the old controller was not established. Mobile adds a new example absent from its parent. Neither test is presented as a measured parent failure.

Validation and baseline details

The series is rebased onto master 91219b0fa7. Plain master and the foundation pass all 12 existing nonvisual comparisons. Every subsequent commit passes its applicable nonvisual comparisons, including Mobile after its introduction. The four visual comparisons complete but mismatch their references; the results table explains the display and timing changes.

The final debug run has 4 unit, 2 module and 2 protocol passes. Fingerprints use run/seed 0 and separate tplx, ~tNl, and ~tND runs. Each baseline and its explanation stays with its causal commit. Visual expectations are unchanged.

Fingerprint results and visual failure causes. Scoped DSDV architecture, series and seal checks pass. Global architecture, naming and interface gates retain existing findings outside DSDV.

Historical evidence: The source and tests in cleanup commit 021e13a453 are unchanged from 4daa9320d5, where make -j8 MODE=debug, make -j8 MODE=release, and make -C tests/serializer/lib -j2 MODE=debug all exited 0. The amendment updates only the migration guide; the series, description and whitespace checks were rerun after folding it. The scoped DSDV architecture check, commit classification, series gates, source-seal check, description check and whitespace check pass. The global architecture, naming and interface checks still report findings outside the cleanup. Active source, serializer-test code and the regenerated INET build file contain no DsdvHello references. This validation establishes compilation and removal of dependencies; no new runtime correctness or fingerprint result is claimed.

Documentation commit ab395478ab changes no implementation or executable test inputs. Relative links, whitespace, diagram fences, series checks and documentation seals were checked. It adds no new simulation or fingerprint result.

@mgonzalezlopezudc
mgonzalezlopezudc marked this pull request as ready for review November 9, 2026 18:32
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the pr/dsdv-routing branch 2 times, most recently from 4daa932 to 021e13a Compare November 14, 2026 10:51
Establish Perkins/Bhagwat route selection and a finite-run UDP wire profile before attaching a routing module. Keep forwarding, advertised state and full-dump comparisons under one owner, with independent byte and graph oracles.

This foundation introduces a single route tuple contract with the table operations and byte encoding used by the later UDP controller. Keeping tuple declarations, invariant checks and encoding oracles together makes that contract reviewable before production attachment; no module changes forwarding behavior in this step.

Plan: plan/pending/dsdv-from-scratch.md

Change: src.routing.dsdv | behavior.add | test whatsnew | dsdv-from-scratch
Attach the independent state owner through the UDP dispatcher and publish owned IPv4 host routes immediately. Preserve sequence floors across suspension and construct every advertisement synchronously from eligible state. Migrate node and showcase attachment to the socket contract.

The controlled four-node line verifies owned next hops, both intermediate ingress paths and echo replies; its otherwise identical disabled line has no remote route and receives no replies. The pair and disconnected fixtures bound basic convergence claims.

The module/socket contract, its NED attachment and every node caller must switch from Hello to UDP together; retaining either half would leave production nodes wired to the removed controller contract. DsdvForwarding.md beside its protocol fixture explains the controlled topology, assertions and limits in this same commit.

Plan: plan/pending/dsdv-from-scratch.md

Allow simultaneous startup transmissions in the legacy example so immediate startup dumps undergo the radio collision model rather than aborting on the diagnostic check.

Nonvisual fingerprint updates on the upstream base, debug mode, run/seed 0. Visual expectations are unchanged:
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, tplx: b5fe-a1b2 -> 028c-95ee. The UDP controller replaces Hello forwarding with full/incremental dissemination and expiry, changing event times and packet trajectories.
- examples/manetrouting/dsdv, omnetpp.ini, IPv4, run 0, 10s, tplx: 2d1b-0515 -> fe44-d006. The UDP controller replaces Hello forwarding with full/incremental dissemination and expiry, changing event times and packet trajectories.
- examples/manetrouting/dsdv, omnetpp.ini, MultiIPv4, run 0, 10s, tplx: a35f-3c51 -> 9d2b-c13d. The UDP controller replaces Hello forwarding with full/incremental dissemination and expiry, changing event times and packet trajectories.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, tplx: 84f0-9aea -> c75a-49fb. The UDP controller replaces Hello forwarding with full/incremental dissemination and expiry, changing event times and packet trajectories.
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, ~tNl: 3e2c-1eee -> 4551-50ce. UDP/IP route-entry advertisements replace Hello messages, changing the selected inter-node timing and length stream.
- examples/manetrouting/dsdv, omnetpp.ini, IPv4, run 0, 10s, ~tNl: 1ba1-8398 -> 052c-d3e9. UDP/IP route-entry advertisements replace Hello messages, changing the selected inter-node timing and length stream.
- examples/manetrouting/dsdv, omnetpp.ini, MultiIPv4, run 0, 10s, ~tNl: 9f80-f16d -> be75-f184. UDP/IP route-entry advertisements replace Hello messages, changing the selected inter-node timing and length stream.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tNl: bdad-9a28 -> 00fb-77c9. UDP/IP route-entry advertisements replace Hello messages, changing the selected inter-node timing and length stream.
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, ~tND: 0af5-5bc7 -> 42a9-af97. The versioned UDP header and route entries replace Hello wire fields, changing selected packet bytes and timestamps.
- examples/manetrouting/dsdv, omnetpp.ini, IPv4, run 0, 10s, ~tND: bed0-9954 -> 6975-ddb0. The versioned UDP header and route entries replace Hello wire fields, changing selected packet bytes and timestamps.
- examples/manetrouting/dsdv, omnetpp.ini, MultiIPv4, run 0, 10s, ~tND: 92cb-62b4 -> a9c7-4579. The versioned UDP header and route entries replace Hello wire fields, changing selected packet bytes and timestamps.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tND: fefe-9ffb -> bda7-8bee. The versioned UDP header and route entries replace Hello wire fields, changing selected packet bytes and timestamps.

Measured parent values distinguish inherited baseline drift from the controller transition. Packet fingerprints also include time; their movement alone does not prove a length or byte change.

Change: src.routing.dsdv | behavior.change | test whatsnew migration fingerprint | dsdv-from-scratch
Exercise timestamp ties, independent destination freshness, interface recovery and real node lifecycle operations through the production routing module. Check retained floors, withdrawal repetition, timer cancellation and foreign-route ownership without using the legacy model as an oracle.

Plan: plan/pending/dsdv-from-scratch.md

Change: tests.module | behavior.add | - | dsdv-from-scratch
Use controlled production callbacks and real kernel timers to distinguish forwarding state from full-dump advertisements. Verify immediate corrections, non-sliding deadlines, atomic rejection and bounded synchronous overflow submission. Reconstruct the original paper tables as an independent algorithm oracle.

Plan: plan/pending/dsdv-from-scratch.md

Change: tests | behavior.add | - | dsdv-from-scratch
Supply a deterministic mobile line with static addresses, local ARP and no bypass routes, plus a production-path delivery-window check. Record the new example fingerprint only after independent forwarding, graph, lifecycle, timer and encoding checks pass.

The full and isolated-feature campaigns bound the documented IPv4 profile. Preserve existing trajectory baselines and report unrelated global gate findings and missing tools explicitly.

The beside-test reviewer document tests/protocol/dsdv/DsdvMobile.md describes the moving-relay input, delivery-window assertions and their limits in this same behavior commit.

Plan: plan/pending/dsdv-from-scratch.md

Nonvisual fingerprint updates on the upstream base, debug mode, run/seed 0. Visual expectations are unchanged:
- examples/dsdv, omnetpp.ini, Mobile, run 0, 32s, tplx: new -> 2bf5-fcd0. The new Mobile example records the event trajectory through partition and rejoin; its protocol test checks delivery before, during and after that partition.

Change: examples.dsdv | behavior.add | - | dsdv-from-scratch
Change: plan | location | - | dsdv-from-scratch
Select DSDV control packets in the green visualizer and replace obsolete hello-only documentation and parameter includes. Identify the existing videos as historical recordings.

Keep the nonvisual expectations with the UDP-controller migration that causes their changes. The visualization filter does not change these fingerprints. Preserve the visual expectation and record its separate validation limits explicitly.

Change: examples.routing.manet | behavior.change.fix | -
The moving relays in the MANET showcase can outpace route updates with the existing 1s dump interval and default 500ms jitter. Use a 250ms interval with at most 50ms jitter to disseminate fresh routes more frequently.

Nonvisual fingerprint updates on the upstream base, debug mode, run/seed 0. Visual expectations are unchanged:
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, tplx: c75a-49fb -> 3f89-3651. The MANET full-dump interval changes from 1s to 250ms and jitter from 500ms to 50ms, changing advertisement times and sequence progression.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tNl: 00fb-77c9 -> 519f-5d99. The MANET full-dump interval changes from 1s to 250ms and jitter from 500ms to 50ms, changing advertisement times and sequence progression.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tND: bda7-8bee -> 272c-55b9. The MANET full-dump interval changes from 1s to 250ms and jitter from 500ms to 50ms, changing advertisement times and sequence progression.

Change: examples.routing.manet | behavior.change | fingerprint
DSDV inspection currently hides the freshness, settling and advertisement state needed to explain route choices. Register watches for the controller, route records, neighbors, full-dump baseline, pending destinations and timer deadlines. Provide read-only table accessors and record formatting so inspectors can display that state without changing routing decisions.

Change: src.routing.dsdv | refactor | -
Repeated destination sequences without metric improvements drive the adaptive settling estimate toward zero, so a later route change can receive a picosecond-scale holdoff. Add a configurable minSettlingDelay, defaulting to 10ms, to bound new deferred advertisement deadlines while preserving the settling cap, existing deadlines and immediate urgent updates. Reject nonpositive minima and minima above the cap.

Extend the dissemination test with a zero-estimate history, minimum/cap boundaries, advertised-view preservation and urgent withdrawal. Document the new parameter, migration requirements and changed simulation trajectories.

Nonvisual fingerprint updates on the upstream base, debug mode, run/seed 0. Visual expectations are unchanged:
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, tplx: 028c-95ee -> ea2a-cd36. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, tplx: 3f89-3651 -> e7a2-1b3d. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, ~tNl: 4551-50ce -> ec39-cd04. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tNl: 519f-5d99 -> 7c88-78ac. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.
- examples/manetrouting/dsdv, omnetpp.ini, DynamicIPv4, run 0, 22s, ~tND: 42a9-af97 -> 9cfd-b9e8. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.
- showcases/routing/manet, omnetpp.ini, Dsdv, run 0, 100s, ~tND: 272c-55b9 -> 3b16-c25e. The 10ms floor postpones new deferred deadlines and changes advertisement timing and coalescing. Urgent advertisements and existing deadlines retain their rules.

Change: src.routing.dsdv | behavior.change | test whatsnew migration fingerprint
The UDP DSDV implementation uses DsdvHeader, but the old DsdvHello message and serializer still remain in the source tree. Remove these unused artifacts and their serializer-test fillers, exclusion entry and coverage note so the test library no longer depends on the retired packet type.

Update the migration guide to state that the old classes have been removed and direct custom code and tooling to DsdvHeader and DsdvHeaderSerializer.

Change: src.routing.dsdv | behavior.remove | migration
The DSDV check list is too terse to explain the fixtures without reading their test sources. Expand it with topology diagrams, controlled inputs, timelines, expected observations and coverage limits for all eight correctness tests.

Add a central index and a README beside the tests so reviewers can find the forwarding and mobile-recovery explanations already delivered with their behavior commits. This changes documentation only.

Change: doc | comment | -

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant