[riot-devel] new network stack mini howto

Martine Lenders authmillenon at gmail.com
Sun Apr 12 14:56:07 CEST 2015


2015-04-12 11:33 GMT+02:00 Kaspar Schleiser <kaspar at schleiser.de>:

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


> […]
> - 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?

Ah, why did I not realize this by now m). I think as an initial address
this is alright, but maybe you can allow for the user to set the MAC
address (using ng_netdev_driver_t::set) for the host side of the TAP then,

> - (bug in icmpv6? [1])


> It seems very reliable and quite fast:
> --snip--
> [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]$
> --snip--

Awesome! :3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20150412/96d058d7/attachment.html>

More information about the devel mailing list