ns-3 6LoWPAN Neighbor Discovery
Implement 6LoWPAN Neighbor Discovery (RFC 6775) in the ns-3 simulator: address registration, optimized router discovery and duplicate address detection for low-power links.
Results
Each square represents one run. Score is the percentage of runs that pass: 0, 25, 50, 75, or 100 for four runs.
| # | Model | Rollouts | Pass@1 | Score | Time |
|---|---|---|---|---|---|
| 1 | Claude Opus 5.5 max | 1/4 | 2.0h | ||
| 2 | GPT-6 Astra xhigh | 0/4 | 2.4h | ||
| 3 | GPT-5.6 Sol max | 0/4 | 1.2h | ||
| 4 | Gemini 3.8 Flash high | 0/4 | 1.8h | ||
| 5 | Qwen3.8 Max xhigh | 0/4 | 2.7h | ||
| 6 | GLM 5.3 Flash max | 0/4 | 4.0h | ||
| 7 | Muse Spark 1.3 max | 0/4 | 1.7h | ||
| 8 | Kimi K3 max | 0/4 | 2.5h | ||
| 9 | Grok 4.7 xhigh | 0/4 | 3.3h | ||
| 10 | GPT-6.1 Sol max | 0/4 | 3.3h | ||
| 11 | Claude Sonnet 5.5 max | 0/4 | 3.5h |
Background
ns-3 is a discrete-event network simulator. Its sixlowpan module compresses IPv6 headers for low-power wireless links such as IEEE 802.15.4, but nodes still run plain RFC 4861 Neighbor Discovery: multicast solicitations for duplicate detection and periodic multicast router advertisements. RFC 6775, updated by RFC 8505, replaces that with a host-driven scheme: a node solicits routers, forms addresses from advertised prefixes and registers each with the border router, which keeps a binding table and rejects duplicates. The agent starts from the commit before ns-3 landed this protocol (merge request !2482). Lifetimes, renewals and departures run over hours of simulated time, and plain nodes must still behave as before.
Task
The agent adds 6LoWPAN Neighbor Discovery to the sixlowpan module for host and border router roles on a single mesh-under link. Helper methods install both roles and set advertised prefixes and contexts, a protocol object carries lifetime attributes and trace sources, and a binding table prints in a fixed format. Message formats and processing follow RFC 6775 and RFC 8505, with RFC 4861 and RFC 4862 for what they leave unchanged. Route-over routing, multihop duplicate detection and backbone routers are out of scope; where the RFCs leave a choice open, the agent decides and documents it. Only committed work is graded.
Workspace
The offline sandbox (4 CPUs, 8 GB, 4 hours) holds an ns-3-dev checkout with its real history at commit 0740177d, configured and built with the needed modules, tests and examples. The scenario driver and its cases are held out.
Verification
The committed tree is rebuilt from a clean checkout, and every test suite passing at the start must still pass. 224 seeded simulations in seven families cover bootstrapping, multiple prefixes, renewal, departure, duplicate addresses, router solicitation and combined scenarios. Registration results, binding tables, neighbor caches, addresses, routers and exchanged messages are compared with the upstream implementation at checkpoints whose outcome is deterministic. A wire family checks messages against RFC rules such as hop limit 255 and no multicast solicitations. Each of the eight families must reach 90%.
Environment
- Toolchain
- C++
- Compute
- 4 CPUs · 8 GB RAM
- Network
- Offline
- Time limit
- 4 hours
References
- ns-3: The simulator the agent extends; the workspace starts at the parent of the upstream 6LoWPAN Neighbor Discovery landing.
- RFC 6775: Neighbor Discovery Optimization for 6LoWPANs: The core protocol: address registration, optimized router discovery and duplicate detection at the border router.
- RFC 8505: Registration Extensions for 6LoWPAN Neighbor Discovery: Updates RFC 6775 with the extended address registration option, status codes and capability indication.