Large scale tinc tests

Guus Sliepen guus at tinc-vpn.org
Wed Sep 23 20:19:04 CEST 2015


On Wed, Sep 23, 2015 at 08:01:59PM +0200, borg at uu3.net wrote:

> Well. I want to test subnet propagation, alternate paths, etc...
> Do this, I would use Imunes because im very familiar with it..
> I want to build small test network around 10 nodes with different
> connectivity between them and then lay-out tinc network on it.
> Then I can just set BER=1 to kill links and see how things happen etc..

Ok, that doesn't sound too complicated.

> As for using one machine, I dont really understand how I could achieve
> this..  yeah, namespacing is an option.. never used it tho :)

I don't know about the equivalent in FreeBSD, but in Linux it's quite
easy to start a new network namespace and create Ethernet tunnels
between them. For example, I have a script called "left" that looks
like this:

#!/bin/sh
ip netns add left
ip link add name left type veth peer name right
ip link set left netns left

ip netns exec left ifconfig left 192.168.124.1/24 up
ip netns exec left tc qdisc del dev left root
ip netns exec left tc qdisc add dev left root netem rate 10mbit delay 10ms

if [ -z "$1" ]; then
        exec ip netns exec left $SHELL
else
        exec ip netns exec left "$@"
fi

The first three lines create a namespace "left" and inside it a virtual
ethernet device (also named "left") that will be connected to a similar
one in the namespace "right". The next three lines bring up this
interface and use Linux's network queueing disciplines to simulate a 10
Mbit/s link with a latency of 10 ms. You can easily add a discipline to
create packet loss. You can also create firewall rules in each namespace
separately. The rest just starts a given command or an interactive shell
in the namespace. Of course I have a similar script called "right" that
sets up the counterpart. These scripts allow me to quickly start two
instances of tinc in a reasonably realistic scenario without having to
create complete virtual machines.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20150923/61994d79/attachment.sig>


More information about the tinc-devel mailing list