I can’t explain some strange behavior of mikrotik router.
I’ve two ISP and source routing configured on RB3011UiAS
- I have default route to the gate ISP1 and ISP2 with route-mark respectively
add distance=1 gateway=83.167.29.113 routing-mark=ISP1
add distance=1 gateway=90.157.117.91 routing-mark=ISP2
- I have default route to the gate ISP1 without route mark
add distance=1 gateway=83.167.29.113
- I have rule to mark all input connection
add action=mark-connection chain=input connection-state=new in-interface=vlan22-ISP1 new-connection-mark=con-isp1 passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=vlan11-ISP2 new-connection-mark=con-isp2 passthrough=yes
- I have rule to set route mark on output packages
add action=mark-routing chain=output connection-mark=con-isp1 new-routing-mark=ISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=con-isp2 new-routing-mark=ISP2 passthrough=yes
So I can connect to the router using ssh through ISP1 and ISP2
But if I remove default route (to the ISP1) from the main table (without mark)
Everything is working fine and I can connect to the router from the Internet (no matter ISP1 or ISP2).
If I add dummy default route to the main table, for example to the nonexistent host in the local network, In this case I can connect to my router from the ISP1 and ISP2
So, why source route work only if I have reachable default route in the main table (even to using nonexistent host as the gate)?