-4. It is assumed that the config files go into something like "/etc/tinc/link" and "/etc/tinc/nets.boot" has an entry for "link". The following table can be used to guide configuration of routers:
- * "routera" configuration for tinc (the master router):
- >cat tinc.conf
- Name = routera
- Mode = switch
- Interface = vpn6
-
- >cat tinc-up
- #!/bin/sh
- #Enable tinc
- ip -6 link set $INTERFACE up mtu 1280 txqueuelen 1000
- ip -6 addr add 2001:db8:beef::1/64 dev $INTERFACE
- ip -6 route add 2001:db8:beef::/48 dev $INTERFACE
- #Static routing table
- ip -6 route add 2001:db8:beef:2::/64 via 2001:db8:beef::2
- ip -6 route add 2001:db8:beef:3::/64 via 2001:db8:beef::3
- ip -6 route add 2001:db8:beef:4::/64 via 2001:db8:beef::4
-
- >cat tinc-down
- #!/bin/sh
- #Static routing table
- ip -6 route del 2001:db8:beef:2::/64 via 2001:db8:beef:::2
- ip -6 route del 2001:db8:beef:3::/64 via 2001:db8:beef:::3
- ip -6 route del 2001:db8:beef:4::/64 via 2001:db8:beef:::4
- #Disable tinc
- ip -6 route del 2001:db8:beef::/48 dev $INTERFACE
- ip -6 addr del 2001:db8:beef::1/64 dev $INTERFACE
- ip -6 link set $INTERFACE down
- * "routerb" configuration for tinc (the other non-master routers will be like this one):
- >cat tinc.conf
- Name=routerb
- Mode = switch
- ConnectTo = routera
- Interface = vpn6
-
- >cat tinc-up
- #!/bin/sh
- ip -6 link set $INTERFACE up mtu 1280
- ip -6 addr add 2001:db8:beef::2/64 dev $INTERFACE
- ip -6 route add default via 2001:db8:beef::1
-
- >cat tinc-down
- #!/bin/sh
- ip -6 route del default via 2001:db8:beef::1
- ip -6 addr del 2001:db8:beef::2/64 dev $INTERFACE
- ip -6 link set $INTERFACE down
+4. It is assumed that the config files go into something like `/etc/tinc/link` and `/etc/tinc/nets.boot` has an entry for "link". The following table can be used to guide configuration of routers. The "routera" configuration for tinc (the master router):
+<pre>
+>cat tinc.conf
+Name = routera
+Mode = switch
+Interface = vpn6
+
+>cat tinc-up
+#!/bin/sh
+#Enable tinc
+ip -6 link set $INTERFACE up mtu 1280 txqueuelen 1000
+ip -6 addr add 2001:db8:beef::1/64 dev $INTERFACE
+ip -6 route add 2001:db8:beef::/48 dev $INTERFACE
+#Static routing table
+ip -6 route add 2001:db8:beef:2::/64 via 2001:db8:beef::2
+ip -6 route add 2001:db8:beef:3::/64 via 2001:db8:beef::3
+ip -6 route add 2001:db8:beef:4::/64 via 2001:db8:beef::4
+
+>cat tinc-down
+#!/bin/sh
+#Static routing table
+ip -6 route del 2001:db8:beef:2::/64 via 2001:db8:beef:::2
+ip -6 route del 2001:db8:beef:3::/64 via 2001:db8:beef:::3
+ip -6 route del 2001:db8:beef:4::/64 via 2001:db8:beef:::4
+#Disable tinc
+ip -6 route del 2001:db8:beef::/48 dev $INTERFACE
+ip -6 addr del 2001:db8:beef::1/64 dev $INTERFACE
+ip -6 link set $INTERFACE down
+</pre>
+The "routerb" configuration for tinc (the other non-master routers will be like this one):
+<pre>
+>cat tinc.conf
+Name=routerb
+Mode = switch
+ConnectTo = routera
+Interface = vpn6
+
+>cat tinc-up
+#!/bin/sh
+ip -6 link set $INTERFACE up mtu 1280
+ip -6 addr add 2001:db8:beef::2/64 dev $INTERFACE
+ip -6 route add default via 2001:db8:beef::1
+
+>cat tinc-down
+#!/bin/sh
+ip -6 route del default via 2001:db8:beef::1
+ip -6 addr del 2001:db8:beef::2/64 dev $INTERFACE
+ip -6 link set $INTERFACE down
+</pre>