contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.71k stars 2.58k forks source link

RPL configuration propagation #833

Open joakimeriksson opened 9 years ago

joakimeriksson commented 9 years ago

I have been running ContikiRPL in a network for quite some while now and been tuning some of the configuration parameters including minimal dio interval and number of doublings of the interval. And when they are changed in the border router and I do a global repair the parameters from the last version of the DAG is still there. I do think that this is not specified at all in the RPL RFC but my feeling is that it would be better if all nodes copied over any new configuration from the latest version of the DIO. Any ideas on that? I'd be happy to make a fix for that if there is an agreement that this would be the better behaviour.

laurentderu commented 9 years ago

They are only updated when you join a new instance (which never happens...). The RFC is not crystal clear, but as all the parameters are linked with the current DODAG, you should be able to update them when you increase the version number or change the DODAG ID. (If you update the parameters each time you receive a DIO, you end up with an unstable network as some nodes still broadcast the old set of parameters)

We implemented something like that in order to update a few parameters (mainly DODAG preference and prefix), and so far it works quite well. I was also planning to check how to update all the other parameters.

mcr commented 9 years ago

It is correct; the version number should be incremented. Ideally, the version would be stored into nvram somewhere, in a standard way, such that you could upgrade the firmware on the RPL root and it would continue to increment Version. Incrementing the version is also the only way to get rid of compromised nodes if you have layer-3 security. The other thing that we need is a standard way to interrogate the nodes to determine what their adjancencies really are.