Zigbee, Thread & Matter · Study deck

6LoWPAN Architecture: Compression and Fragmentation

6LoWPAN is the adaptation architecture that lets IPv6 packets cross IEEE 802.15.4 radio links.

Radio Remi is your guide for this deck.

6lowpanipv6ieee-802-15-4
Radio Remi compresses header blocks and places payload fragments into radio-frame trays.
iotclass.org

After studying this chapter

Learning objectives

The packet must fit the constrained link while remaining reconstructable as IPv6.

  • 6LoWPAN can adapt IPv6 packets to the constrained radio link.The frost warning still needs IPv6 addressing while its headers and payload compete for space inside the IEEE 802.15.4 frame.
  • Compression needs information that both peers can reconstruct.Link-layer addresses, shared prefixes, and agreed rules let the receiver recover fields that the sender omits from the transmitted header.
  • Fragmentation needs receiver state when a packet cannot fit.The receiver must retain pieces, track tags and offsets, and discard an incomplete datagram when its reassembly timer expires.
  • Packet captures and recovery tests support the architecture claim.The record joins the original warning, adapted frames, route or parent state, final reassembly result, and changes that require another test.

I am following a field sensor’s frost warning across a small radio link. I need the receiver to recover the packet’s source, time, and result even when a larger message must be split.

iotclass.org

Major section

Start With the IPv6 Packet That Must Fit

A successful packet needs a complete path from its original form to receiver reconstruction.

  • The sender’s IPv6 packet must fit the constrained link.The field sensor’s complete warning may exceed one small frame, so packet size must be considered before approving the radio path.
  • Compressed headers need matching reconstruction context at the receiver.Omitted address and transport fields remain recoverable only when the receiver has the required link information, prefixes, and compression rules.
  • Every required fragment must contribute to the reconstructed datagram.Dropping a piece must not create a false frost warning; the incomplete packet needs a clear failure outcome at the receiver.
  • The evidence record must connect packet shape with the final result.Original bytes, adapted frames, forwarding state, and reassembly outcome let a later reviewer follow the warning through the same constrained-link handoffs.

I send the frost warning once, then enlarge it and drop a piece. I want one clear receiver outcome, with old data kept distinct from a new warning.

iotclass.org

Major section

Nodes, routes, and the border router

A mesh route must preserve the packet claim through every handoff.

  • Nodes, routers, and border routers have different delivery duties.The design needs to show which devices forward the warning and where routing, custody, and monitoring evidence can be inspected.
  • Route or parent state helps explain the adapted packet’s path.A packet capture alone cannot identify all forwarding assumptions, so the warning record also retains the state used during delivery.
  • The border router connects the constrained mesh with wider IPv6.Its prefix ownership, health, and handoff records help explain whether the packet continues beyond the small-radio network with its meaning intact.
  • Payload or link changes can invalidate earlier packet-fit evidence.An enlarged warning or changed link conditions may require fresh captures, fragmentation checks, and receiver recovery observations before the old approval remains useful.

I follow the sleepy sensor’s warning toward the wider IPv6 network. I record the route and border-router handoff so a gateway restart can be checked against the earlier delivery evidence.

iotclass.org

Major section

Shared context and compression exceptions

Header savings are useful only when reconstruction remains reliable.

  • Both peers need shared context for omitted header fields.The receiver can use radio-frame addresses, prefix assumptions, and agreed hop-limit rules to reconstruct the IPv6 header instead of guessing missing information.
  • Prefix or commissioning changes can break earlier compression assumptions.A border-router ownership or security-mode change requires another check of which information is shared and which bytes must remain in the packet.
  • Packet evidence must include traffic that needs larger headers.Diagnostic or gateway traffic may need full UDP fields, so normal sensor messages cannot stand in for every deployed packet class.
  • A short compressed example cannot prove that all messages fit.The 24-byte update and 180-byte diagnostic response have different packet-fit boundaries even when they use the same constrained network and adaptation layer.

I am checking the frost warning’s shortened header after a prefix or commissioning change. I need enough shared information to rebuild the omitted fields before trusting the apparent byte saving.

iotclass.org

Major section

In 60 Seconds

Adaptation changes packet representation without replacing the jobs of surrounding protocols.

  • 6LoWPAN sits below IPv6 and above IEEE 802.15.4.It changes how the sensor packet is represented on the constrained link without replacing IPv6 addressing or making the radio behave like Ethernet.
  • Header compression preserves omitted information through agreed reconstruction rules.The receiver uses shared context to recover shortened IPv6 and UDP fields, keeping the original packet recoverable after its radio transmission.
  • Fragmentation adds memory, timeout, and recovery requirements.An oversized diagnostic response leaves incomplete state at the receiver until all required pieces arrive or the unfinished datagram is discarded.
  • Thread adds its own rules to these adaptation foundations.Commissioning, security, mesh management, and product ecosystem behavior still need their own review beyond the packet compression and fragmentation claim.

