Hi all,
trying to understand the tinc role I wondering if there is an
possibility to set up mesh network where all tinc tap adapters are part
of a bridge (br2) on their hosts.
The goal is to have a server cluster where vms on different host can
share one bridge which is connected through tinc.
The configuration below results in a situation where none of the hosts
have a "ConnectTo=" variable in tinc.conf.
If I use the "link_type: 'dynamic'" we have these variables - but the
tap-mesh0 interface itselfs tries to get address via dhcp - which is not
what I want.
I also wondering if it is intended that taking the example inventory
(
https://docs.debops.org/en/master/ansible/roles/tinc/getting-started.html...
with one host with dns/dhcp) there is no ConnectTo neigher on the host
which provides DNS/DHCP. Doesn't this lead to an setup which is not a
real mesh network?
This example configuration (one dhcp host - other nodes where tap-mesh0
gets address through dhcp) works for me (but only with bridge on host1).
But the host entries in mesh0/hosts/hostXY have the hostname configured
with the "br2" subdomain - like
host1.br2.example.org which is the
name-resolution of dnsmasq on host1. Does this makes sense? Why not
address all hosts through there fqdn on the primary interface? Then we
don't get any problems with static bridge configuration without dhcp and
working name resolution via tinc.
Additionally it seem's not so easy to find the right order for getting
up bridges and the tap interfaces:
Even if fix the problems above resulting in a setup where on host has
tap interface on br2 with dhcp server and two other host with tinc via
bridge configuraion and dhcp: after reboot I have first to restart tinc
before it's possible to get an ip address through dhclient.
One of my test configs:
Host 1:
tinc__host_networks:
'mesh0':
bridge: 'br2'
ifupdown__interface_layout: 'dynamic'
ifupdown__host_interfaces:
'br2':
type: 'bridge'
inet: 'static'
nat: True
addresses:
- '10.0.0.11/24'
Host 2:
tinc__host_networks:
'mesh0':
bridge: 'br2'
ifupdown__interface_layout: 'dynamic'
ifupdown__host_interfaces:
'br2':
type: 'bridge'
inet: 'static'
nat: True
addresses:
- '10.0.0.12/24'
Host 3:
tinc__host_networks:
'mesh0':
bridge: 'br2'
ifupdown__interface_layout: 'dynamic'
ifupdown__host_interfaces:
'br2':
type: 'bridge'
inet: 'static'
nat: True
addresses:
- '10.0.0.12/24'
Best regards
Jan