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

ng_rpl: auto address configuration #3489

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

cgundogan
Copy link
Member

Use Prefix Information Option for auto address configuration.

@gebart I am not sure if you started to work on this feature yet. This is a very simple implementation and takes the 64 bits of the dodag-id to configure the ipv6 address of all nodes.

Depends on #3050

@cgundogan cgundogan added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: new feature The issue requests / The PR implemements a new feature for RIOT Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: waiting for other PR State: The PR requires another PR to be merged first labels Jul 23, 2015
@jnohlgard
Copy link
Member

I started it, but I got held up with fixing bugs in iphc and at86rf2xx and didn't get further than reading out the prefix information option from the packet, I didn't add any addresses yet.
The code looks OK from a brief overview, I will test it tomorrow. See #3050 for some comments regarding input sanitation that are valid for this commit as well.

@jnohlgard
Copy link
Member

I got a chance to test it, code works for me on Mulle (w/ at86rf212b).

prefix_info->type = NG_RPL_OPT_PREFIX_INFO;
prefix_info->length = NG_RPL_OPT_PREFIX_INFO_LEN;
/* auto-address configuration */
prefix_info->LAR_flags = (1 << 6);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic number

@jnohlgard
Copy link
Member

There are some magic number which should be replaced.

@cgundogan
Copy link
Member Author

replaced magic numbers and make use of the configured prefix length for the interface

@cgundogan
Copy link
Member Author

rebased

@cgundogan cgundogan force-pushed the ng_rpl_prefix_info branch 2 times, most recently from 5eeb95c to e2924c6 Compare July 28, 2015 12:51
@OlegHahm OlegHahm added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Jul 28, 2015
@BytesGalore
Copy link
Member

OK, I just flashed this RP with the NETCONF_OPT_IPV6_IID -> NG_NETOPT_IPV6_IID [1] on two iot-lab_M3 nodes.
I use the ng_networking example initialize one node as root and and one child and they interact sucessfully 👍.
But after a short time the child node removes its parent, sets infinite rank and leaves the DODAG.
Then again after a small time it rejoins the DODAG at the proper Rank 512 and the cycle starts over.
(Just wanted to share my observations)

[1] https://github.com/RIOT-OS/RIOT/pull/3489/files#diff-37d1178ebaace3fc639d9959b59ff5e0R265

@cgundogan
Copy link
Member Author

@BytesGalore could you please try it with this PR merged: #3494 . This helped for me

@BytesGalore
Copy link
Member

ok, will try :)

@cgundogan
Copy link
Member Author

rebased

@BytesGalore
Copy link
Member

nice, the cycling of leaving joining the DODAG does not happen anymore :D
, but the child looses still its parent in cycles

@BytesGalore
Copy link
Member

ok, small update the DODAG cycling still happens but not that fast

@cgundogan
Copy link
Member Author

@BytesGalore could you elaborate more on what "DODAG cycling" means? What is your setup?

@OlegHahm OlegHahm added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Aug 2, 2015
@cgundogan cgundogan force-pushed the ng_rpl_prefix_info branch 6 times, most recently from 99a0a08 to 7798c6b Compare August 10, 2015 09:21
@cgundogan cgundogan force-pushed the ng_rpl_prefix_info branch 2 times, most recently from 94c5249 to a66fc42 Compare August 17, 2015 08:51
@cgundogan cgundogan removed Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Aug 17, 2015
@cgundogan cgundogan force-pushed the ng_rpl_prefix_info branch 2 times, most recently from 76f33cf to 087d292 Compare August 18, 2015 11:04
@OlegHahm OlegHahm removed the State: waiting for other PR State: The PR requires another PR to be merged first label Aug 18, 2015
@OlegHahm
Copy link
Member

I guess this needs a rebase.

@cgundogan
Copy link
Member Author

rebased to current master

/**
* @brief Prefix Information Option
* @see <a href="https://tools.ietf.org/html/rfc6550#section-6.7.10">
* Prefix Information
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @see <a href="https://tools.ietf.org/html/rfc6550#section-6.7.10">
*       RFC6550, section 6.7.10, Prefix Information
*       </a>

@OlegHahm
Copy link
Member

Rebase is required again.

@OlegHahm OlegHahm added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 18, 2015
@cgundogan
Copy link
Member Author

rebased and addressed @OlegHahm's comments

@OlegHahm
Copy link
Member

ACK. Squash please

@cgundogan
Copy link
Member Author

squashed

miri64 added a commit that referenced this pull request Aug 18, 2015
ng_rpl: auto address configuration
@miri64 miri64 merged commit cb63a4e into RIOT-OS:master Aug 18, 2015
@cgundogan cgundogan deleted the ng_rpl_prefix_info branch August 18, 2015 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants