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.
- Log into the Web portal with your account credentials
- 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”
- 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
- 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>@grenoble.iot-lab.info <login>@grenoble:~$ cd ~/A8 <login>@grenoble:~/A8$ git clone https://github.com/iot-lab/iot-lab.git <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.
- Border Router: bridge between the server and the IoT-LAB IPv6 network
- 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 root@node-a8-1:~#
- 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
- Find the A8-M3 node IPv6 prefix corresponding to your A8 node and site you are experimenting on.
root@node-a8-1:~#printenv INET6_PREFIX_LEN=64 INET6_PREFIX=2001:660:5307:3001 GATEWAY6_ADDR=2001:660:5307:3000:ff:: INET6_ADDR=2001:660:5307:3000::1/64
- 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
- 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)
- 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:10.0.12.1 P-t-P:10.0.12.1 Mask:255.255.255.255 inet6 addr: 2001:660:5307:3001::1/64 Scope:Global inet6 addr: fe80::660:5307:3001:1/64 Scope:Link UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 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)
-
- 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
- Get the Border Router IPv6 address from tunslip output terminal:
... Platform starting in 1... GO! [in clock_init() DEBUG] Starting systick timer at 100Hz 1114.247 Starting 'Border router process' 'Web server'Server IPv6 addresses: fe80::b564 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
- Ping6 BR node using global address:
<login>@grenoble:~$ ping6 2001:660:5307:3001::b564
- 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.
Neighbors Routes
- 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
- Check the BR’s web interface to see the newcomer.
- Grab the HTTP server node’s IPv6 address from the BR’s web interface
Neighbors fe80::a461 Routes 2001:660:5307:3001::a461/128 (via fe80::a461) 16711416s
Understand A8-M3 nodes uid / ipv6 address match.
- Ping the HTTP server’s global address from SSH frontend
<login>@grenoble:~$ ping6 2001:660:5307:3001::a461
- Download the page of the first HTTP server:
<login>@grenoble:~$ lynx -dump http://[2001:660:5307:3001::a461] Neighbors fe80::b564 PREFERRED Default Route fe80::b564 Routes
- Deploy HTTP servers on all A8 remaining nodes and check again the BR’s web-interface (reload) and see the newcomers.
- Test public access with an IPv6 proxy. Go to the ipv6 proxy site and use your border router url
http://[2001:660:5307:3001::b564]