Initial import of task-09 (basic RPL)#18
Conversation
- Adapt main README with titles of tasks - add links to prev/next task in task-07/08
|
|
||
| # Task 9: RIOT and RPL | ||
|
|
||
| This task will demonstrate basic routing functionalities in RIOT provided by the RPL (IPv6 Routing Protocol for Low-Power and Lossy Networks) routing protocol and multihop communication. |
There was a problem hiding this comment.
please reference https://tools.ietf.org/html/rfc6550 when talking about RPL
9d14230 to
07d2bfe
Compare
|
@cgundogan please check out the latest commits! |
| * Each group should change to an individual RF channel. It can be changed by e.g. | ||
|
|
||
| ``` | ||
| ifconfig 7 set chan 11 |
There was a problem hiding this comment.
Please be more generic (use <if_id> instead of 7). 7 could change in the future
| ## Task 9.1: Initialize RPL | ||
|
|
||
| * In order to use RPL we have to choose **one** RPL root node and configure a global IPv6 address for it. This is simply done by adding the address to the network interface (`7`) via `ifconfig`: | ||
| (Please note that the network interface is `6` when running on native) |
There was a problem hiding this comment.
use a more generic <if_id>. here and all following
| ## Prerequisites | ||
|
|
||
| * Compile the application and run on your `BOARD` | ||
| * Build groups of at least three persons |
There was a problem hiding this comment.
maybe be more generic? instead of "group of persons" just "gather 3 boards"?
|
|
||
| * On not-root nodes, look at the output of `ifconfig` again. You should see that a global unicast IPv6 address has been set automatically. | ||
|
|
||
| * Typing `rpl` gives you some information about the nodes position in the DODAG. Check the local IPv6 address of the selected parent node. Look for value `R:` which describes the "rank" or more general, the hop count metric. What is the increment for one hop? |
There was a problem hiding this comment.
Look for value R: which describes the "rank" or more general, the hop count metric. the position in the DODAG according to the metric.
| msg_receive(&msg); | ||
| gnrc_pktsnip_t *pkt = msg.content.ptr; | ||
| if(msg.type == GNRC_NETAPI_MSG_TYPE_SND) { | ||
| ipv6_hdr_t *ipv6_hdr = pkt->next->data; |
There was a problem hiding this comment.
using LL_SEARCH to search for the ipv6 packet may be more appropriate, in case there is something in between?
| char addr_str[IPV6_ADDR_MAX_STR_LEN]; | ||
| char addr_str2[IPV6_ADDR_MAX_STR_LEN]; | ||
| printf("IPv6 ROUTER: forward from src = %s, to dst = %s\n", | ||
| ipv6_addr_to_str(addr_str, &(ipv6_hdr->src), sizeof(addr_str)), |
There was a problem hiding this comment.
btw: you can use the same addr_str buffer for ipv6_addr_to_str if you split this into two printf calls
| @@ -0,0 +1,59 @@ | |||
| From f806bf796c60ded00c0abb4521c9bc3955efd63f Mon Sep 17 00:00:00 2001 | |||
| * Next we need to initialize RPL on the network interface (`<if_id>`) for **all** nodes: | ||
|
|
||
| ``` | ||
| rpl init <if_id> |
There was a problem hiding this comment.
you don't need this when including in your makefile: USEMODULE += auto_init_gnrc_rpl
d734bd2 to
0578680
Compare
|
ACK & GO |
No description provided.