What if two tinc daemons received the same Subnet but with different weight?

Guus Sliepen guus at tinc-vpn.org
Wed Aug 23 17:22:57 CEST 2017


On Wed, Aug 23, 2017 at 08:04:08AM +0000, Bright Zhao wrote:

> Guus Sliepen <guus at tinc-vpn.org>于2017年8月22日 周二下午11:10写道:
> 
> > If there are two completely identical Subnets, then it's currently
> > undefined what happens (in practice it will choose the one with the
> > lowest name alphabetically, but don't rely on that).
> 
> I referre to the two separate tinc process/network(received same subnet),
> not Sunbet selection within one tinc process/network.
> 
> My understanding is if different tinc process comes with exact subnet, as
> they are not related with each other(they have no idea regarding weights
> with each other), I guess the routing depends on the host's main routing
> table, for specific route it depends on which tinc interface as the "Via"
> to determine this?

In that case, it's up to you what happens. Tinc itself never modifies
the kernel's routing table, it only calls scripts that you provide. But
the kernel's routing table works pretty much the same as how tinc works
internally: you can assign a metric (the equivalent to tinc's Subnet
weight) to routes, but if you have two completely identical routes to
different interfaces, it might be unclear to which interface it will
route packets. On most platforms, it depends on which route was added
first.

-- 
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: 833 bytes
Desc: not available
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20170823/2397026c/attachment.sig>


More information about the tinc mailing list