-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnrc_netif: add option to always join solicited-node multicast group (for connectivity across border router restart) #16988
Conversation
A border router will send a neighbor solicitation to the solicited-node multicasts if it encounters a packet from a global address that is not registered with the border router. This happens when the border router is restarted while some nodes were online. As the nodes were not in the solicited-node multicast group, they would drop the neighbor solicitation which resulted in them not being able to route any packets through the border router until they would reboot themself (or their prefix expired). To fix this, always join the solicited-node multicast address as a 6LN. This allows to have a connection across BR restarts.
sys/net/gnrc/netif/gnrc_netif.c
Outdated
} | ||
#else /* CONFIG_GNRC_IPV6_NIB_ARSM */ | ||
if (!gnrc_netif_is_6ln(netif)) { | ||
if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ARSM) || gnrc_netif_is_6ln(netif)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://datatracker.ietf.org/doc/html/rfc6775#section-5.2
There is no need to join the solicited-node multicast address, since
nobody multicasts NSs in this type of network. A host MUST join the
all-nodes multicast address.
IMHO this should be made configurable for 6LNs (and default turned off), so a user can set it in accordance with their respective use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, I just don't see why this should not be enabled. To me this appears like a case of 'broken defaults'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nobody multicasts NSs in this type of network
Is this a bug on the border router then? Because it clearly does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.1. Forbidden Actions
A host MUST NOT multicast an NS message.
so if BR does it is a bug in BR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like how ipv6 avoids broadcast by doing multicast -> then some extensions happens and there should not be any multicast NS but there is no broadcast -> so it is an all-multicast which by the wording is no multicast
It it close to some philosophy discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rfc6775 seems to define a essential part
of
rfc4861 illegal
rfc4861 sec 4.1
destination address: Either the solicited-node multicast address
corresponding to the target address, or the target address.
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
The thing is: why not have this as default when |
@benpicco, where are we at here? |
Waiting for a response from @miri64 |
I think I have also recently discovered this. My fix was #if !CONFIG_GNRC_IPV6_NIB_6LR
# ifndef CONFIG_GNRC_IPV6_NIB_ARSM
# define CONFIG_GNRC_IPV6_NIB_ARSM 0
# endif
# ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
/* only needs to store default router */
# define CONFIG_GNRC_IPV6_NIB_NUMOF (1)
# endif
#endif I think it can actually be enabled by default, even when we are a host (RFC4861) On Linux, an interface also joins the solicited-node multicast address, even if it only has a link local address:
|
Ah true, 6LN host ... |
#11038 suggests Linux here behaves the same as our |
hm, because @miri64 is, right. Technically the RFC clearly says that a 6LN host is not supposed to join that group. Linux somehow does join the group, also as a 6LN host. Maybe the kernel does not fully support RFC6775.
I am not saying that I am against a configuration flag to force-join the group. |
Yes, Linux does not implement RFC 6775 and uses normal (energy-intensive) NDP with 6LoWPAN. |
The compromise, if it yields a problem in communication with Linux: Deactivate 6Lo-ND completely. This of course increases multicast messages within the network. |
With the description in https://forum.riot-os.org/t/telnet-server-example/3893/2:
Is this really a bug then? If a (6LN) node did not register its address, the address is not valid anyways, so why would the border router need to send to those addresses? |
With #20046 merged this PR does not make sense anymore. |
Contribution description
A border router will send a neighbor solicitation to the solicited-node multicasts if it encounters a packet from a global address that is not registered with the border router.
This happens when the border router is restarted while some nodes were online.
As the nodes were not in the solicited-node multicast group, they would drop the neighbor solicitation which resulted in them not being able to route any packets through the border router until they would reboot themself (or their prefix expired).
To fix this, always join the solicited-node multicast address as a 6LN.
This allows to have a connection across BR restarts.
Testing procedure
To make sure the border router retains it's address across reboots, we have to provide it with a EUI-64:
ARSM is enabled for routers, so to reproduce this our node must be a simple 6LN:
native
) border router:We can now
reboot
the border router, our node keeps it's packets routed:compared to the situation on
master
:Issues/PRs references