I place the sensor warning between its application and the radio frame that must carry it. I keep adaptation separate from message meaning, transport behavior, and Thread’s additional operating rules.

iotclass.org

Major section

Why An Adaptation Layer Exists

Small frames force headers and application data to compete for the same space.

  • MAC information and enabled security must share the frame budget.The 127-byte maximum includes addressing, link control, security, adaptation information, packet headers, and useful application data competing for the same space.
  • IPv6 and transport headers leave less room for application data.In the chapter’s practical 80-byte budget, uncompressed IPv6 and UDP consume 48 bytes before the warning’s payload is added.
  • Compression recovers space from information the receiver can reconstruct.Headers of about 8 bytes leave roughly 72 bytes for application data in that same illustrative budget, reducing avoidable fragmentation.
  • Fragmentation has a reliability cost when a packet still cannot fit.The receiver must retain and recover multiple pieces, so a larger diagnostic message needs evidence beyond a single-frame telemetry success.

I am counting the bytes available for a frost warning in one radio frame. I account for link security and headers before deciding whether the useful message still fits without fragments.

iotclass.org

Major section

Frame Budget Arithmetic

Counting the header bytes explains how compression can avoid fragmentation.

  • The chapter starts with a maximum 127-byte radio frame.MAC addressing and control reserve roughly 25 bytes, and enabled link-layer security consumes additional capacity before the application can use the frame.
  • A practical budget is around 80 bytes before network headers.That illustrative remainder must still carry IPv6 or compressed IPv6 information, transport headers, and the useful application message within the constrained frame.
  • Uncompressed IPv6 plus UDP uses 48 bytes.The 40-byte IPv6 header and 8-byte UDP header leave roughly 32 bytes for application data from the illustrative 80-byte budget.
  • Headers compressed to about 8 bytes leave roughly 72 bytes.The 24-byte sensor update fits both example budgets, but compression leaves more capacity before the application message would need fragmentation.

I have the chapter’s 24-byte sensor update beside its frame budget. I subtract the headers twice, once uncompressed and once compressed, to see the space available for the useful reading.

iotclass.org

Activity 1 · Work it out

✎ Count the useful bytes

I want you to account for every byte before you approve the radio path.

On paper, start with the chapter’s 80-byte budget before network and transport headers. Calculate application space with 48 bytes of headers, then with about 8 bytes. Does a 24-byte update fit both budgets?

3 minutes · Pen and paper · Answer: Activity 1

Your answer
iotclass.org

Major section

Security overhead and out-of-order fragments

Security overhead can change a packet from one frame into a fragmented datagram.

  • A 24-byte update should fit after compression in the example.The chapter contrasts this normal telemetry path with a 180-byte diagnostic response that may need its own timeout, retry, and memory evidence.
  • The security preset adds nine bytes through AuxSec and MIC.Changing only link security pushes the preset’s 100-byte application message from one frame to two, exposing overhead that the payload count hides.
  • Receiver offsets can restore byte order independently of arrival sequence.With arrivals 1, 3, 2, 5, 4, the receiver places bytes 0 through 419 into their original buffer positions despite the shuffled arrival strip.
  • A missing fragment can force the whole buffer to be discarded.Dropping fragment 3 leaves the range [176, 264) missing; advancing the receiver clock to 60 seconds exposes the incomplete-datagram timeout.

I am testing the larger message with the security preset enabled. I then shuffle the fragments at the receiver and drop one to check that byte placement and timeout handling remain distinct.

iotclass.org

Major section

Stack Boundary

This stack comparison shows where constrained-link adaptation fits beneath IPv6.

  • The application rows define the meaning of the exchanged messages.The stack comparison places application protocols above transport; adaptation does not decide whether the frost warning is current or what its value means.
  • The constrained stack has UDP and IPv6 above 6LoWPAN.Transport and addressing remain visible responsibilities even though the low-power link needs a different representation of the packet before transmission.
  • 6LoWPAN handles compression and fragmentation above IEEE 802.15.4.The adaptation row shortens reconstructable headers and splits oversized datagrams before the link supplies the radio MAC and PHY frame.
  • Moving down the stack changes representation rather than application meaning.A compressed warning must remain reconstructable at the receiving side; fitting the small frame does not turn a lossy mesh into a high-capacity network.
6LoWPAN protocol stack comparison.
6LoWPAN protocol stack comparison.
iotclass.org

Major section

Layer Responsibilities

