IPv6 for IoT: 6LoWPAN and why IPv6 suits billions of devices
In short: IPv6 gives every device its own globally unique address, automatic configuration and end-to-end reachability without NAT. 6LoWPAN is an adaptation layer that compresses and fragments IPv6 packets so they fit in small, low-power radio frames. It is the foundation of Thread and many industrial meshes.
Why IPv6 suits the Internet of Things
IPv4 offers about 4.3 billion addresses, and they ran out years ago. Networks survive by hiding many devices behind one public address with Network Address Translation (NAT). That works for laptops that start connections outwards, but it complicates IoT, where you may want to reach a sensor directly or have devices talk to each other across sites.
IPv6 uses 128-bit addresses, so the space is effectively unlimited: a single standard /64 subnet holds 2 to the power of 64 interface addresses. More useful than sheer size are the features that come with it:
- Stateless address autoconfiguration (SLAAC): a device builds its own address from the router's prefix, with no Dynamic Host Configuration Protocol (DHCP) server needed.
- End-to-end addressing: every node can have a global, unique address, which simplifies routing, logging and troubleshooting.
- Neighbour Discovery replaces ARP and supports router discovery and duplicate address detection.
- Multicast is built in, useful for group commands and service discovery.
Reachability is not the same as openness. A global address does not mean a device should accept connections from the internet. You still put a stateful firewall at the edge that blocks unsolicited inbound traffic and allows only what you intend.
The size problem and the 6LoWPAN answer
Many low-power wireless devices use IEEE 802.15.4 radios, the physical and link layer under Zigbee, Thread and others. Its classic frame holds only 127 bytes. IPv6 requires links to carry packets of at least 1280 bytes, and the IPv6 header alone is 40 bytes, plus 8 for UDP. Without help, little room would be left for data.
6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks), defined mainly in RFC 4944 and RFC 6282, adds an adaptation layer between IPv6 and the radio:
- Header compression (IPHC). Many IPv6 fields can be worked out from the link layer or are always the same in a given network. The version, traffic class and flow label are usually dropped, and addresses built from the radio's own address can be elided. A 48-byte IPv6 and UDP header can often shrink to under 10 bytes.
- Fragmentation and reassembly. Packets larger than a frame are split into fragments and rebuilt at the receiver, meeting the 1280-byte rule.
- Mesh support. Packets can travel through several hops of battery-friendly radios.
Routing inside the mesh commonly uses RPL, the IPv6 Routing Protocol for Low-Power and Lossy Networks (RFC 6550). RPL builds a tree-like graph, called a DODAG, rooted at the border router, and nodes pick parents based on link quality and energy.
Border routers and real deployments
A 6LoWPAN border router sits between the mesh and an ordinary Ethernet or Wi-Fi IPv6 network. It advertises the mesh prefix, expands compressed headers, routes packets and is usually the RPL root. Thread, the mesh used by Matter smart-home devices, is built on exactly this design: 802.15.4 radios, 6LoWPAN, IPv6 and a Thread border router.
On Linux you can build a test node with an 802.15.4 USB adapter and the wpan-tools package. The commands below configure the radio and create a 6LoWPAN interface in a lab:
sudo iwpan dev wpan0 set pan_id 0xbeef
sudo ip link add link wpan0 name lowpan0 type lowpan
sudo ip link set wpan0 up
sudo ip link set lowpan0 up
ip -6 addr show dev lowpan0
ping -6 -c 3 fe80::<neighbour-id>%lowpan0
Security considerations
| Layer | Protection | Watch out for |
|---|---|---|
| Radio (802.15.4) | AES-CCM encryption and integrity with a network key | One shared key; a stolen device may reveal it |
| Joining | Commissioning with per-device credentials (as in Thread) | Weak or default join passwords |
| Routing (RPL) | Optional RPL security modes | Rogue nodes advertising false routes (sinkhole attacks) |
| Transport and application | DTLS or OSCORE for CoAP | Assuming link encryption is enough end to end |
| Border router | Firewall, rate limiting, logging | Exposing mesh nodes directly to the internet |
Fragmentation adds its own risk: an attacker in radio range can send bogus fragments that fill reassembly buffers on small devices, a form of denial of service. Defence in depth matters here. Encrypt at the link layer, protect messages end to end, filter at the border router and monitor for unusual routing changes.
Tip: for exams, remember the three numbers that explain why 6LoWPAN exists: a 127-byte 802.15.4 frame, a 40-byte IPv6 header and the 1280-byte minimum IPv6 MTU. Compression and fragmentation bridge the gap.
Practice
Why can IPv6 not run directly over a classic IEEE 802.15.4 link?
What does a 6LoWPAN border router do?
Does giving every IoT device a global IPv6 address make it reachable by anyone?
Key takeaways
- IPv6 removes the address shortage and brings SLAAC, multicast and end-to-end addressing.
- 6LoWPAN compresses and fragments IPv6 to fit 127-byte 802.15.4 frames.
- RPL routes traffic through the mesh towards a border router.
- Thread and Matter devices use this 802.15.4, 6LoWPAN and IPv6 design.
- Global addresses still need a firewall; secure the radio, the messages and the border.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.