Giter VIP home page Giter VIP logo

Comments (11)

philok93 avatar philok93 commented on June 11, 2024

By default, whitefield uses NODEID=0 and incrementally assigns node ids to all the other nodes. However, NODEIDs can be renumbered in Whitefield i.e., Whitefield can start with any nodeids as configured in config/wf.cfg & helpers.sh. @philok93 identified that certain commands/scripts (wfshell plot_network) does not work when renumbering is done.

Hi, do you have any updates on this? I think the problem is how the nodes are stored in arrays as they start from 0 the numbering (just what I understand from the code).

from whitefield.

nyrahul avatar nyrahul commented on June 11, 2024

I checked the plot_networks implementation (when I fixed the graph scaling problem) and it should work with multiple sinks (BRs/udp-servers).

plot_network does not depend on any specific node ID i.e., it should plot the network based on default routes in the network. Earlier there was an issue that unconnected node were not shown up, but that has been fixed now. I am sure in your case the default routes are not populated properly i.e., RPL operations under the hood have some issues. If you think otherwise, can you paste the cmd_def_route output here?

from whitefield.

philok93 avatar philok93 commented on June 11, 2024

I checked the plot_networks implementation (when I fixed the graph scaling problem) and it should work with multiple sinks (BRs/udp-servers).

plot_network does not depend on any specific node ID i.e., it should plot the network based on default routes in the network. Earlier there was an issue that unconnected node were not shown up, but that has been fixed now. I am sure in your case the default routes are not populated properly i.e., RPL operations under the hood have some issues. If you think otherwise, can you paste the cmd_def_route output here?

The plotting now works when NODEID starts from 0 as normal. But if I change the config to NODEID+1 I get always an error for the last node in the monitor:

rcvd src id=22 out of range!!

So how we could fix the problem of changing nodeid to start from 1 and not 0? You tested it?

from whitefield.

nyrahul avatar nyrahul commented on June 11, 2024

This error is from AirlineManager (NS3) module. I just checked the code and there are dependencies on nodeids numbered from 0 onwards in Airline.

image

These checks can be removed but needs to be tested properly. There are several such checks AirlineManager.cc. Are you willing to experiment with it?

Also, I just created a slack env for Whitefield whitefieldhq.slack.com ... It will be faster to communicate there.

from whitefield.

philok93 avatar philok93 commented on June 11, 2024

This error is from AirlineManager (NS3) module. I just checked the code and there are dependencies on nodeids numbered from 0 onwards in Airline.

image

These checks can be removed but needs to be tested properly. There are several such checks AirlineManager.cc. Are you willing to experiment with it?

Also, I just created a slack env for Whitefield whitefieldhq.slack.com ... It will be faster to communicate there.

Well I think I can try to test it after you make the changes as I see sometimes contiki-ng/wfradio confuses the destination when is set to node 0 with the address ffff. And maybe the problem is the numbering. So, if you can make the changes give me some time to test it.
How can I register in whitefield slack?

from whitefield.

nyrahul avatar nyrahul commented on June 11, 2024

Can you state the reason for starting the NODEID at 1 and not zero?

I looked into the code and changing nodeid needs some work. However, if that is the only way to solve the problem then I am willing to make the change. I just need to get the use-case clear.

from whitefield.

philok93 avatar philok93 commented on June 11, 2024

Can you state the reason for starting the NODEID at 1 and not zero?

I looked into the code and changing nodeid needs some work. However, if that is the only way to solve the problem then I am willing to make the change. I just need to get the use-case clear.

Well the only issue that I am not 100% is caused by whitefield is that sometimes I see contiki-ng/wfradio confuses the destination when is set to node 0 with the address ffff. I will test again and if this is not a problem you can leave this change for later. I think the other issues we discussed are more important for me now. We can come later to this discussion.

from whitefield.

philok93 avatar philok93 commented on June 11, 2024

Hi Rahul,
hope you are fine. I would like to register in slack so we can discuss there.
I debugged the cooja simulator and whitefield to compare the behaviour of contiki-ng. I see that whitefield starts to add IPv6 route when a node is initialized (udp-client):

[INFO: IPv6 DS   ] Adding prefix fe80::length 64, flags 0, Valid lifetime 0, Preffered lifetime 0
[INFO: RPL       ] initializing
[INFO: Main      ] Tentative link-local IPv6 address: fe80::302:304:506:6
[INFO: whitefield] Added global IPv6 address fd00::302:304:506:6
[INFO: IPv6 Route] Add default
[INFO: IPv6 Route] Add default: adding default route to fd00::1
[INFO: whitefield] MAC wfmac NETWORK sicslowpan
[INFO: whitefield] route_table_max_sz=15,nbr_table_max_sz=15
[INFO: wfradio   ] RECV ret:96 src:1 dst:ffff len:80 flags:0

This is not normal because in cooja nodes don't have any default route when they start. Here is the normal log from cooja:


