Free tech learning for everyone, from basics to pro

IoT NetworkingIoT SecurityAdvanced

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:

A typical low-power IPv6 stackApplicationCoAP, MQTT-SNTransportUDP, DTLSNetworkIPv6 + RPL routingAdaptation6LoWPAN compressionLink and radioIEEE 802.15.4
Figure 1. 6LoWPAN is a thin adaptation layer that lets full IPv6 run over tiny low-power radio frames.
  • 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

From mesh node to the internetSensor nodecompressedIPv6Mesh hopsRPL routesBorder routerexpandsheadersFirewallfiltersinboundIPv6 networkcloud or LAN
Figure 2. The border router joins the low-power mesh to normal IPv6 networks and is the natural security checkpoint.

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

LayerProtectionWatch out for
Radio (802.15.4)AES-CCM encryption and integrity with a network keyOne shared key; a stolen device may reveal it
JoiningCommissioning with per-device credentials (as in Thread)Weak or default join passwords
Routing (RPL)Optional RPL security modesRogue nodes advertising false routes (sinkhole attacks)
Transport and applicationDTLS or OSCORE for CoAPAssuming link encryption is enough end to end
Border routerFirewall, rate limiting, loggingExposing 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?
The frame holds only 127 bytes, but IPv6 requires a minimum MTU of 1280 bytes and has a 40-byte header. 6LoWPAN compresses headers and fragments packets to bridge the gap.
What does a 6LoWPAN border router do?
It connects the low-power mesh to a normal IPv6 network: it advertises the prefix, expands compressed headers, routes traffic, usually acts as the RPL root, and is the natural place for firewall rules.
Does giving every IoT device a global IPv6 address make it reachable by anyone?
Only if you allow it. A stateful firewall should still block unsolicited inbound traffic, permitting only the flows you intend.

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.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

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.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.