Public IPv6 (6LoWPAN/RPL) network with A8-M3 nodes


Difficulty: High

Duration: 45 minutes

Prerequisites: Configure SSH Access / Understand IPv6 subnetting / Public IPv6/6LoWPAN/RPL network with M3 nodes

Description: The aim of this tutorial is to discover the basics of Contiki uIP stack & tools for IoT-LAB IPv6. You will reserve some A8 nodes on the Grenoble site, set them up with flashing two provided firmwares on the A8-M3 nodes, and create a simple IPv6 network in IoT-LAB. You will access nodes over HTTP over IPv6 from the SSH frontend, using a Contiki tunslip6 bridge.

  1. Log into the Web portal with your account credentials
  2. Submit a new experiment:
    • Set an experiment name (no spaces nor funny chars in the experiment name)
    • Duration: 60 minutes and starting “As soon as possible
    • Choose ten nodes with Architecture m3 (at86rf231) / Site = grenoble / Number = 10 and click “Add to experiment”
  3. Wait experiment state Running in the Schedule dashboard section. After click on experiment details and visualize which nodes you are booked and verify that you have Success in the deployment result
  4. Compile firmwares on SSH frontend and put binaries in the  ~/A8 directory. This directory is shared by each A8 nodes experiment (NFS mount during boot)
    my_computer$ ssh <login>
    <login>@grenoble:~$ cd ~/A8
    <login>@grenoble:~/A8$ git clone
    <login>@grenoble:~/A8$ cd iot-lab
    <login>@grenoble:~/A8/iot-lab$ make setup-contiki 
    • Border Router: bridge between the server and the IoT-LAB IPv6 network
      <login>@grenoble:~$ cd ~/A8/iot-lab/parts/contiki/examples/ipv6/rpl-border-router
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/rpl-border-router$ make TARGET=iotlab-a8-m3
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/rpl-border-router$ ls
      ... border-router.iotlab-a8-m3 ...
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/rpl-border-router$ cp border-router.iotlab-a8-m3 ~/A8
    • HTTP server: simple IPv6 node
      <login>@grenoble:~$ cd ~/A8/iot-lab/parts/contiki/examples/ipv6/http-server
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/http-server$ make TARGET=iotlab-a8-m3
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/http-server$ ls
      ... http-server.iotlab-a8-m3 ...
      <login>@grenoble:~/A8/iot-lab/parts/contiki/examples/ipv6/http-server$ cp http-server.iotlab-a8-m3 ~/A8

    View Border Router and HTTP Server source code on GitHub.

  5. Choose one A8 node (a8-1 in our example) in your nodes list to implement the A8-M3 Border Router (BR) node. A8 nodes still needs some time to boot, so be patient and try ssh connexion
     <login>@grenoble:~$ ssh root@node-a8-1
  6. We compile tunslip6 tool on the A8 node. tunlip6 binary is in the ~/A8 directory so for your next experiments you no longer need to perform this step.
    root@node-a8-1:~# cd A8/iot-lab/parts/contiki/tools
    root@node-a8-1:~/A8/iot-lab/parts/contiki/tools# make tunslip6
  7. Find the A8-M3 node IPv6 prefix corresponding to your A8 node and site you are experimenting on.
    • Note : if you have a public ipv6 address on your computer you can connect directly on the A8 node without the fontend SSH hop (a8 ipv6 public address = INET6_ADDR)
       your_computer:~# ssh -6 root@2001:660:5307:3000::1
  8. Start tunslip6 on the A8 node :
    • root@node-a8-1:~/A8/iot-lab/parts/contiki/tools# ./tunslip6 2001:660:5307:3001::1/64 -v2 -L -s /dev/ttyA8_M3 -B 500000
      10:45:53 ********SLIP started on ``/dev/ttyA8_M3''
      0000.039 opened tun device ``/dev/tun0''
      0000.045 ifconfig tun0 inet `hostname` up
      0000.277 ifconfig tun0 add 2001:660:5307:3001::1/64
      0000.304 ifconfig tun0 add fe80::660:5307:3001:1/64
      0000.331 ifconfig tun0
      tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
                inet addr:  P-t-P:  Mask:
                inet6 addr: 2001:660:5307:3001::1/64 Scope:Global
                inet6 addr: fe80::660:5307:3001:1/64 Scope:Link
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:500 
                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    • Note 1: leave the terminal open (you don’t want to kill tunslip6, it bridges the BR to the front-end network)
  9. Open a new terminal and connect to the a8-1 node. Flash the Border Router (BR) firmware on the A8-M3 node.
    root@node-a8-1:~# flash_a8_m3 A8/border-router.iotlab-a8-m3
  10. Get the Border Router IPv6 address from tunslip output terminal:
    Platform starting in 1... 
    [in clock_init() DEBUG] Starting systick timer at 100Hz
    1114.247  Starting 'Border router process' 'Web server'Server IPv6 addresses:
    1114.247 *** Address:2001:660:5307:3001::1 => 2001:0660:5307:3001

    Note: address provided is link-local address (fe80::b564). In order test IPv6 connectivity of the BR, you should use the adresse construct like this IPv6 chosen prefix + UID64 :

    • prefix 2001:660:5307:3001::/64
    • UID64 ::b564
    • Our BR global IPv6 address is 2001:660:5307:3001::b564
  11. Ping6 BR node using global address:
    <login>@grenoble:~$ ping6 2001:660:5307:3001::b564
  12. View BR’s web-interface:
    <login>@grenoble:~$ lynx -dump http://[2001:660:5307:3001::b564]

    You should see a web page with no neighbors and no routes.

  13. Deploy one HTTP server node picking another A8 node (here a8-2 node)
    <login>@grenoble:~$ ssh root@node-a8-2
    root@node-a8-2:~# flash_a8_m3 A8/http-server.iotlab-a8-m3
  14. Check the BR’s web interface to see the newcomer.
  15. Grab the HTTP server node’s IPv6 address from the BR’s web interface
    2001:660:5307:3001::a461/128 (via fe80::a461) 16711416s

    Understand A8-M3 nodes uid / ipv6 address match.

  16. Ping the HTTP server’s global address from SSH frontend
    <login>@grenoble:~$ ping6 2001:660:5307:3001::a461
  17. Download the page of the first HTTP server:
    <login>@grenoble:~$ lynx -dump http://[2001:660:5307:3001::a461]
    fe80::b564 PREFERRED
    Default Route
  18. Deploy HTTP servers on all A8 remaining nodes and check again the BR’s web-interface (reload) and see the newcomers.
  19. Test public access with an IPv6 proxy. Go to the ipv6 proxy site and use your border router url