Simple-Subnet auto-configuration

Automatic configuration for cascading subnets. More...

Detailed Description

Automatic configuration for cascading subnets.


This module provides an automatic configuration for networks with a (simple) tree topology.

If a sufficiently large IPv6 subnet (prefix length < /64) is provided via Router Advertisements, a routing node with this module will automatically configure subnets from it by dividing it into sub-prefixes for each downstream interface.

When using the gnrc_ipv6_auto_subnets_simple module, there can only be a single routing node on each level of the network but an arbitrary number of leaf nodes and downstream interfaces.

If there are multiple routing nodes on the same link, coordination between the routers is required. For this the gnrc_ipv6_auto_subnets implements a simple UDP based synchronisation protocol where each router announces the number of subnets they want to create.

The layer 2 address of the sender then determines the order in which the prefixes are assigned.

The downstream network(s) receive the sub-prefix via Router Advertisements and the process repeats until the bits of the prefix are exhausted. The smallest subnet must still have a /64 prefix.

The new subnet must no longer be considered on-link by the hosts in the parent network. Therefore the downstream router will send a router advertisement, which only contains a Route Information Option, to the upstream network. The Route Information Option contains the prefix of the downstream network so that upstream routers will no longer consider hosts in this subnet on-link, but instead will use the downstream router to route to the new subnet.

The need for a Route Information Option

All nodes that want to communicate with hosts in a downstream subnet must implement parsing of the Route Information Option. For routing RIOT nodes this is enabled by default, non-routing nodes need to enable the gnrc_ipv6_nib_rio module.

This is because all addresses in the subnet are also within the original network, so without further information hosts would consider those addresses on-link and perform neighbor solicitation to communicate with them.

E.g. if host Ⓒ (2001:db8:0:8:5075:35ff:fefa:30bc) sends an ICMPv6 Echo request to Ⓑ (2001:db8:0:0:a7a2:12e0:48bc:7487), it would not get a response:

To solve this, the routing node Ⓐ also sends a Router Advertisement to the upstream network that only contains a Route Information Option for each downstream network created by that router. This way hosts in the upstream network will prefer the route via Ⓐ over link-local transmission as it is a stronger match than the upstream prefix:


Simply add the gnrc_ipv6_auto_subnets or gnrc_ipv6_auto_subnets_simple module to the nodes that should act as routers in the cascading network. The upstream network will be automatically chosen as the one that first receives a router advertisement.


file  gnrc_ipv6_auto_subnets.c


 Port for the custom UDP sync protocol.
 Max number of other routers on the same link.
 How often the number subnets should be announced by the routers.
 How long to wait for other routers annoucements before resending or creating subnets when the retry counter is exhausted.
 How many bits of a new prefix have to match the old prefix for it to be considered for replacement. More...
 Number of subnets that can be configured. More...
 Enable this if you have a static network that might experience high packet loss under certain conditions. More...

Macro Definition Documentation



Number of subnets that can be configured.

   This is not needed when using the `gnrc_ipv6_auto_subnets_simple` module.

   If this is set to any number higher than 1, make sure to also configure

Definition at line 153 of file gnrc_ipv6_auto_subnets.c.



How many bits of a new prefix have to match the old prefix for it to be considered for replacement.

Set this if you want to join multiple subnets at the same time.

If you use gnrc_ipv6_auto_subnets instead of gnrc_ipv6_auto_subnets_simple make sure to also set CONFIG_GNRC_IPV6_AUTO_SUBNETS_NUMOF accordingly.

Definition at line 141 of file gnrc_ipv6_auto_subnets.c.



Enable this if you have a static network that might experience high packet loss under certain conditions.

If enabled, this option causes the module to always assume the highest number of subnets it has ever seen. This prevents different/conflicting subnets from being configured if multiple sync packets got lost.

Definition at line 165 of file gnrc_ipv6_auto_subnets.c.