LAN discovery issue

Markus Teufelberger markusteufelberger at gmail.com
Thu Dec 6 14:04:54 CET 2012


Hi there,

Following situation:

3 nodes, Alpha (Home fileserver), Beta (regular PC), Gamma (Notebook).
All three in a NATed LAN usually, though the notebook also gets
carried around and connects from the outside from time to time. Tinc
should help me keep my other 2 PCs reachable from Gamma, even when I'm
not at home. Also I plan on maybe adding more nodes to that in the
future.

I have set up a DynDNS entry + port forward to Alpha and Beta from the
internet and it works great (tested on Gamma by disabling WLAN and
using an UMTS stick instead, so I connect from the outside).

Configuration:
tinc.conf on all three nodes (all running tinc 1.0.19 on Windows):
*******************
Name = [Name]
ConnectTo = Alpha (<-- commented out on Alpha of course)
Compression = 9
LocalDiscovery = yes
Interface = tincVPN
*******************

host files:
Alpha
*******************
Subnet = [single IP]/32
IndirectData = yes
Address = [DynDNS]
Port = [Port]
-----RSA Part-----
*******************
Beta
*******************
Subnet = [single IP]/32
IndirectData = yes
Address = [DynDNS]
Port = [Port]
-----RSA Part-----
*******************
Gamma
*******************
Subnet = [single IP]/32
IndirectData = yes
-----RSA Part-----
*******************

Beta and Gamma are set to ConnectTo Alpha, Alpha itself doesn't
ConnectTo anyone. Beta currently has Alpha's LAN IP written in the
host file of Alpha, since Beta is unlikely to be moved outside the
LAN.

I have the following problem:
Pinging Alpha's VPN IP from Beta gives great LAN times of ~1 ms.
Pinging Beta's VPN IP from Alpha too.
However:
Pinging Alpha's VPN IP from Gamma gives all sorts of weird timings,
sometimes up to 2+ seconds, sometimes down to less than 10 ms.
Pinging Beta's VPN IP from Gamma (remember, Gamma only ConnectsTo
Alpha) seems to be settling down at 4 ms with some ~200ms hickups
inbetween and at the beginning.

My suspicion is that Gamma somehow manages to connect to the external
IP of my NAT and VPN packets are routed around the globe rather than
through the LAN... LAN discovery doesn't seem to work in this case.

How can I debug this further? Obviously what I want to accomplish is
to have LAN speeds (and connectivity) on Gamma when I'm home, so
ultimately Gamma should open a connection to Alpha's LAN IP, even if
it can reach it through it's WAN IP too. It seems to me that the
packets for LocalDiscovery get lost somewhere in my network or at
least not picked up/used by the clients. Would tinc 1.1 help here? I
was hesitant of using it, since it's not marked as stable yet... Are
there any plans of using another LAN discovery method (I saw
Avahi/Zeroconf mentioned somewhere) maybe that's more standard?
Also I'm not sure if I should change the nodes to "switch" mode
instead, as I plan to use D-LAN (http://www.d-lan.net/) for
multisourced sharing of files in my VPN and it's node discovery also
relies on UDP multicast (http://www.d-lan.net/faq.html). As far as I
understood, if I change all nodes to "switch" instead, I'd still have
the current functionality, but be able to have UDP multicasts in the
VPN as well?

Thanks for reading (and if you write an answer, thanks for that too!)
and for providing such a great piece of software!

Cheers,
Markus


More information about the tinc mailing list