Linux-WPAN Archive on lore.kernel.org
 help / color / Atom feed
* ANNOUNCE: rpld an another RPL implementation for Linux
@ 2019-08-29 21:57 Alexander Aring
  2019-08-30  0:40 ` Reuben Hawkins
  2019-09-12 11:14 ` Stefan Schmidt
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Aring @ 2019-08-29 21:57 UTC (permalink / raw)
  To: open list:NETWORKING [GENERAL]
  Cc: Michael Richardson, Jamal Hadi Salim, Robert Kaiser,
	Martin Gergeleit, Kai Beckmann, koen, linux-wpan - ML, reubenhwk,
	BlueZ development, Stefan Schmidt, sebastian.meiling,
	Marcel Holtmann, Werner Almesberger, Jukka Rissanen

Hi,

I had some free time, I wanted to know how RPL [0] works so I did a
implementation. It's _very_ basic as it only gives you a "routable"
(is that a word?) thing afterwards in a very constrained setup of RPL
messages.

Took ~1 month to implement it and I reused some great code from radvd
[1]. I released it under the same license (BSD?). Anyway, I know there
exists a lot of memory leaks and the parameters are just crazy as not
practical in a real environment BUT it works.

I changed a little bit the dependencies from radvd (because fancy new things):

- lua for config handling
- libev for event loop handling
- libmnl for netlink handling

The code is available at:

https://github.com/linux-wpan/rpld

With a recent kernel (I think 4.19 and above) and necessary user space
dependencies, just build it and run the start script. It will create
some virtual IEEE 802.15.4 6LoWPAN interfaces and you can run
traceroute from namespace ns0 (which is the RPL DODAG root) to any
other node e.g. namespace ns5. With more knowledge of the scripts you
can change the underlying topology, everybody is welcome to improve
them.

I will work more on it when I have time... to have at least something
running means the real fun can begin (but it was already fun before).

The big thing what everybody wants is source routing, which requires
some control plane for RPL into the kernel to say how and when to put
source routing headers in IPv6. I think somehow I know what's
necessary now... but I didn't implemented it, this simple
implementation just filling up routing tables as RPL supports storing
(routing table) or non-storing (source routing) modes. People tells me
to lookup frrouting to look how they do source routing, I will if I
get the chance.

It doesn't run on Bluetooth yet, I know there exists a lack of UAPI to
figure out the linklayer which is used by 6LoWPAN. I need somehow a
SLAVE_INFO attribute in netlink to figure this out and tell me some
6LoWPAN specific attributes. I am sorry Bluetooth people, but I think
you are also more interested in source routing because I heard
somebody saying it's the more common approach outside (but I never saw
any other RPL implementation than unstrung running).

Also I did something in my masters thesis to make a better parent
selection, if this implementation becomes stable I can look to get
this migrated.

Please, radvd maintainer let me know if everything is okay from your
side. As I said I reused some code from radvd. I also operate on
ICMPv6 sockets. The same to Michael Richardson unstrung [2]. If there
is anything to talk or you have complains, I can change it.

Thanks, I really only wanted to get more knowledge about routing
protocols and how to implement such. Besides all known issues, I still
think it's a good starting point.

- Alex

[0] https://tools.ietf.org/html/rfc6550
[1] https://github.com/reubenhwk/radvd
[2] https://github.com/AnimaGUS-minerva/unstrung

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ANNOUNCE: rpld an another RPL implementation for Linux
  2019-08-29 21:57 ANNOUNCE: rpld an another RPL implementation for Linux Alexander Aring
@ 2019-08-30  0:40 ` Reuben Hawkins
  2019-09-12 11:14 ` Stefan Schmidt
  1 sibling, 0 replies; 3+ messages in thread
From: Reuben Hawkins @ 2019-08-30  0:40 UTC (permalink / raw)
  To: Alexander Aring
  Cc: open list:NETWORKING [GENERAL],
	Michael Richardson, Jamal Hadi Salim, Robert Kaiser,
	Martin Gergeleit, Kai Beckmann, koen, linux-wpan - ML,
	BlueZ development, Stefan Schmidt, sebastian.meiling,
	Marcel Holtmann, Werner Almesberger, Jukka Rissanen

There is a COPYRIGHT file in radvd which I just read for the first time today. It’s been there for 19+ years. Sounds very BSD to me. I’ve been maintainer for 9 years. As far as I’m concerned, you can do with the code whatever you like.  Good luck. 👍 

Sent from my iPhone

