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.
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).
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
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.
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
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"
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"
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".
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
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
Check if sending and receiving ICMP packets works:
# Login to alice vagrant ssh tf-alice # Ping bob vagrant@tf-alice:~$ ping 10.10.20.52 64 bytes from 10.10.20.52: icmp_seq=1 ttl=64 time=0.672 ms
in both directions:
# Login to bob vagrant ssh tf-bob # Ping alice vagrant@tf-bob:/tmp$ ping 10.10.20.51 64 bytes from 10.10.20.51: icmp_seq=1 ttl=64 time=0.484 ms
Find out about MAC addresses of your peers:
brctl showmacs tb-quickstart | grep no
or:
bridge fdb show | grep -v permanent | grep master
Explore the whole neighbourhood:
nmap -sP 10.10.20.0/24
arping -W1.0 10.10.20.52 arping c6:50:ff:83:e3:3a -T 10.10.20.52 -i tb-quickstart
Send raw Ethernet frames or other beasts using Python, e.g.:
First steps with Zeroconf.
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.
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.
Licensed under the GNU AGPL license. See LICENSE file for details.
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.
If you encounter any problems during setup, we may humbly refer you to the doc/troubleshooting.rst documentation.
Have fun!