Skip to content

Measure 6LoWPAN addresses and the fragment gate

Compare the address scope, compressed frame budget and delivery of a 52-byte report and a 300-byte diagnostic packet.

Packet Pete — I check the next hop and the reply before trusting a route., your practice guide

Packet Pete — I check the next hop and the reply before trusting a route.
Predict the reading, then compare it with the measurement.

Contiki-NG Cooja

Third party Tool

Compare the address scope, compressed frame budget and delivery of a 52-byte report and a 300-byte diagnostic packet.

Tier 2 · Free simulator · install required · No account

Version tested: Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609. Date: 2026-09-10.

Download the complete lab packet and follow README.md to run it in the free simulator.

Download the setup and run guide

Get the lab files

Download the complete packet for the simulation and its firmware, or download individual files for inspection. README.md gives the setup and run commands.

  • cooja-6lowpan-addressing.csc
  • README.md
  • expected-output.txt
  • lab-files.tar.gz

Steps

Screens captured against Contiki-NG Cooja Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609 on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 Step 1

    Do
    Run the primary CSC until 125 s. Filter Mote output for ^-- (fd00|fe80)::202|^-- Prefix:. Record the receiver addresses and root prefix.
    You will see
    Receiver 2 has fd00::202:2:2:2 and fe80::202:2:2:2; the root advertises fd00::/64.
    Why it matters
    The routed lab prefix and link-local scope have different owners and reach. This run covers the radio mesh only.
    Step 1: The receiver addresses and root prefix are visible. The orange ring marks the evidence; the numbered badge is outside it.
    Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 Step 2

    Do
    Filter for output: header len 56|uncompression: UDP length: 60. Compare the sender’s frame budget with the receiver’s rebuilt UDP header.
    You will see
    Headers shrink from 56 to 15 bytes; the 108-byte IPv6 packet becomes 67 bytes against a 104-byte MAC payload budget. frag_needed is 0; UDP length is 60.
    Why it matters
    The 56 bytes include IPv6, UDP and the RPL extension. Compression is measured for this exact context and path, not a universal fixed saving.
    Step 2: The real compression-budget line and rebuilt UDP-length line are shown. The orange ring marks the evidence; the numbered badge is outside it.
    Step 2 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 Step 3

    Do
    Filter for ^Data .*length 52|^-- MOP:. Match the accepted length to the original 52-byte report.
    You will see
    Data 1 received length 52 appears; the root reports Non-storing.
    Why it matters
    Receiver delivery is the second side of the trace pair. This upstream size-test fixture has arbitrary payload bytes, not encoded environmental sensor readings.
    Step 3: The receiver reports 52 bytes and the routing mode is Non-storing. The orange ring marks the evidence; the numbered badge is outside it.
    Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 Step 4

    Do
    Open cooja-6lowpan-addressing-large.csc from the packet. After it stops, filter for output: header len 56|output: fragmentation needed.
    You will see
    The 300-byte payload makes a 356-byte IPv6 packet, compressed to 315 bytes. Four fragments are required.
    Why it matters
    Growing the same message contract crosses the fragmentation gate even though addresses and radio range stay fixed.
    Step 4: The larger packet budget and four-fragment decision are visible. The orange ring marks the evidence; the numbered badge is outside it.
    Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 Step 5

    Do
    In the large run, filter for input: fragment \(tag|^Data .*length 300. Compare the fragment rows with the accepted payload.
    You will see
    Four input fragment rows precede Data 1 received length 300. Offsets are 0, 136, 232 and 328.
    Why it matters
    One delivered datagram depends on all its fragments; offsets refer to the reconstructed datagram, not four separate application messages.
    Step 5: Four fragment records and the 300-byte delivery row are visible. The orange ring marks the evidence; the numbered badge is outside it.
    Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 Step 6

    Do
    Open cooja-6lowpan-addressing-loss.csc. Filter for received first element|input: fragment \(tag|^Data . Check expected-loss-output.txt and write the README release decision.
    You will see
    Only the first fragment arrives. The script moves receiver 2 out of range at 80.559936 s; no Data delivery occurs through 125 s.
    Why it matters
    The loss case passes only when delivery is absent. Keep routine reports small; name a fallback and retest after size, context, prefix or route changes.
    Step 6: The loss run shows the first fragment without a completed Data delivery row. The orange ring marks the evidence; the numbered badge is outside it.
    Step 6 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)

Chapter checks

These questions refer to the chapter’s examples. Use the return links to review their answers.

  1. A 6LoWPAN design promises that every packet will compress to the same tiny header size. What evidence should a reviewer request?

    Return to the chapter’s knowledge check
  2. Which release evidence best proves an IPv6 and 6LoWPAN deployment is ready for constrained IoT traffic?

    Return to the chapter’s knowledge check

Caution

This is a size/fragment experiment on an idealized link. Do not infer Internet reachability or security from an IPv6 address. The loss simulation intentionally prevents delivery; its TEST OK means the fault behaved as asserted.

Return to IPv6 and 6LoWPAN for IoT · Browse Labs