Community discussions

MikroTik App
Rox169
Member
Member
Topic Author
Posts: 403
加入: Sat Sep 04, 2021 1:47 am

Zerotier together with Wireguard

Fri Mar 31, 2023 11:14 am

Hello,

I have location A B C conected with Zerotier and Wireguard at the same time. Problem is that when I enable Zerotier the Wireguard will stop working and only Zerotier is working. Do you have any idea what could be wrong?

I have noticed that in routes has Zerotier and Wireguard same Distance.

Im trying to learn the OSFP do you think that OSFP could sort this problem?

Thank you
Last edited byRox169on Fri Mar 31, 2023 11:30 am, edited 1 time in total.
Top
用户头像
rextended
Forum Guru
Forum Guru
Posts: 11493
加入: Tue Feb 25, 2014 12:49 pm
Location:Italy
Contact:

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 11:25 am

Or you use Zero & Guard, or you use two ethernet cable, for the same source and destination, is the same.
Or you bond it, or you can use only one at the time... (ignoring how is selected the tunnel to use)
Top
Rox169
Member
Member
Topic Author
Posts: 403
加入: Sat Sep 04, 2021 1:47 am

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 12:17 pm

I was trying to change Distance in routes but Zerotier has distance 1 and can not be changed to distance 2. I would like to have Wireguard with distance 1 and Zerotier with distance 2...
Top
用户头像
Larsa
Forum Veteran
Forum Veteran
Posts: 892
加入: Sat Aug 29, 2015 7:40 pm
Location:The North Pole, Santa's Workshop

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 3:05 pm

WG probably works fine, it's just that if both endpoints are the same, the router chooses the shortest path first otherwise it picks the first one in the list (if they all have the same distance, scope etc, that is).

On way to control it is to use recursive routes and separate routing tables that is checked with a ping to find out if a route is active (ie if the wg/zt link is alive) Checkout this explonation with examplesviewtopic.php?p=978539.
Top
Rox169
Member
Member
Topic Author
Posts: 403
加入: Sat Sep 04, 2021 1:47 am

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 3:22 pm

Hello Larsa,

thank you for helping. So OSFP will not help me?
Top
用户头像
Larsa
Forum Veteran
Forum Veteran
Posts: 892
加入: Sat Aug 29, 2015 7:40 pm
Location:The North Pole, Santa's Workshop

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 4:49 pm

OSPF works too!
Top
用户头像
Amm0
Forum Guru
Forum Guru
Posts: 2376
加入: Sun May 01, 2016 7:12 pm
Location:California

Re: Zerotier together with Wireguard

Fri Mar 31, 2023 5:08 pm

Hard to know exactly here. You might want to statically assign your ZT address in /ip/address, and disable "Allow Managed" on zerotier1. That will stop the ZT route tables from populating /ip/route with any from my.zerotier.com controller, which is likely where the distance=1 things are coming from.

Also, ZT by default will try to find path down all routes. So might also create an interface list use by the zt1 instance that includes the specific interfaces you want ZT using. e.g. interfaces=all will cause ZT try to find path down a WG, likely not what you want.

不确定OSPF会to magically fix the route table, or make this simpler. e.g. you can't push OSPF routes to the ZeroTier controller, so may still be managing a route table at my.zerotier.com depending on topology.
Top
Rox169
Member
Member
Topic Author
Posts: 403
加入: Sat Sep 04, 2021 1:47 am

Re: Zerotier together with Wireguard

Sun Apr 02, 2023 11:29 pm

Larsa and Amm0.

thank you for your comments.

Firstlly I will learn OSFP to try to sort this out and in case it will not hepl I will not Allow Managed to Zerotier and try to set it by myself.

Tanks
Top

Who is online

Users browsing this forum:Bing [Bot],Google [Bot]and 9 guests