Difference between revisions of "Analyse of a real 6LoWPAN network using a Contiki-based sniffer module"

From Contiki
Jump to: navigation, search
Line 9: Line 9:
 
* '''Basics of working with IPv6:'''<br>
 
* '''Basics of working with IPv6:'''<br>
 
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br>
 
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br>
::FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123<br>
+
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre>
 
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br>
 
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br>
 
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br>
 
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br>
Line 35: Line 35:
 
Foren6 Installation:<br>
 
Foren6 Installation:<br>
 
* Dependencies<br>
 
* Dependencies<br>
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br>
+
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre>
 
* Get the Source<br>
 
* Get the Source<br>
:git clone https://github.com/cetic/foren6.git<br><br>
+
<pre>git clone https://github.com/cetic/foren6.git</pre>
 
* Install Foren6<br>
 
* Install Foren6<br>
:cd foren6<br>
+
<pre>cd foren6
:make<br>
+
make
:sudo make install<br><br>
+
sudo make install</pre>
  
 
== Collect-view on Tmote-Sky ==
 
== Collect-view on Tmote-Sky ==

Revision as of 13:56, 9 November 2014

Back to Contiki Tutorials

Introduction

  • This tutorial is an introduction to IP-based sensor networks with Contiki.
  • Contiki has supported IP networking, through the uIP TCP/IP stack, since its first released in 2003. In 2008, Cisco released the world's smallest IPv6 stack, called uIPv6, for Contiki.
  • 6LoWPAN: is an acronym of IPv6 over Low power Wireless Personal Area Networks. The 6LoWPAN group has defined encapsulation and header compression mechanisms that allow IPv6 packets to be sent to and received over IEEE 802.15.4 based networks.
  • Basics of working with IPv6:
+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-
FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123
+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)
The loopback address (::1) is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS).
The local-link addresses (FE80::/10) is used to communicate with devices in the same link (however, the link can be extended with Layer 2 switches).
The global addresses (everything else) are used for communicating devices globally.
6LoWPAN Wireless Sensor Network

You will learn

This tutorial will walk you through the steps of setting up Contiki to sniff 6LoWPAN packets and visualize a real time wireless sensor network (WSN) in an interactive environment of Foren6. You will deploy UDP server-client IPv6 example on Tmote-Sky motes and sniff the packets on particular RF channel (1-26) (Note: In Contiki RF Channel range from 11-26) on a Tmote-Sky. You will install Foren6 and learn how to integrate a Tmote-sky with real-time diagnosis tool.

Foren6: A 6LoWPAN Diagnosis tool

Real layout of WSN

Foren6 is an effort to provide a noReal layout of WSNn-intrusive 6LoWPAN network analysis tool. It leverages passive sniffer devices to reconstruct a visual and textual representation of network information to support real-world Internet of Things applications where other means of debug (cabled or network-based monitoring) are too costly or impractical.

  • Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.
  • Foren6 captures all RPL-related information and identifies abnormal behaviors.
  • Multiple sniffers can be combined for extended coverage.
  • Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.


Installation guide

Requirements:

  • System with Linux/MacOS X

  • For the purpose of this tutorial it is assumed that you already have a working Contiki 2.7 environment set up on your system and have access to at least three Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation

Foren6 Installation:

  • Dependencies
sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc
  • Get the Source
git clone https://github.com/cetic/foren6.git
  • Install Foren6
cd foren6
make
sudo make install

Collect-view on Tmote-Sky

Configuring the sniffer for real time capture

Results

Future Scope

  • You can also use Cooja (Network Simulator) to analyze an network. In Cooja use "Radio Message with a 6LoWPAN analyzer with pcap export" to store the packet capture in pcap format. Thus you can then use Wireshark or Foren6 to visualize the network and debug it.
References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja
http://sourceforge.net/p/contiki/mailman/message/30604147/
Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap

References

http://cetic.github.io/foren6/index.html
http://cetic.github.io/foren6/example2.html
http://cetic.github.io/foren6/install.html
http://en.wikipedia.org/wiki/6LoWPAN
http://anrg.usc.edu/contiki/index.php/Collect_View
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw

Back to Contiki Tutorials