> On Aug 29, 2019, at 2:57 PM, Alexander Aring <alex.aring@gmail.com> wrote:
> 
> Hi,
> 
> I had some free time, I wanted to know how RPL [0] works so I did a
> implementation. It's _very_ basic as it only gives you a "routable"
> (is that a word?) thing afterwards in a very constrained setup of RPL
> messages.
> 
> Took ~1 month to implement it and I reused some great code from radvd
> [1]. I released it under the same license (BSD?). Anyway, I know there
> exists a lot of memory leaks and the parameters are just crazy as not
> practical in a real environment BUT it works.
> 
> I changed a little bit the dependencies from radvd (because fancy new things):
> 
> - lua for config handling
> - libev for event loop handling
> - libmnl for netlink handling
> 
> The code is available at:
> 
> https://github.com/linux-wpan/rpld
> 
> With a recent kernel (I think 4.19 and above) and necessary user space
> dependencies, just build it and run the start script. It will create
> some virtual IEEE 802.15.4 6LoWPAN interfaces and you can run
> traceroute from namespace ns0 (which is the RPL DODAG root) to any
> other node e.g. namespace ns5. With more knowledge of the scripts you
> can change the underlying topology, everybody is welcome to improve
> them.
> 
> I will work more on it when I have time... to have at least something
> running means the real fun can begin (but it was already fun before).
> 
> The big thing what everybody wants is source routing, which requires
> some control plane for RPL into the kernel to say how and when to put
> source routing headers in IPv6. I think somehow I know what's
> necessary now... but I didn't implemented it, this simple
> implementation just filling up routing tables as RPL supports storing
> (routing table) or non-storing (source routing) modes. People tells me
> to lookup frrouting to look how they do source routing, I will if I
> get the chance.
> 
> It doesn't run on Bluetooth yet, I know there exists a lack of UAPI to
> figure out the linklayer which is used by 6LoWPAN. I need somehow a
> SLAVE_INFO attribute in netlink to figure this out and tell me some
> 6LoWPAN specific attributes. I am sorry Bluetooth people, but I think
> you are also more interested in source routing because I heard
> somebody saying it's the more common approach outside (but I never saw
> any other RPL implementation than unstrung running).
> 
> Also I did something in my masters thesis to make a better parent
> selection, if this implementation becomes stable I can look to get
> this migrated.
> 
> Please, radvd maintainer let me know if everything is okay from your
> side. As I said I reused some code from radvd. I also operate on
> ICMPv6 sockets. The same to Michael Richardson unstrung [2]. If there
> is anything to talk or you have complains, I can change it.
> 
> Thanks, I really only wanted to get more knowledge about routing
> protocols and how to implement such. Besides all known issues, I still
> think it's a good starting point.
> 
> - Alex
> 
> [0] https://tools.ietf.org/html/rfc6550
> [1] https://github.com/reubenhwk/radvd
> [2] https://github.com/AnimaGUS-minerva/unstrung

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ANNOUNCE: rpld an another RPL implementation for Linux
  2019-08-29 21:57 ANNOUNCE: rpld an another RPL implementation for Linux Alexander Aring
  2019-08-30  0:40 ` Reuben Hawkins
@ 2019-09-12 11:14 ` Stefan Schmidt
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Schmidt @ 2019-09-12 11:14 UTC (permalink / raw)
  To: Alexander Aring, open list:NETWORKING [GENERAL]
  Cc: Michael Richardson, Jamal Hadi Salim, Robert Kaiser,
	Martin Gergeleit, Kai Beckmann, koen, linux-wpan - ML, reubenhwk,
	BlueZ development, sebastian.meiling, Marcel Holtmann,
	Werner Almesberger, Jukka Rissanen

Hello Alex.

On 29.08.19 23:57, Alexander Aring wrote:
> Hi,
> 
> I had some free time, I wanted to know how RPL [0] works so I did a
> implementation. It's _very_ basic as it only gives you a "routable"
> (is that a word?) thing afterwards in a very constrained setup of RPL
> messages.
> 
> Took ~1 month to implement it and I reused some great code from radvd
> [1]. I released it under the same license (BSD?). Anyway, I know there
> exists a lot of memory leaks and the parameters are just crazy as not
> practical in a real environment BUT it works.
> 
> I changed a little bit the dependencies from radvd (because fancy new things):
> 
> - lua for config handling
> - libev for event loop handling
> - libmnl for netlink handling
> 
> The code is available at:
> 
> https://github.com/linux-wpan/rpld

I finally had a first look at it and played around a little bit.

How do you want to review patches for this? Pull requests on the github
repo or patches send on the linux-wpan list?

So far just some basic stuff I stumbled over when playing with it. Build
fixes (SCOPE_ID and different lua pkgconfig namings), leak fixes to
config.c as well as a travis setup to get building on CI as well as
submitting to Coverity scan service (the later two are already tested in
practice with some dev branches I pushed to the github repo, hope you
don't mind).

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 21:57 ANNOUNCE: rpld an another RPL implementation for Linux Alexander Aring
2019-08-30  0:40 ` Reuben Hawkins
2019-09-12 11:14 ` Stefan Schmidt

Linux-WPAN Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
		linux-wpan@vger.kernel.org
	public-inbox-index linux-wpan

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git