All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: RIOT OS kernel developers <devel@riot-os.org>
Cc: linux-wpan@vger.kernel.org
Subject: Re: [riot-devel] RIOT+ULAs: no router entry
Date: Fri, 29 Apr 2016 17:25:03 +0200	[thread overview]
Message-ID: <20160429152458.GA15676@omega> (raw)
In-Reply-To: <3CFBDFC0-3AB2-4931-8BCB-B034EBDC0B9C@mlng.net>

On Fri, Apr 29, 2016 at 04:58:04PM +0200, smlng wrote:
> Hi Alex,
> hi all,
> 
> over the last days I did some more extensive tests and enabled/added some debug output in RIOT, and I got close to the root cause of the problem. 
> 
> TL;DR: 
> - Linux does not set the router flag in its NAs
> - but it should when `radvd` is running (or `radvd` should enable it). 
> - RIOT behaves correctly, according to RFC-4861 7.2.4.
> 
> ----
> 
> Now the slightly longer version; I quickly recap my setup:
> 
> - a RasPi with OpenLabs transceiver, and `radvd` (linux-wpan version from github)
> - Atmel samr21-xpro running RIOT with `gnrc_networking` example (2016.04-branch)
> - `radvd` announces a ULA-prefix (though ULA doesn't matter, could global as well)
> 
> I observed the following behavior:
> 
> - RIOT send RS on boot, `radvd` on RasPi replies with RA (incl. PIO, ABRO, SLLAO)
> - RIOT parse RA, generates IP from prefix, adds NCE for router with router flag set
> - RIOT send NS for RasPi/routers link-local address -> RasPi replies with NA
> - RIOT parses NA, but router flag not set -> unset router flag in NCE of router
> - hence no more router in cache -> no ping or data transfer via non-link-local (e.g. ULA) IPs 
> 
> so my question @alex and @linux-wpan: can I manually set/enable the routers flag for NAs in Linux Kernel? Or somehow _convince_ `radvd` to do so on startup?

Routers are indicated by the "forwarding" setting. radvd silent warns
about that if this isn't set for interfaces with RA advert is on, so far I
know you need to increase the debug level for that.

I simple set:

echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

this will set forwarding for all interfaces.

Some code explaining:

See http://lxr.free-electrons.com/source/net/ipv6/ndisc.c#L838

this is at function when NS is received, the routeri flag will be set when
forwarding is enabled.

Maybe this solves all your current issues. :-)

> I'm running latest Raspbian with Kernel 'Linux raspberrypi 4.1.19+' and wpan-tools from github on the RasPi.
> 

I would better use bluetooth-next, if possible. With all recent patches
you could also try to use 6CO in radvd.

btw: the radvd wants to accept my patches for 6lowpan 6CO stuff, but
basic 6LoWPAN-ND (first short address support for NA/NS) will be added
and short-address handling will not work with RIOT, but that's another
issue...

- Alex

  reply	other threads:[~2016-04-29 15:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <B354489C-54BF-4CAF-8B41-04A946D83478@mlng.net>
     [not found] ` <20160422102833.GA5671@omega>
     [not found]   ` <7BCB9BD8-C255-458C-83F6-0F7FE69F5C7F@mlng.net>
     [not found]     ` <20160422122816.GA6364@omega>
2016-04-24 20:05       ` [riot-devel] RIOT+ULAs: no router entry Alexander Aring
2016-04-24 20:31         ` Alexander Aring
2016-04-29 14:58           ` smlng
2016-04-29 15:25             ` Alexander Aring [this message]
2016-04-29 17:06               ` smlng

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=20160429152458.GA15676@omega \
    --to=alex.aring@gmail.com \
    --cc=devel@riot-os.org \
    --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.