00:01.122 | ID:6 | [INFO: IPv6 DS   ] 3 prefixes
00:01.124 | ID:6 | [INFO: IPv6 DS   ] 0 routes
00:01.127 | ID:6 | [INFO: IPv6 DS   ] 3 unicast addresses
00:01.130 | ID:6 | [INFO: IPv6 DS   ] 5 multicast addresses
00:01.133 | ID:6 | [INFO: IPv6 DS   ] 2 anycast addresses
00:01.141 | ID:6 | [INFO: IPv6 DS   ] Adding prefix fe80::length 64, flags 0, Valid lifetime 0, Preffered lifetime 0
00:01.143 | ID:6 | [INFO: RPL       ] initializing
00:42.372 | ID:6 | [INFO: RPL       ] sending a DIS to ff02::1a
00:42.376 | ID:6 | [DBG : IPv6      ] Upper layer checksum len: 6 from: 40
00:42.382 | ID:6 | [INFO: ICMPv6    ] Sending ICMPv6 packet to ff02::1a, type 155, code 0, len 2
00:43.078 | ID:6 | NBR TABLE:
00:43.080 | ID:6 | 00 08 [1:0] [0:0] [0:0]
00:43.087 | ID:6 | [INFO: IPv6      ] packet received from fe80::c30c:0:0:8 to ff02::1a
00:43.091 | ID:6 | [INFO: IPv6      ] icmpv6 input length 46 type: 155 0
00:43.095 | ID:6 | [DBG : IPv6      ] Upper layer checksum len: 6 from: 40
00:43.099 | ID:6 | [WARN: RPL       ] dis_input: not in an instance yet, discard
00:45.766 | ID:6 | NBR TABLE:
00:45.768 | ID:6 | 00 08 [1:0] [0:0] [0:0]
00:45.770 | ID:6 | 01 01 [1:0] [0:0] [0:0]
00:45.777 | ID:6 | [INFO: IPv6      ] packet received from fe80::c30c:0:0:1 to ff02::1a
00:45.782 | ID:6 | [INFO: IPv6      ] icmpv6 input length 116 type: 155 1
00:45.786 | ID:6 | [DBG : IPv6      ] Upper layer checksum len: 76 from: 40
00:45.798 | ID:6 | [INFO: RPL       ] received a multicast-DIO from fe80::c30c:0:0:1, instance_id 0, DAG ID fd00::c30c:0:0:1, version 240, dtsn 240, rank 128
00:45.804 | ID:6 | [INFO: RPL       ] adding global IP address fd00::c30c:0:0:6
00:45.808 | ID:6 | [INFO: RPL       ] reset MRHOF
00:45.818 | ID:6 | [INFO: RPL       ] initialized DAG with instance ID 0, DAG ID fd00::c30c:0:0:1, prefix fd00::/64, rank 65535
00:45.823 | ID:6 | [WARN: RPL       ] just joined, no parent yet, setting timer for leaving
00:45.825 | ID:6 | [INFO: IPv6 Nbr  ] ds6 enter
00:45.826 | ID:6 | NBR TABLE:
00:45.828 | ID:6 | 00 08 [1:0] [0:0] [0:0]
00:45.831 | ID:6 | 01 01 [1:0] [1:0] [0:0]
00:45.839 | ID:6 | [INFO: IPv6 Nbr  ] Adding neighbor with ip addr fe80::c30c:0:0:1 link addr c10c.0000.0000.0001 state 1

Route in cooja node is added when there is a parent switch:

00:50.145 | ID:6 | [INFO: RPL       ] parent switch: (NULL IP addr) -> fe80::c30c:0:0:1
00:50.149 | ID:6 | [INFO: IPv6 Route] Add default
00:50.156 | ID:6 | [INFO: IPv6 Route] Add default: adding default route to fe80::c30c:0:0:1

Here is the log from whitefield when a packet is found:

[INFO: IPv6 Route] Looking up route for fd00::302:304:506:1
[WARN: IPv6 Route] No route found
[INFO: IPv6 Route] Default route, IP address fd00::1
[INFO: IPv6 Route] Default route Incomplete found, IP address fd00::1
[INFO: IPv6 Nbr  ] ds6 enter
here
NBR TABLE:
 00 01 [1:0] [1:0] [0:0] [1:0]
 01 00 [1:0] [0:0] [0:0] [0:0]
 02 04 [1:0] [0:0] [0:0] [0:0]
 03 03 [1:0] [1:0] [0:0] [0:0]
 04 06 [1:0] [1:0] [0:0] [1:0]
 05 05 [1:0] [0:0] [0:0] [0:0]
 06 02 [1:0] [0:0] [0:0] [0:0]
 07 11 [1:0] [0:0] [0:0] [0:0]
 08 08 [1:0] [0:0] [0:0] [0:0]
 09 10 [1:0] [0:0] [0:0] [0:0]
 10 09 [1:0] [0:0] [0:0] [0:0]
 11 07 [1:0] [0:0] [0:0] [0:0]
 12 01 [0:0] [1:0] [0:0] [0:0]
[INFO: IPv6 Nbr  ] Adding neighbor with ip addr fd00::1 link addr 0200.0000.0000.0001 state 1

So it means for some reason whitefield adds the default route to fd00:1. Can you have a look please?

from whitefield.

nyrahul avatar nyrahul commented on June 11, 2024

I can see that contiki-ng native platform adds default route during startup:

Check native/platform.c set_global_address() and you will find the line which adds the def route.

However, cooja/platform.c does not seem to be doing this.

image

Now I don't know why native is doing it but not cooja. You can simply comment out the def route addition in native/platform.c and imo it should work.

Sorry about the slack. Looks like external members can add themselves to slack only on invitation. Let's use gitter for chat (you had already sent a msg there previously).

from whitefield.

philok93 avatar philok93 commented on June 11, 2024

Thanks a lot, now works fine and plot network shows only the nodes that have a route.

from whitefield.

nyrahul avatar nyrahul commented on June 11, 2024

Decided not to change nodeid handling in Whitefield.

from whitefield.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.