On Wed, Mar 29, 2017 at 10:54:39PM +0200, albi at life.de wrote:
> how does tinc decide where to route a packet?
> I know default weight is 10. Does tinc add all weights and choose the
lowest?
> Will 3 hops with weight 10 prefered before one hop wih weight 50 ?
There are two kinds of weights: those of Subnets, and those of
connections between peers. The final destination of a packet is chosen
by looking at the smallest matching Subnet with the lowest weight. If
you have two identical Subnets, it will choose the one whose owner has
the "lowest" name.
Then, when the final destination is known, and only if the destination
node cannot be reached directly, will tinc have to choose an
intermediate node to route the packet to the final destination. It
chooses from the nodes it has a metaconnection with (because those are
guaranteed to be reachable), and chooses the one that is closest to the
destination in number of hops. If there are multiple, then tinc will
choose the one which has the lowest connection weight.
--
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/attachments/20170330/4e60e8c3/attachment.sig>