diff --git a/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.puml b/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.puml new file mode 100644 index 0000000000..ea105fd63f --- /dev/null +++ b/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.puml @@ -0,0 +1,32 @@ +' to generate SVG run plantuml -tsvg gnrc_ipv6_auto_subnets-with_rio.puml + +@startuml + +skinparam responseMessageBelowArrow true + +participant "2001:db8:0:0:c8f4:13ff:fece:3f43\n2001:db8:0:8:3c27:6dff:fe25:e95d" as A << (A,#ADD1B2) >> +participant "2001:db8:0:0:a7a2:12e0:48bc:7487" as B << (B,#ADD1B2) >> +participant "2001:db8:0:8:5075:35ff:fefa:30bc" as C << (C,#ADD1B2) >> + +A -> C: RA: I'm a default router, PIO: You can use 2001:db8:0:8::/61 **[broadcast]** +A -> B: RA: I'm not a default router (ltime = 0), RIO: You can reach 2001:db8:0:8::/61 through me **[broadcast]** +group C sends request to B +C -> A: forward PING request to 2001:db8:0:0:a7a2:12e0:48bc:7487 +note right +destination of off-link +use default router to forward it +end note +A --> B: NS: Who has 2001:db8:0:0:a7a2:12e0:48bc:7487? **[broadcast]** +B -> A: NA: Me! +A -> B: PING request from 2001:db8:0:8:5075:35ff:fefa:30bc +end +group B sends reply to C +B -> A: forward PING response to 2001:db8:0:8:5075:35ff:fefa:30bc +note right +destination is in 2001:db8::/60 +but 2001:db8:0:8::/61 is a stronger match +end note +A -> C: PING response from 2001:db8:0:0:a7a2:12e0:48bc:7487 + +end +@enduml diff --git a/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.svg b/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.svg new file mode 100644 index 0000000000..9b42fc828a --- /dev/null +++ b/doc/doxygen/src/gnrc_ipv6_auto_subnets-with_rio.svg @@ -0,0 +1,40 @@ +2001:db8:0:0:c8f4:13ff:fece:3f432001:db8:0:8:3c27:6dff:fe25:e95d2001:db8:0:0:c8f4:13ff:fece:3f432001:db8:0:8:3c27:6dff:fe25:e95d2001:db8:0:0:a7a2:12e0:48bc:74872001:db8:0:0:a7a2:12e0:48bc:74872001:db8:0:8:5075:35ff:fefa:30bc2001:db8:0:8:5075:35ff:fefa:30bcRA: I'm a default router, PIO: You can use 2001:db8:0:8::/61[broadcast]RA: I'mnota default router (ltime = 0), RIO: You can reach 2001:db8:0:8::/61 through me[broadcast]C sends request to Bforward PING request to 2001:db8:0:0:a7a2:12e0:48bc:7487destination of off-linkuse default router to forward itNS: Who has 2001:db8:0:0:a7a2:12e0:48bc:7487?[broadcast]NA: Me!PING request from 2001:db8:0:8:5075:35ff:fefa:30bcB sends reply to Cforward PING response to 2001:db8:0:8:5075:35ff:fefa:30bcdestination is in 2001:db8::/60but 2001:db8:0:8::/61 is a stronger matchPING response from 2001:db8:0:0:a7a2:12e0:48bc:7487 \ No newline at end of file diff --git a/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.puml b/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.puml new file mode 100644 index 0000000000..3f1d9b9020 --- /dev/null +++ b/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.puml @@ -0,0 +1,29 @@ +' to generate SVG run plantuml -tsvg gnrc_ipv6_auto_subnets-without_rio.puml + +@startuml + +skinparam responseMessageBelowArrow true + +participant "2001:db8:0:0:c8f4:13ff:fece:3f43\n2001:db8:0:8:3c27:6dff:fe25:e95d" as A << (A,#ADD1B2) >> +participant "2001:db8:0:0:a7a2:12e0:48bc:7487" as B << (B,#ADD1B2) >> +participant "2001:db8:0:8:5075:35ff:fefa:30bc" as C << (C,#ADD1B2) >> + +A -> C: RA: I'm a default router, PIO: You can use 2001:db8:0:8::/61 **[broadcast]** +group C sends request to B +C -> A: forward PING request to 2001:db8:0:0:a7a2:12e0:48bc:7487 +note right +destination of off-link +use default router to forward it +end note +A --> B: NS: Who has 2001:db8:0:0:a7a2:12e0:48bc:7487? **[broadcast]** +B -> A: NA: Me! +A -> B: PING request from 2001:db8:0:8:5075:35ff:fefa:30bc +end +group B sends reply to C +B -->x A: NS: Who has 2001:db8:0:8:5075:35ff:fefa:30bc? **[broadcast]** +note right +destination is in the same subnet, so it must be on-link. +Send NS to resolve address. +end note +end +@enduml diff --git a/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.svg b/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.svg new file mode 100644 index 0000000000..6b0154c1a3 --- /dev/null +++ b/doc/doxygen/src/gnrc_ipv6_auto_subnets-without_rio.svg @@ -0,0 +1,37 @@ +2001:db8:0:0:c8f4:13ff:fece:3f432001:db8:0:8:3c27:6dff:fe25:e95d2001:db8:0:0:c8f4:13ff:fece:3f432001:db8:0:8:3c27:6dff:fe25:e95d2001:db8:0:0:a7a2:12e0:48bc:74872001:db8:0:0:a7a2:12e0:48bc:74872001:db8:0:8:5075:35ff:fefa:30bc2001:db8:0:8:5075:35ff:fefa:30bcRA: I'm a default router, PIO: You can use 2001:db8:0:8::/61[broadcast]C sends request to Bforward PING request to 2001:db8:0:0:a7a2:12e0:48bc:7487destination of off-linkuse default router to forward itNS: Who has 2001:db8:0:0:a7a2:12e0:48bc:7487?[broadcast]NA: Me!PING request from 2001:db8:0:8:5075:35ff:fefa:30bcB sends reply to CNS: Who has 2001:db8:0:8:5075:35ff:fefa:30bc?[broadcast]destination is in the same subnet, so it must be on-link.Send NS to resolve address. \ No newline at end of file diff --git a/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c b/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c index 7f7858a2ce..71866a4119 100644 --- a/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c +++ b/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c @@ -51,6 +51,30 @@ * 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: + * + * ![Auto-Subnets without RIO](gnrc_ipv6_auto_subnets-without_rio.svg) + * + * 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: + * + * ![Auto-Subnets with RIO](gnrc_ipv6_auto_subnets-with_rio.svg) + * * Usage * ===== *