Community discussions

MikroTik App
 
Vox
just joined
Topic Author
Posts: 3
Joined: Tue Aug 05, 2014 5:03 pm

Wrong dynamic route for Wireguard interface?

Wed Aug 03, 2022 9:19 am

Hi,
sorry for newbie question. I just upgraded to hAP ac^2 (RouterBOARD D52G-5HacD2HnD-TC) to routeros 7.4 to gain option to setup the wireguard VPN. At the end I managed it to work, but:

There is something I dont understand (BTW I am using Winbox).
When the Wireguard interface is created and the IP address is set, the new Dynamic route is added. I am suspitious there is a bug.

adding:
IP address: 192.168.100.1
network: 192.168.100.0
interface: wireguard1

automatically creates this entry in the routing table:
(DAC) 192.168.100.0/32 wireguard1 distance 0

The mask /32 looks odd to me, would expect /24 ? (and this is what I found in the documentation in section IP and routing configuration here: https://help.mikrotik.com/docs/display/ROS/WireGuard )

Actually adding manually 192.168.100.0/24 route to the table fixes the problem. Unless the Dynamic entry can not be deleted.

Could anyone confirm the bug or explain my misunderstanding, pls?
Thanks.
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 989
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: Wrong dynamic route for Wireguard interface?

Wed Aug 03, 2022 11:22 am

When adding IP-addresses you need to be specifying /24 !! or it will assume a /32

So ...

adding:
IP address: 192.168.100.1/24
network: 192.168.100.0
interface: wireguard1
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19322
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Wrong dynamic route for Wireguard interface?

Wed Aug 03, 2022 1:18 pm

As JV points out, the bug or problem is you LOL.
A proper address will result in the correct <DAC> route.
The result you have is exactly what you should expect for the address you gave the router.
 
Vox
just joined
Topic Author
Posts: 3
Joined: Tue Aug 05, 2014 5:03 pm

Re: Wrong dynamic route for Wireguard interface?

Wed Aug 03, 2022 1:42 pm

Thank you Jvanhambelgium, you are right. Winbox might better treat the IP address input there, that was not obvious to me.

Hmm, Anav, I was curious if some comment from you arrives...
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19322
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Wrong dynamic route for Wireguard interface?

Wed Aug 03, 2022 3:01 pm

Who is online

Users browsing this forum: GoogleOther [Bot], nl2024, scoobyn8 and 44 guests