DECT NR+: IPv6 tethering
The DECT NR+ IPv6 tethering library turns an nRF device with a DECT NR+ uplink into an IPv6 gateway for a tethered host on Ethernet.
It advertises the device as the host’s default router, assigns DECT NR+-derived ULA and GUA /128 addresses through a built-in DHCPv6 server, and forwards traffic using standard Zephyr IPv6 routing.
Note
The current implementation is experimental.
Overview
Use this library when a PC or similar host is connected over Ethernet (eth0) and must reach the IPv6 network through the device’s DECT NR+ interface (dect0).
The tether model is split across two mechanisms on the host leg:
Router Advertisements (RA) on Ethernet tell the host to use this device as the IPv6 default gateway. The Managed (M) flag directs the host to obtain addresses through DHCPv6 rather than SLAAC.
A minimal DHCPv6 server on UDP port
547offers ULA and GUA/128values derived from the DECT NR+ interface.IPv6 forwarding helpers install a default router on
dect0toward the DECT NR+ parent and/128routes plus neighbor entries oneth0so return traffic reaches the tethered host.
An optional mDNS forwarder can bridge IPv6 mDNS (UDP port 5353) between eth0 and dect0 for service discovery across the two legs.
It targets PT (Portable Termination) devices with an established DECT NR+ stack and network interfaces.
Implementation
The library uses Zephyr IPv6 routing (routes and neighbor discovery), not L2 address rewrite hooks.
Address sourcing on dect0 may use CONFIG_NET_L2_DECT_IPV6_IFACE_UNICAST_INSTALL (disabled by default for this library) when ULA/GUA are not listed on the interface address table.
Architecture
The following figure shows the IPv6 tethering data path, together with the surrounding system context: PT devices connect directly to the FT in a star topology, and an FT/Sink Border Router bridges the DECT NR+ network out to the Internet over one of its two backhauls (LTE using Serial Modem on a separate DK, or Ethernet through a W5500 shield on the same DK; only one is built into a given FT/Sink image at a time).
IPv6 tethering data path: the host learns the default router and addresses on eth0; forwarded traffic uses routes and neighbors installed by the library.
Modules
Module |
Source file |
Role |
|---|---|---|
Host Ethernet |
|
Resolves the tethered host leg (Kconfig name or first Ethernet) |
Init |
|
Starts RA, DHCPv6, routing, uplink, and optional mDNS in order; rolls back on failure |
Addresses |
|
Reads ULA/GUA from |
RA |
|
ICMPv6 RAs on Ethernet (default router, RDNSS, M flag, optional PIO with L=0/A=0) |
DHCPv6 |
|
Minimal server, lease snapshot, proactive revoke on DECT NR+ uplink loss |
Uplink |
|
Subscribes to DECT NR+ parent association events; triggers RA/DHCP and routing helpers |
Routing |
|
DECT NR+ parent default router, Ethernet |
mDNS (optional) |
|
AF_PACKET tap between |
When the DECT NR+ parent association is released, the uplink module triggers RA withdrawal (router lifetime 0, M cleared, RDNSS lifetime 0), DHCPv6 lease revoke (IAADDR lifetimes 0), and routing teardown so the tethered host is notified promptly.
Supported features
The library supports the following features:
ICMPv6 Router Advertisements on the host Ethernet interface: default router lifetime, optional MTU, Managed (M) flag, optional RDNSS (RFC 8106), optional Prefix Information Options with L=0 and A=0 (prefix hint without SLAAC).
Minimal DHCPv6 server: Solicit, Request, Renew, Rebind, Confirm, and Information-request handling; joins
ff02::1:2.IPv6 routing helpers: default router on
dect0after parent association;/128routes and STATIC neighbor entries oneth0after DHCPv6 bind.Uplink loss handling: debounced lease revoke and unsolicited RA when the DECT NR+ parent association is lost.
Optional IPv6 mDNS forwarder between Ethernet and DECT NR+ (queries and unicast replies filtered by ULA/GUA scope).
Requirements
The library requires the following configurations:
IPv6 networking (
CONFIG_NET_IPV6)DECT NR+ L2 (
CONFIG_NET_L2_DECT)UDP sockets (
CONFIG_NET_UDPandCONFIG_NET_SOCKETS)An Ethernet interface for the host leg when RA or DHCPv6 is enabled
DECT NR+ parent association for upstream IPv6 connectivity
CONFIG_NET_ROUTE,CONFIG_NET_ROUTING, andCONFIG_NET_IPV6_NBR_CACHE(required by the library for IPv6 forwarding)CONFIG_NET_L2_DECT_MGMTwhen RA or DHCPv6 is enabled (pulls inCONFIG_NET_MGMT_EVENT_INFOfor DECT NR+ association-change events)
Configuration
To enable the library, set the CONFIG_DECT_TETHER_IPV6_LIB Kconfig option.
Sub-features are controlled by the following dedicated Kconfig options (all under DECT NR+ libraries → DECT IPv6 tethering):
CONFIG_DECT_TETHER_IPV6_RA- ICMPv6 RAs on Ethernet (default: enabled)CONFIG_DECT_TETHER_IPV6_DHCPV6_SERVER- Minimal DHCPv6 server (default: enabled)CONFIG_DECT_TETHER_IPV6_MDNS_FORWARD- mDNS tap (default: disabled)CONFIG_DECT_TETHER_IPV6_HOST_ETH_IFACE- Host Ethernet interface name (default: empty, first Ethernet)
See subsys/net/lib/dect/tether_ipv6/Kconfig for RA timing, RDNSS addresses, DHCPv6 lifetimes, debug trace options, and mDNS thread settings.
Usage
Call dect_tether_ipv6_init() after nrf_modem_lib_init() and with the network stack initialized.
Call the dect_tether_ipv6_init() function after nrf_modem_lib_init() and with the network stack initialized.
Call the dect_tether_ipv6_deinit() function to stop RA, DHCPv6, forwarding, and mDNS threads or handlers.
#include <net/dect/dect_tether_ipv6.h>
int err;
err = nrf_modem_lib_init();
if (err) {
return err;
}
err = dect_tether_ipv6_init();
if (err) {
return err;
}
Samples using the library
The nRF91x1: DECT NR+ IPv6 tethering sample uses this library.
Limitations
The library has the following limitations:
The DHCPv6 server holds one active lease (DUID+IAID); other hosts get NoAddrsAvail or are ignored.
RA, DHCPv6, and forwarding operate on the host Ethernet interface selected by
CONFIG_DECT_TETHER_IPV6_HOST_ETH_IFACE(empty = first Ethernet).Ethernet ingress source filtering by tethered host address is not implemented. A design based on
CONFIG_NET_PKT_FILTERand the IPv6 receive hook (using the committed DHCPv6 lease as the allowlist) is tracked as a possible enhancement.Cross-leg unicast mDNS is dropped when the source or destination is link-local (
fe80::); only multicast queries/responses toff02::fbare forwarded.If DECT NR+-derived addresses change between exchanges, Request/Renew/Rebind Replies include the previous IAADDR entries with lifetime 0 before any new addresses.
Dependencies
DECT NR+ L2 helpers (
net/dect/dect_net_l2.h)CONFIG_NET_L2_ETHERNETfor the host legCONFIG_NET_SOCKETS_PACKETwhen mDNS forwarding is enabled
API documentation
include/net/dect/dect_tether_ipv6.hsubsys/net/lib/dect/tether_ipv6/