Understanding tinc edge connections and re-routing

Ville Mattila ville at mattila.fi
Sun Jan 13 21:05:03 CET 2013


Hi,

I have successfully setup a tinc network between five hosts (in switch
mode). Two of the hosts have static and known IP addresses (S1 and
S2). Other hosts (H3-H5) connect one (or both) of them. The traffic flows
nicely between all hosts.

The initial edges (ConnectTo configuration directives) in my test network
are:
S1<->S2
H3 -> S1 and S2
H4 -> S1
H5 -> S2

As far as I have understood, after tinc has established a connection with
another host, these hosts will exhange information about other known hosts
in the network, no matter if the hosts are  defined in /hosts/*
configuration files. Each succesfully connected host tries to establish a
direct connection with every other host in the mesh and thus creates
more edges to the mesh. Is that correct? How long it generally takes after
the initial connection that the new host has created connections with all
other hosts? Which configuration directives have effect in this operation?

In case two hosts are not directly connected with each other, the traffic
goes first through the intermediate hosts until tinc has found the shortest
route. Still correct? In my example, ping packet from H4 to H5 goes first
to S1, then S2 and finally reaches H5. As soon as S1 communicates
information about S2 to H4, H4 can connect S2 directly and packets from H4
to H5 do not go over S1 anymore. Further, if H4 can connect H5 directly
(firewalls etc allow it), traffic may start to flow between H4 and H5
without any intermediate hosts. Am I still on track?

Let's suppose that one of the intermediate hosts, like S2, fails. H5 was
connected initially only to S2, but if I understand correct, there should
be also a connection to S1 if the mesh is mature? In this case, traffic
from/to H5 should get rerouted via S1 as far as H5 finds edge to S2 down.
Correct? How long it approximately takes (after a failure) to find a
new route for the traffic? What configuration directives are in effect here?

I tried to make an experiment but for some reason, my mesh network requires
that both S1 and S2 are running. If I shut one of them down, the network
gets partitioned and I can't ping other hosts anymore. That's why I am
asking the questions above whether I even understand the theory behind tinc
correctly.

Thanks for any comments, confirmations, corrections, further questions,
links to study material... anything. :)

Ville
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20130113/587aa176/attachment.html>


More information about the tinc mailing list