Skip to content
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

Bug: gnrc_rpl: some nodes are not reachable in the network #17332

Closed
fastriker opened this issue Dec 3, 2021 · 6 comments
Closed

Bug: gnrc_rpl: some nodes are not reachable in the network #17332

fastriker opened this issue Dec 3, 2021 · 6 comments
Assignees

Comments

@fastriker
Copy link

Description

I build up a RPL network with 8 nodes. Some nodes are not reachable via ping. The unreachable nodes also do not reach any other nodes. The reachable part of the network works as expected. With different root nodes or change between 2.4 GHz and SubGHz the reachable or unreachable nodes change. The unreachable nodes show that they are part of the RPL network.

I try to figure out the problem already for quite some time. I also wonder, if I made any configuration mistakes. I am happy to provide further information if needed or try out specific approach that can solve my issue or lead to its solution.

Steps to reproduce the issue

Nodes are normally reachable within one, sometimes two hops. The unmodified gnrc_networking example was used for the test.

The hardware:

  • Board: Nucleo F767ZI
  • Transceiver: AT86RF215
  • Custom board files from @maribu .

The following steps shows the issue:

  • setup 8 nodes
  • give an IP on all nodes - for example on interface 7 with ifconfig 7 add 2001:db7::x where x is the node number
  • initialize RPL on all nodes - for example with rpl init 7 for interface 7
  • make one node the root node - for example node 7 with rpl root 1 2001:db7::7
  • ping each other on all nodes - for example node 1 with ping -c 30 -i 1000 2001:db7::1 ?s40

I attached some log files for every node showing the problem for one specific try:

Expected results

Every node respond to every other nodes ping.

Actual results

Some nodes do not respond any ping except if send pings to themself.

Versions

RIOT: 2021.10 (also some random previous versions)

@benpicco
Copy link
Contributor

benpicco commented Dec 3, 2021

This is likely related to #17327.
gnrc_rpl can create some… interesting routing table entries:

> ifconfig
Iface  7  HWaddr: 1E:36  Channel: 26  NID: 0x23 
          Long HWaddr: 5E:41:E9:71:2F:8C:9E:36 
          L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::5c41:e971:2f8c:9e36  scope: link  VAL
   -->    inet6 addr: 2001:db8::5c41:e971:2f8c:9e36  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff8c:9e36
          inet6 group: ff02::1a
          
          Statistics for Layer 2
            RX packets 587  bytes 41706
            TX packets 622 (Multicast: 436)  bytes 47016
            TX succeeded 1246 errors 0
          Statistics for IPv6
            RX packets 585  bytes 52908
            TX packets 579 (Multicast: 436)  bytes 56900
            TX succeeded 579 errors 0

> nib route
2001:db8::/64 dev #7
2001:db8::a425:71ad:dfbc:8e26/128 via fe80::a425:71ad:dfbc:8e26 dev #7
2001:db8::5c41:e971:2f8c:9e36/128 via fe80::a425:71ad:dfbc:8e26 dev #7 <--
2001:db8::7cb7:4dfb:f754:56fe/128 via fe80::a425:71ad:dfbc:8e26 dev #7
default* via fe80::b87c:18e4:c045:65af dev #7

And I don't even have to change the topology for that.

@fastriker
Copy link
Author

Thank you for your fast reply and the link to the probably related issue!

I run my setup again but this time I also print out the routing table:

For me the routing tables are looking fine, except the missing entries at node 7 for the unreachable nodes. However, I am not sure if I understood the problem completely.

@cgundogan
Copy link
Member

cgundogan commented Dec 6, 2021

Just a quick comment without looking so much into the details for now:

give an IP on all nodes - for example on interface 7 with ifconfig 7 add 2001:db7::x where x is the node number

You should set a global IPv6 address only for the root node (in your case node 7). All other nodes will generate an IPv6 address based on their link-layer address as soon as they join the DODAG. I could imagine that you already maxed out the IPv6 address memory space (the NIB array, what is used for printf when you type ifconfig). Another issue with large deployments can be that the routing table has not enough memory. Look here for a couple of configrations to tweak the array sizes (in case you have a large deployment).

@fastriker
Copy link
Author

Thank you very much, increasing the array size solved my issue! I am using 8 nodes currently, but they are nearly forming a complete graph.
I set IPv6 addresses for all nodes, because it was easier for me to address them. What are the reasons, that only the root node should get an address?

@miri64
Copy link
Member

miri64 commented Dec 7, 2021

What are the reasons, that only the root node should get an address?

RPL has native support for auto-address configuration via its prefix information option, so you already get a global address. Since space is limited, the default configuration only allows for a limited number of IPv6 addresses, so if you already add a global address, you might run into a similar problem as previously mentioned, since the address array is too small. See also https://doc.riot-os.org/group__net__gnrc__netif__conf.html#ga366596e311b4a450887a1a180ae66fb3.

@fastriker
Copy link
Author

Ok, that's clear - thank you for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants