Automatic configuration for cascading subnets. More...
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.
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
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_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.
|Port for the custom UDP sync protocol. More...|
|Max number of other routers on the same link. More...|
|How often the number subnets should be announced by the routers. More...|
|How long to wait for other routers announcements before resending or creating subnets when the retry counter is exhausted. More...|
|How many bits of a new prefix have to match the old prefix for it to be considered for replacement. More...|
|Minimal length of a new prefix. 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...|
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_NUMOF (1)|
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 CONFIG_GNRC_IPV6_AUTO_SUBNETS_PREFIX_FIX_LEN to suit your setup.
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_PEERS_MAX (4)|
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_PORT (16179)|
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_PREFIX_FIX_LEN (0)|
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.
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_PREFIX_MIN_LEN (0)|
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_STATIC (0)|
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.
|#define CONFIG_GNRC_IPV6_AUTO_SUBNETS_TIMEOUT_MS (50)|