What is behind the %interface notation in route gateways?
I found very little information on the internet.
Sometimes it works, sometimes not.
For example I have two interfaces:
- Ethernet
ether1, DHCP client, 192.168.2.105/24, gw 192.168.2.1 - Wireguard
wg1, 192.168.9.43/32, gw 192.168.9.44 (allowed IPs: 192.168.9.44/32, 192.168.9.0/28, 0.0.0.0/0)
192.168.2.105, 192.168.2.1, 192.168.9.43, 192.168.9.44 - everything is pingable. Even 192.168.9.1 (some other mikrotik lives there)
Everything works when I set following routes:
- 0.0.0.0/0, gw 192.168.9.44
- 192.168.9/28, gw 192.168.9.44
- 1.1.1.1/24, gw 192.168.2.1
When I do the following - sometimes it works, sometime it does not: (The routes become unreachable in 5-30 seconds)
- 0.0.0.0/0, gw %wg1
- 192.168.9/28, gw %wg1
- 1.1.1.1/24, gw %ether1
Even though the gw IPs are pingable if I ping in mikrotik tools/ping
For example yesterday evening did not work on one of the mikrotiks and worked on the other. Today it works on the first one, but fail to work in the second.
Checked on two mikrotiks (that actually live behind 192.168.9.43 and 192.168.9.44,192.168.9.1).
Setting interfaces in the routes would be pretty useful instead of setting the gw IPs manually, so I would be glad to have %interface notation working.
Can anybody explain what am I missing, please?