subnet-up invocations

Guus Sliepen guus at tinc-vpn.org
Tue Jul 17 17:28:01 CEST 2012


On Tue, Jul 17, 2012 at 09:29:11AM -0400, Nikolaus Rath wrote:

> I'm confused by the subnet-up calls made by tinc. I was assuming that
> I'd be called once when it connects to another node. However, subnet-up
> appears to be called much more often than that.
> 
> For example, I have the following configuration:
> 
> ,----
> | $ cat tinc.conf 
> | ConnectTo = spitzer
> | Name = chronos
> | Mode = switch
> | 
> | $ cat hbt/hosts/spitzer 
> | address = spitzer.ap.columbia.edu
> | Compression = 11
> | Cipher = AES128
> | Subnet = 192.168.1.2/32
> | Subnet = 192.168.1.0/24#15

You are using Mode = switch. This means tinc nodes are learning MAC addresses,
and they are spread around as Subnets. That is why you are seeing MAC addresses
when subnet-up is called.

Note that in switch mode, tinc never looks at the IP header, so the Subnet
statements you put in the host config file do not have any effect (except that
they do cause subnet-up to be called for them).

> If I insert a
> 
> | echo "$NODE,$NAME,$REMOTEADDRESS,$SUBNET"
> 
> into subnet-up, I get the following output:
[...]
> (athena, ingpu, oberon and inspiron are other tinc nodes that also
> connected to spitzer).
> 
> I can still sort of understand that subnet-up is being called twice with 
> subnet 192.168.1.2/32 and 192.168.1.0/24 (even though the later implies
> the former), because I also specified two subnets in the spitzer host
> configuration.
> 
> But why am I seeing subnet-up calls with subnets that look like mac
> addresses? And why am I getting subnet calls for nodes that this
> computer does not actually connect to?

After connecting to spitzer, all the other nodes that are connected to spitzer
will automatically also become reachable to chronos. Therefore, the subnet-up
script is called for each of their subnets.

-- 
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: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20120717/df0ff391/attachment.pgp>


More information about the tinc mailing list