diff mbox

Add a part in the website about how to setup a test network.

Message ID 1456086188-15375-1-git-send-email-20h@r-36.net (mailing list archive)
State Accepted
Headers show

Commit Message

Christoph Lohmann Feb. 21, 2016, 8:23 p.m. UTC
---
 website/index.txt | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Alexander Aring Feb. 22, 2016, 8:27 a.m. UTC | #1
Hi,

thanks. Applied and re-generate the website.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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
 ~~~~~~~~