[riot-devel] new network stack mini howto

Kaspar Schleiser kaspar at schleiser.de
Sun Apr 12 11:33:01 CEST 2015

Hey Martine,

thanks a lot, that was what I was looking for!

On 04/11/15 22:31, Martine Lenders wrote:
> Just take the current ng_icmpv6/feat/initial branch in my repo (PR'ed in
> #2555) + your favorite device driver. Start your device in a nomac
> thread (look into tests/driver_xbee for how to do it) and add
> ng_icmpv6_echo, ng_netbase and ng_nomac to your application's modules.
> Currently you have to set up your local IP addresses by hand using
> ifconfig in the shell and you also have to populate the neighbor cache
> with the ncache command.
That's exactly what I needed. I can now ping6 a native instance of riot 
using the dev_eth+tap driver.

What I stumpled upon on the way:

- also have to populate the neighbour cache of the Linux box I used to 
ping from (doh)

- our native tap drivers take the mac address from the tap interface. if 
using the same tap interface on the host, the mac addresses collide. I 
solved this by just incrementing the last byte of tap's mac address. As 
tap mac addresses are random, that *should* be ok with 1:2^48 
probability, right?

- (bug in icmpv6? [1])

It seems very reliable and quite fast:
[kaspar at localhost sys]$ sudo ping6 2001:db8::2 -f -c 100000
PING 2001:db8::2(2001:db8::2) 56 data bytes
--- 2001:db8::2 ping statistics ---
100000 packets transmitted, 99998 received, 0% packet loss, time 5905ms
rtt min/avg/max/mdev = 0.028/0.040/1.384/0.017 ms, ipg/ewma 0.059/0.045 ms
[kaspar at localhost sys]$


[1] https://github.com/RIOT-OS/RIOT/pull/2555/files#r28201992 )

More information about the devel mailing list