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.
Predict the reading, then compare it with the measurement.
Contiki-NG Cooja
Third party ToolCompare the address scope, compressed frame budget and delivery of a 52-byte report and a 300-byte diagnostic packet.
Download the complete lab packet and follow README.md to run it in the free simulator.
Download the setup and run guideGet 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.
Steps
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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) 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 · 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.
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 checkWhich release evidence best proves an IPv6 and 6LoWPAN deployment is ready for constrained IoT traffic?
Return to the chapter’s knowledge check