Hi,
I somehow couldn't find such specific scenario in the forum, hence the new topic. Apologies if this was already discussed.
I have a hEX PoE (7.15.2) with public static IP and one mAP light (7.15.3) with dynamic address.
The idea is when the mAP turns on and connects (via its ether1) to a DHCP enabled LAN, to:
- get gateway, DNS, etc... from the DHCP server
- automatically activate a WireGuard tunnel to the hEX
- route all self originated and forwarded traffic via the tunnel interface, and not allow anything to pass directly via ether1 (apart from the tunnel itself obviously)
So, my problem is with the routing on mAP side.
If I keep the DHCP default route and simply add a second default one via the WireGuard interface, I get 2 default routes in ECMP, which behaves strange.
DST-ADDRESS GATEWAY DISTANCE
DAd+ 0.0.0.0/0 10.0.11.101 1
0 As+ 0.0.0.0/0 10.234.234.1 1
DAc 10.0.11.0/24 ether1 0
DAc 10.234.234.0/24 czjinpra 0
DAc 192.168.88.0/24 bridge 0
With the routes above, it seems to be "balancing" and forwarding consecutively one packet via ether1, one via the tunnel (czjinpra), which of course is far from ideal.
I tried setting bigger distance to the DHCP route, but then the tunnel never activates.
Not sure if there in a way here to set a "priority" for the ECMP routes, so when both interfaces are up, both routes are active, but the tunnel is preferred?
If I remove the DHCP route and manually replace it with a host route for the hEX public IP, then everything works as I want it to:
DST-ADDRESS GATEWAY DISTANCE
0 As 0.0.0.0/0 10.234.234.1 1
DAc 10.0.11.0/24 ether1 0
DAc 10.234.234.0/24 czjinpra 0
1 As 185.<hEX.pub.IP>/32 10.0.11.101 1
DAc 192.168.88.0/24 bridge 0
Except that I have to manually change the gateway of the host route every time I move the mAP to a new network.
What is the proper way for configuring such scenario in RouterOS
Thanks in advance, and please have in mind that I first touched RouterOS about 2 weeks ago ![]()