All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lohmann <20h@r-36.net>
To: linux-wpan@vger.kernel.org
Cc: Christoph Lohmann <20h@r-36.net>
Subject: [PATCH] Add a part in the website about how to setup a test network.
Date: Sun, 21 Feb 2016 21:23:08 +0100	[thread overview]
Message-ID: <1456086188-15375-1-git-send-email-20h@r-36.net> (raw)

---
 website/index.txt | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/website/index.txt b/website/index.txt
index 3ac44b6..2f5c539 100644
--- a/website/index.txt
+++ b/website/index.txt
@@ -85,6 +85,47 @@ Note: we don't support any case of short-addresses right now. This is a complica
 Of course we supporting broadcast frames via short-addresses but nothing more in 802.15.4 6LoWPAN.
 Only extended address handling is supported right now.
 
+
+Setup a 6LowPAN test network
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Let's assume you want to setup a 6lowpan test network of six nodes.
+
+---------------------------------------------------------------------
+# we need some Private Area Network ID
+panid="0xbeef"
+# number of nodes
+numnodes=6
+
+# include the kernel module for a fake node, tell it to create six
+# nodes
+modprobe fakelb numlbs=$numnodes
+
+# initialize all the nodes
+for i in $(seq 0 $numnodes);
+do
+	iwpan dev wpan${i} set pan_id 0xbeef
+	ip link wpan${i} name lowpan${i} type lowpan
+	ip link set wpan${i} up
+	ip link set lowpan${i} up
+done
+---------------------------------------------------------------------
+
+Now let us send some data over our network:
+
+---------------------------------------------------------------------
+wireshark -kSl -i lowpan0 &
+# get the IPv6 address of lowpan1
+lowpan1addr="$(ip addr show lowpan1 | grep inet6 \
+	| sed 's,.*inet6 \([^/]*\).*,\1,')"
+# tell ping6 to ping the IPv6 address of lowpan1 and send it via
+# lowpan0
+ping6 ${lowpan1addr}%lowpan0
+---------------------------------------------------------------------
+
+Now watch wireshark and all the nice ICMP packets there.
+
+
 Sniffing
 ~~~~~~~~
 
-- 
2.7.0


             reply	other threads:[~2016-02-21 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 20:23 Christoph Lohmann [this message]
2016-02-22  8:27 ` [PATCH] Add a part in the website about how to setup a test network Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456086188-15375-1-git-send-email-20h@r-36.net \
    --to=20h@r-36.net \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.