From patchwork Sun Feb 21 20:23:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Lohmann <20h@r-36.net> X-Patchwork-Id: 8369361 Return-Path: X-Original-To: patchwork-linux-wpan@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36081C0553 for ; Sun, 21 Feb 2016 20:31:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 533FF202C8 for ; Sun, 21 Feb 2016 20:31:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A515B203B0 for ; Sun, 21 Feb 2016 20:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751106AbcBUUb0 (ORCPT ); Sun, 21 Feb 2016 15:31:26 -0500 Received: from r-36.net ([78.46.55.227]:36250 "EHLO r-36.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbcBUUbZ (ORCPT ); Sun, 21 Feb 2016 15:31:25 -0500 Received: by r-36.net (Postfix, from userid 5011) id CA8FB12A4140B; Sun, 21 Feb 2016 21:23:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost (p579325BE.dip0.t-ipconnect.de [87.147.37.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: chrissi) by r-36.net (Postfix) with ESMTPSA id 4721A1021B7D9; Sun, 21 Feb 2016 21:23:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=r-36.net; s=mail; t=1456086200; bh=us6oNUbhVTIGjd1is4O2htg8bLVqDG10/Lmccfr7hF4=; h=From:To:Cc:Subject:Date; b=SNvMRVmc6u5MG/YiJyVpg8izGYD1rTNCu3QTV7e22Qdd5tFclsFUg9+/TOL9DcES0 4rIbWyMizeTS8Y/h60uObpi8ei35GUVlx0Qx+DeOZ5QmAoA/MnyuddBz7G29HW+kFD NCYNuNhlxnuA5ehoZ1Zs8h9oyXW4ky4OMFkQVynA= 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 Message-Id: <1456086188-15375-1-git-send-email-20h@r-36.net> X-Mailer: git-send-email 2.7.0 Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- 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 ~~~~~~~~