https://img.shields.io/github/tag/tunfish/tunfish-sandbox.svg https://img.shields.io/badge/platform-Linux%20%7C%20LEDE%20%7C%20OpenWRT-blue.svg https://img.shields.io/badge/technologies-WireGuard%20%7C%20VXLAN%20%7C%20STP%20%7C%20Zeroconf-blue.svg

https://ptrace.tunfish.org/thunfisch-160.jpg

Tunfish Sandbox

About

A SDN proof-of-concept for approaching convenient VXLAN Layer 2/3 convergence on top of secure WireGuard tunnels.

This runbook will guide you through the process of setting up an appropriate testbed environment. It will provision a number of Vagrant machines and configure them to talk to each other over a software-defined secure private network.

After that, you will easily be able to conduct connectivity tests and continue with further experiments.

Details

While the effective network transport is based on IP/UDP, the virtual circuit offers Data Link Layer (Layer 2) connectivity on a multi-tenant basis through VXLAN.

As this unlocks the capability to send Ethernet frames across IP networks, it will eventually become possible to use protocols and technologies reserved for local networks (LANs) so far.

It opens the door to countless applications requiring Data Link Layer connectivity like Zeroconf, Multicast DNS (mDNS) or DNS Service Discovery (DNS-SD) and their popular implementations and applications like Bonjour, Avahi and .local.

Other candidates are Universal Plug and Play (UPnP), the Service Location Protocol (SLP) and Web Services Dynamic Discovery (WS-Discovery).

Setup

This section will guide you through setting up a development/testing sandbox on your machine.

Acquire source repository:

git clone https://github.com/tunfish/tunfish-sandbox
cd tunfish-sandbox/environment/quickstart

Install requirements on Mac OS X using Homebrew:

./requirements-macosx.sh

Make Vagrant provision and spin up all machines configured in this environment:

vagrant up

Network layout

There are two machines "tf-alice" and "tf-bob", completely provisioned by Vagrant.

As they are running different networks (IP transport, WireGuard tunnel, VXLAN), here is a short overview as an introduction. Please read this section carefully.

Machines

The Vagrant network "192.168.50.0/24".

192.168.50.1        The hypervisor host on its "vboxnet0" interface
192.168.50.51       The guest host "tf-alice" on its "eth1" interface
192.168.50.52       The guest host "tf-bob"   on its "eth1" interface

WireGuard

The WireGuard network "10.10.10.0/24" is running on interface "wg0-server".

10.10.10.51         The host "tf-alice"
10.10.10.52         The host "tf-bob"

VXLAN

The VXLAN network "10.10.20.0/24" is running on interface "tb-quickstart".

10.10.20.51         The host "tf-alice"
10.10.20.52         The host "tf-bob"

Usage

Start WireGuard tunnel

Login to each alice and bob:

vagrant ssh tf-alice
vagrant ssh tf-bob

Start WireGuard interface:

systemctl start wg-quick@wg0-server

Note

This should have happened already by the Ansible role "tunfish.wireguard".

Test WireGuard tunnel

Check if the WireGuard tunnel works:

# Login to alice
vagrant ssh tf-alice

# Ping bob
vagrant@tf-alice:~$ ping 10.10.10.52
64 bytes from 10.10.10.52: icmp_seq=1 ttl=64 time=0.650 ms

in both directions:

# Login to bob
vagrant ssh tf-bob

# Ping alice
vagrant@tf-bob:/tmp$ ping 10.10.10.51
64 bytes from 10.10.10.51: icmp_seq=1 ttl=64 time=0.497 ms

Start overlay network

Let both nodes join the private Tunfish overlay network:

vagrant ssh tf-alice
sudo /opt/quickstart-dev/tunfish-client/tunfish-join.sh

vagrant ssh tf-bob
sudo /opt/quickstart-dev/tunfish-client/tunfish-join.sh

Development

To repeat the virtual machine provisioning, run:

vagrant up --provision

To reprovision just a single host, use:

vagrant up --provision tf-alice

The source code directory ./src will be mounted into each virtual machine at /opt/quickstart-dev for convenient live editing.

Project information

About

The "Tunfish sandbox" spike is released under the GNU AGPL license. Its source code lives on GitHub. You might also want to have a look at the documentation.

If you'd like to contribute you're most welcome! Spend some time taking a look around, locate a bug, design issue or spelling mistake and then send us a pull request or create an issue.

Thanks in advance for your efforts, we really appreciate any help or feedback.

License

Licensed under the GNU AGPL license. See LICENSE file for details.

Acknowledgements

Tunfish would not have been possible without these awesome people:

Thank you so much for providing such great infrastructure components and resources to the community! You know who you are.

Troubleshooting

If you encounter any problems during setup, we may humbly refer you to the doc/troubleshooting.rst documentation.


Have fun!