Re: [Babel-users] A Babel implementation in Go
Hi Daniel __ > I'd be interested in helping out. That’s fantastic! Please feel free to have a look at my code and start hacking right away. I try to keep my local changes synced as close to the master. So you can see my progress right away. I am currently, still working on the protocol parsing bits. > Something I've been mulling over is starting a compatibility test suite for > babel because there do seem to be some corners that are easy to get > wrong. Starting a new implementation that's structured as a library might > be a good opportunity to do that. Definitely! I think Go is really nice for that. I've already implemented extensive unit tests (including fuzzing) for the protocol parser: - https://github.com/stv0g/go-babel/blob/master/proto/parser_fuzz_test.go - https://github.com/stv0g/go-babel/blob/master/proto/parser_test.go I am using the Ginkgo testing framework with which I am targeting to reach a 100% code coverage. Integration / interoperability tests sound super cool! I have started with a first integration test which is using Gont [1]: Gont, builds virtual network topologies using Linux's network namespaces and allows us to run integration tests in it. So, we can build arbitrary networks, including RTT latency emulation and much more. My first test just creates two nodes (network namespaces) and a Linux bridge which are then interconnected via veth pairs. This allows me to run two babel speakers and test neighbour discovery: - https://github.com/stv0g/go-babel/blob/master/speaker_test.go We could even go-babel against babeld / bird and have these tests fully automated __ I love your idea. Its really exciting! [1] https://github.com/stv0g/gont On 18.05.23, 15:00, "Daniel Gröber" mailto:d...@darkboxed.org>> wrote: Hi Steffen, On Thu, May 18, 2023 at 09:41:30AM +0200, Steffen Vogel wrote: > My hope is to find a few collaborators for my endeavor who can support me > with the tricky parts of the protocol. Sounds fun. I'd be interested in helping out. Been meaning to get more into go anyway. I've been running a small network on babeld and bird for a while now, written a major patch for bird and found a bug in the RFC in the process. The only corner of the babel RFC that still scares me are "sources" :) Something I've been mulling over is starting a compatibility test suite for babel because there do seem to be some corners that are easy to get wrong. Starting a new implementation that's structured as a library might be a good opportunity to do that. --Daniel ___ Babel-users mailing list Babel-users@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
Re: [Babel-users] A Babel implementation in Go
Hi Steffen, On Thu, May 18, 2023 at 09:41:30AM +0200, Steffen Vogel wrote: > My hope is to find a few collaborators for my endeavor who can support me > with the tricky parts of the protocol. Sounds fun. I'd be interested in helping out. Been meaning to get more into go anyway. I've been running a small network on babeld and bird for a while now, written a major patch for bird and found a bug in the RFC in the process. The only corner of the babel RFC that still scares me are "sources" :) Something I've been mulling over is starting a compatibility test suite for babel because there do seem to be some corners that are easy to get wrong. Starting a new implementation that's structured as a library might be a good opportunity to do that. --Daniel ___ Babel-users mailing list Babel-users@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
Re: [Babel-users] A Babel implementation in Go
Hi Juliusz, > That's way into the future, but I encourage you to keep source-specific > routing in mind. Noted __ I am already parsing sub-TLVs for it. I think there is also a valid use-case for SADR within overlay networks as every node has its own external gateway and connected networks which we could route using SADR. > Are you planning any interesting interactions between Babel and Wireguard? > If you're going to avoid multicast, you'll need to automatically import > Wireguard peers into Babel's neighbour table. Yes exactly. WireGuard does not support Multicast. So Unicast is the only option. WireGuard's peer/node identity is determined by its public X25519 key. I am using this public key to derive a link-local IPv6 address which is used for the neighbour configuration. This means, I can build a Babel daemon tailored for WireGuard meshes which Requires no external configuration __ My cunicu daemon performs peer detection in two ways: - Monitoring WireGuard's kernel/userspace interfaces to detect peers This is local to the node and basically allows the users to manage the WireGuard interfaces by hand or any other existing tool like NetworkManager, system-network, .. - Broadcasting peer information within the mesh to pick-up new peers which are joining the network. This is a bit trickier as you want to control which peers are allowed to join the network, and also to revoke this access. Managing this can be challenging in a fully decentral mesh-network without the Web-dashboard / management server the commercial mesh-overlay tools like Tailscale & Netbird provide. Another interesting point is the existence of a performant user-space WireGuard implementation in Go. Hence, enabling cunicu to ship as single binary including VPN, Routing, Auto-configuration functions. Thanks to Go, this binary has no external dependencies and can be portable across platforms which Provide some sort of TUN/TAP interface. Best regards, Steffen ___ Babel-users mailing list Babel-users@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
Re: [Babel-users] A Babel implementation in Go
> A couple of days ago, I started to work on implementation of the Babel > protocol in Go driven by the following objectives: Excellent news. Babel is a protocol, and I'm trying to encourage independent implementations of the protocol. In fact, I consider that the implementation in BIRD is superior in many ways to babeld. > - Embeddable Go-package / library > - Possibly also a babeld-compatible daemon later-on > - Alternatively, integration into bio routing daemon > - Unicast & RTT support That's way into the future, but I encourage you to keep source-specific routing in mind. > My motivation to start a new Babel implementation is driven by the need > for routing daemon for my WireGuard overlay network. Are you planning any interesting interactions between Babel and Wireguard? If you're going to avoid multicast, you'll need to automatically import Wireguard peers into Babel's neighbour table. > But as newcomer to the Babel protocol, that will take me some more time to > fully grasp the details of the protocol. You may want to start by looking at [1], which is the simplest Babel implementation in existence. Be aware, though, that the protocol is specified by the RFC, not by the implementation. [1] https://github.com/jech/sbabeld Good luck, -- Juliusz ___ Babel-users mailing list Babel-users@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
Re: [Babel-users] A Babel implementation in Go
Hello, Steffen. It's a very cool and interesting project. Being a network admin, I would be very interested in such a use-case, when it will be at least beta-status ready. So, I will be able to assist with some testing of routing. (Playing with some overlay things too, multihop and RTT based.) But unfortunately I am useless as a programmer. Andrei. On Thu, May 18, 2023 at 10:58 AM Steffen Vogel wrote: > > Hi babel-users, > > This is my first post to this list and as such also my first contact with the > Babel community. > > A couple of days ago, I started to work on implementation of the Babel > protocol in Go driven by the following objectives: > > - Embeddable Go-package / library > - Possibly also a babeld-compatible daemon later-on > - Alternatively, integration into bio routing daemon > - Unicast & RTT support > - Clean and concise code > - Portable to Linux, BSDs, Windows & macOS > > My motivation to start a new Babel implementation is driven by the need for > routing daemon for my WireGuard overlay network. > There exist a couple of projects which establish and manage a mesh-network > based on WireGuard point-to-point links [3]. > I recently also started to work on my own mesh network daemon named "cunicu" > which is inspired by excellent Tinc-VPN [4]. > > Tinc-VPN had the ability to route traffic over intermediate hops when direct > point-to-point connectivity cannot be established. > This is a very useful feature to me when reaching into corporate or mobile > networks. And to my knowledge, this basic routing > functionality of Tinc-VPN is still a unique feature which more moderns > mesh-VPN solutions like Tailscale, NetBird, netmaker, ... do not support. > Hence, my requirements for unicast and the RTT-extensions are driven by my > use-case in WAN point-to-point links. > > You can find its current state in my GitHub repo [1]. Most of the low-level > packet de/encoding as well as transmission/reception is implemented. > Basic data structures also exist and first multicast neighbour discovery also > succeeded. > > I am now starting to implement the basic protocol logic like updates, > requests and route selection. > But as newcomer to the Babel protocol, that will take me some more time to > fully grasp the details of the protocol. > > My hope is to find a few collaborators for my endeavor who can support me > with the tricky parts of the protocol. > Maybe you just started your holiday looking for a small weekend project to > hack on? Or you are looking into learning a new programming language? > Let me know! Hacking together on such a project is always more fun. > > (I am working on this purely on my spare time. This is a hobby project for me > without any job/commercial background.) > > Best regards, > > Steffen (stv0g) > > [1] https://github.com/stv0g/go-babel > [2] https://github.com/stv0g/cunicu/ > [3] https://github.com/HarvsG/WireGuardMeshes > [4] https://www.tinc-vpn.org/ > > > > ___ > Babel-users mailing list > Babel-users@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users -- Regards, Andrei Safonov. +381 62 810 4112 (WhatsApp) Srdačan pozdrav, Andrei Safonov. +381 62 810 4112 (WhatsApp) ___ Babel-users mailing list Babel-users@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users