Each layer owns a different part of the delivery claim.

  • Applications define message meaning, payload shape, cadence, and retry policy.A frost warning’s useful data and failure behavior need review even when a common application protocol carries the message over the constrained network.
  • IPv6 keeps addressing, routing, hop limits, and neighbor behavior visible.The design must show next-hop and prefix assumptions instead of treating successful IPv6 naming as proof that the sleepy mesh can deliver packets.
  • 6LoWPAN can compress, dispatch, and fragment packets for the link.Its reconstruction rules and fragment handling determine how the original datagram survives the smaller representation used by IEEE 802.15.4 frames.
  • IEEE 802.15.4 supplies the frame whose overhead affects packet fit.Link security, retries, and loss patterns influence the delivery evidence, while operators need access to fragment drops and border-router health records.

I am investigating a frost warning that failed to reach its final application. I separate payload policy, IPv6 route state, adapted packet shape, and radio loss so each observation has a clear owner.

iotclass.org

Major section

Fragmentation Boundary

Fragmented traffic needs an explicit exception policy and a tested receiver.

  • Normal telemetry and common commands should usually fit one frame.Compression and enabled security overhead must both be counted before the 24-byte update can serve as evidence for a single-frame operating path.
  • The receiver must retain state while matching fragment tags and offsets.A fragmented diagnostic response needs memory and timeout evidence because its unfinished pieces remain in the buffer while missing data is awaited.
  • One missing fragment can invalidate the whole unfinished datagram.The out-of-order exercise discards incomplete work after the timeout rather than presenting the remaining bytes as a complete frost warning.
  • Large updates and logs may need chunks or another transport path.Firmware, certificates, and support downloads require an explicit transfer decision rather than silently relying on constrained-link fragmentation for every large message.

I am approving normal sensor updates separately from larger diagnostic responses. I keep bulk logs and firmware transfers under review for chunking or another path instead of assuming the fragment buffer is unlimited.

iotclass.org

Deck summary

Key takeaways

A sound architecture proves packet fit, shared context, and recovery together.

  • Compression saves bytes only when omitted fields remain reconstructable.Shared prefixes, link-layer addresses, and transport context need verification on the actual traffic path, including messages that require larger headers.
  • The frame budget must include security and transmitted headers.The chapter’s security preset changes a 100-byte application message from one frame to two when AuxSec and MIC consume nine additional bytes.
  • Fragmentation needs memory, timeout, retry, and operator evidence.A 180-byte diagnostic response may use the exception path, while missing pieces must produce a clear incomplete-datagram outcome at the receiver.
  • Routing and border-router records connect the packet with wider IPv6.The original warning, adapted frames, route state, and reassembly result belong together with the link or payload changes that trigger another test.

I return to the frost warning with its packet capture and receiver outcome. I can now identify the header context, security budget, fragment exception, and border-router evidence that support this particular delivery claim.

iotclass.org

Retrieval practice

Recall check 1 of 2

Radio Remi says: answer from memory, then check your reasoning.

Q1Where does 6LoWPAN sit in the stack, and what is its role?

ABetween IPv6 and IEEE 802.15.4, adapting packet shape to the constrained radio
BAbove the application layer, replacing CoAP and MQTT entirely
COnly inside the border router, as a gateway-only translation trick
DAt the physical layer, defining the 2.4 GHz radio modulation itself
Show answer

Answer: A 6LoWPAN is the adaptation layer between IPv6 and IEEE 802.15.4 that reshapes packets for the constrained radio.

iotclass.org

Retrieval practice

Recall check 2 of 2

Radio Remi says: answer from memory, then check your reasoning.

Q2Why does 6LoWPAN need header compression before ordinary telemetry is practical on IEEE 802.15.4?

AThe frame is only 127 bytes before MAC and security overhead, so uncompressed IPv6 plus UDP leaves little room for sensor data.
BIPv6 packets cannot use UDP unless every address byte is encrypted by the 802.15.4 radio hardware first.
C6LoWPAN changes the physical radio rate so the same frame can carry larger uncompressed packets.
DHeader compression is only for border routers; constrained nodes always transmit full IPv6 and UDP headers.
Show answer

Answer: A The 127-byte frame leaves little payload space after MAC, security, IPv6, and UDP overhead, so IPHC is required for useful single-frame telemetry.

iotclass.org

Print reference

Answers

Answer key.

  1. A · 6LoWPAN is the adaptation layer between IPv6 and IEEE 802.15.4 that reshapes packets for the constrained radio.
  2. A · The 127-byte frame leaves little payload space after MAC, security, IPv6, and UDP overhead, so IPHC is required for useful single-frame telemetry.
iotclass.org

Print reference

Activity 1 answer

Model answer.

Work it out: 80 − 48 = 32 bytes; 80 − 8 = 72 bytes. The 24-byte update fits both example budgets. Compression leaves more room, but actual link security and transmitted headers still need checking.

iotclass.org