On Tue, Mar 21, 2017 at 06:51:37PM +0100, [email protected] wrote: > We run tinc in router mode on over 10 server. > Some server announce the same subnet. > I can add routing with subnet-up and remove routing with subnet-down. But if > I do this, my routing will be removed when > only one anncounce comes in, even there is an other server who still has the > routing to the same network. > Is it possible to run subnet-down only it the last announce to a subnet is > going down?
Currently there's nothing in tinc that makes this easy. There are two
possible workaround:
1. Use different weights for the otherwise identical Subnets, and ensure
you pass that along to the route up/down commands so the kernel can also
distinguish them.
2. Do some form of reference counting yourself. An easy way from a shell
script is to just touch/rm files. An example subnet-up script:
#!/bin/sh
DIR=`echo $SUBNET | tr / _`
mkdir -p $DIR
touch $DIR/$NODE
ip route add ...
The corresponding down script:
#!/bin/sh
DIR=`echo $SUBNET | tr / _`
rm $DIR/$NODE
if [ -z "`ls $DIR`" ]; then
ip route del ...
fi
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <[email protected]>
signature.asc
Description: Digital signature
_______________________________________________ tinc mailing list [email protected] https://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc
